diff options
-rwxr-xr-x | configure | 37 | ||||
-rw-r--r-- | m4_ax_check_zlib.m4 | 18 |
2 files changed, 37 insertions, 18 deletions
@@ -657,6 +657,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -733,6 +734,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -985,6 +987,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1122,7 +1133,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1275,6 +1286,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2223,7 +2235,7 @@ ac_config_headers="$ac_config_headers config.h" # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html +# https://www.gnu.org/software/autoconf-archive/ax_check_zlib.html # =========================================================================== # # SYNOPSIS @@ -2246,10 +2258,10 @@ ac_config_headers="$ac_config_headers config.h" # If both header file and library are found, shell commands # 'action-if-found' is run. If 'action-if-found' is not specified, the # default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends -# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls -# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition -# for this symbol in a config.h file. Sample usage in a C/C++ source is as -# follows: +# '-L${ZLIB_HOME}/lib' to LDFLAGS (BUT ONLY IF ZLIB_HOME IS NOT EXACTLY +# "/usr"), prepends '-lz' to LIBS, and calls AC_DEFINE(HAVE_LIBZ). +# You should use autoheader to include a definition for this symbol in a +# config.h file. Sample usage in a C/C++ source is as follows: # # #ifdef HAVE_LIBZ # #include <zlib.h> @@ -2271,7 +2283,7 @@ ac_config_headers="$ac_config_headers config.h" # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. +# with this program. If not, see <https://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -2286,7 +2298,7 @@ ac_config_headers="$ac_config_headers config.h" # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 14 +#serial 16.0.0.1 # This is what autoupdate's m4 run will expand. It fires # the warning (with _au_warn_XXX), outputs it into the @@ -4072,10 +4084,11 @@ then ZLIB_OLD_LDFLAGS=$LDFLAGS ZLIB_OLD_CPPFLAGS=$CPPFLAGS if test -n "${ZLIB_HOME}"; then - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + if test "${ZLIB_HOME}" != "/usr"; then + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + fi CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4145,7 +4158,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + if test "${ZLIB_HOME}" != "/usr"; then + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + fi LIBS="-lz $LIBS" $as_echo "#define HAVE_LIBZ 1" >>confdefs.h diff --git a/m4_ax_check_zlib.m4 b/m4_ax_check_zlib.m4 index 1a16843..9cde57d 100644 --- a/m4_ax_check_zlib.m4 +++ b/m4_ax_check_zlib.m4 @@ -22,10 +22,10 @@ # If both header file and library are found, shell commands # 'action-if-found' is run. If 'action-if-found' is not specified, the # default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends -# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls -# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition -# for this symbol in a config.h file. Sample usage in a C/C++ source is as -# follows: +# '-L${ZLIB_HOME}/lib' to LDFLAGS (BUT ONLY IF ZLIB_HOME IS NOT EXACTLY +# "/usr"), prepends '-lz' to LIBS, and calls AC_DEFINE(HAVE_LIBZ). +# You should use autoheader to include a definition for this symbol in a +# config.h file. Sample usage in a C/C++ source is as follows: # # #ifdef HAVE_LIBZ # #include <zlib.h> @@ -62,7 +62,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 16 +#serial 16.0.0.1 AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB]) AC_DEFUN([AX_CHECK_ZLIB], @@ -105,7 +105,9 @@ then ZLIB_OLD_LDFLAGS=$LDFLAGS ZLIB_OLD_CPPFLAGS=$CPPFLAGS if test -n "${ZLIB_HOME}"; then - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + if test "${ZLIB_HOME}" != "/usr"; then + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + fi CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" fi AC_LANG_PUSH([C]) @@ -119,7 +121,9 @@ then # m4_ifblank([$1],[ CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + if test "${ZLIB_HOME}" != "/usr"; then + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + fi LIBS="-lz $LIBS" AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have `z' library (-lz)]) |