mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r2526] Added the ability to compile executables things as completely static.
Also I'm keeping the place the user indicated the zlib would be...
This commit is contained in:
parent
32c4a3e515
commit
ba41d8e86b
32
configure.in
32
configure.in
@ -124,7 +124,7 @@ dnl Check if they would like the Fortran interface compiled
|
||||
dnl
|
||||
AC_MSG_CHECKING(if fortran interface enabled)
|
||||
AC_ARG_ENABLE(fortran,
|
||||
[ --enable-fortran Compile the Fortran interface.],
|
||||
[ --enable-fortran Compile the Fortran interface [default=no]],
|
||||
HDF_FORTRAN=$enableval)
|
||||
|
||||
if test "X$HDF_FORTRAN" = Xyes; then
|
||||
@ -144,7 +144,7 @@ dnl Check if they would like the Fortran interface compiled
|
||||
dnl
|
||||
AC_MSG_CHECKING(if c++ interface enabled)
|
||||
AC_ARG_ENABLE(c++,
|
||||
[ --enable-c++ Compile the C++ interface.],
|
||||
[ --enable-c++ Compile the C++ interface [default=no]],
|
||||
HDF_CXX=$enableval)
|
||||
|
||||
if test "X$HDF_CXX" = Xyes; then
|
||||
@ -166,6 +166,24 @@ AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl If we should build only static executables
|
||||
dnl
|
||||
AC_MSG_CHECKING(if should build only statically linked executables)
|
||||
AC_ARG_ENABLE(static_exec,
|
||||
[ --enable-static-exec Build only statically linked executables [default=no]],
|
||||
STATIC_EXEC=$enableval)
|
||||
|
||||
if test "X$STATIC_EXEC" = Xyes; then
|
||||
echo "yes"
|
||||
LT_STATIC_EXEC="-all-static"
|
||||
else
|
||||
echo "no"
|
||||
LT_STATIC_EXEC=""
|
||||
fi
|
||||
|
||||
AC_SUBST(LT_STATIC_EXEC)
|
||||
|
||||
if test "X$AR" = "X"; then
|
||||
AC_CHECK_PROGS(AR,ar xar,:,$PATH)
|
||||
fi
|
||||
@ -515,6 +533,8 @@ dnl command-line switch. The value is an include path and/or a library path.
|
||||
dnl If the library path is specified then it must be preceded by a comma.
|
||||
dnl
|
||||
|
||||
ZLIB_DIR=/usr/lib
|
||||
|
||||
AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression],
|
||||
,withval=yes)
|
||||
case $withval in
|
||||
@ -540,6 +560,7 @@ case $withval in
|
||||
if test "X" != "$zlib_lib"; then
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -L$zlib_lib"
|
||||
ZLIB_DIR=$zlib_lib
|
||||
AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS")
|
||||
else
|
||||
AC_CHECK_LIB(z, compress)
|
||||
@ -547,6 +568,8 @@ case $withval in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ZLIB_DIR)
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage
|
||||
dnl driver.
|
||||
@ -1380,7 +1403,9 @@ EOF
|
||||
|
||||
dnl Put the C++ ifdef wrappers in the H5pubconf file as well, but only
|
||||
dnl if it's not there already.
|
||||
{ grep __cplusplus src H5pubconf.h 1>&2 2>/dev/null;} || \
|
||||
if (grep __cplusplus src H5pubconf.h) >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
cat >> src/H5pubconf.h <<EOF
|
||||
|
||||
/* inline is a keyword in C++. If this is a C++ compiler, undefine it */
|
||||
@ -1388,3 +1413,4 @@ dnl if it's not there already.
|
||||
#undef inline
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user