diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-22 14:27:43 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-22 14:27:43 +0200 |
commit | 04235ff1134e404b133917020fa4eac1038947a0 (patch) | |
tree | 3d91d5c2b96c17048cd70491082c008977985c26 /configure.ac | |
parent | a8f1600b7ba13834f476e455d382d188b49eef9e (diff) | |
parent | d2dde96decab77927a04af75fd9183666c25a624 (diff) | |
download | egawk-04235ff1134e404b133917020fa4eac1038947a0.tar.gz egawk-04235ff1134e404b133917020fa4eac1038947a0.tar.bz2 egawk-04235ff1134e404b133917020fa4eac1038947a0.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index 8503c421..3a7b90e7 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ AC_INIT([GNU Awk],[4.2.0],[bug-gawk@gnu.org],[gawk]) # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. -if test "x$INSTALL" = "x" +if test "$INSTALL" = "" then INSTALL="$srcdir/install-sh -c" export INSTALL @@ -72,6 +72,22 @@ AC_ARG_ENABLE([mpfr], fi ) +EXTENSIONDIR= +AC_ARG_ENABLE([versioned-extension-dir], + [AS_HELP_STRING([--enable-versioned-extension-dir], [use a versioned directory for extensions])], + if test "$enableval" = yes + then + MAJOR=`awk '/define gawk_api_major_version/ { print $3 }' < $srcdir/gawkapi.h` + MINOR=`awk '/define gawk_api_minor_version/ { print $3 }' < $srcdir/gawkapi.h` + + # note leading slash on the value + export EXTENSIONDIR=/ext-$MAJOR.$MINOR + fi +) + +# set default shared library location +AC_SUBST([pkgextensiondir], ['${pkglibdir}'${EXTENSIONDIR}]) + AC_CANONICAL_HOST AC_USE_SYSTEM_EXTENSIONS @@ -113,8 +129,6 @@ AC_SUBST(CFLAGS) # shared library suffix for dynamic loading: AC_SUBST(acl_shlibext) -# default shared library location -AC_SUBST([pkgextensiondir], ['${pkglibdir}']) dnl checks for systems AC_ZOS_USS @@ -159,7 +173,7 @@ else fi dnl Check cross compiling -AM_CONDITIONAL([TEST_CROSS_COMPILE], [test "x$build_alias" != "x$host_alias"]) +AM_CONDITIONAL([TEST_CROSS_COMPILE], [test "$build_alias" != "$host_alias"]) dnl checks for typedefs AC_TYPE_PID_T @@ -232,7 +246,7 @@ AC_DEFUN([TYPE_SOCKLEN_T], done done - if test "x$rsync_cv_socklen_t_equiv" = x + if test "$rsync_cv_socklen_t_equiv" = "" then dnl Some systems get this. Default to int. -- ADR dnl AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) @@ -291,7 +305,7 @@ dnl check for dynamic linking dnl This is known to be very primitive AC_ARG_ENABLE([extensions], [AS_HELP_STRING([--disable-extensions], [disable dynamic extensions (default is detect)])]) -if test "x$enable_extensions" != "xno" +if test "$enable_extensions" != "no" then extensions_supported=no @@ -312,27 +326,18 @@ then then extensions_supported=yes AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible]) - # Add -export-dynamic for old extensions. Only works for GCC - if test "$GCC" = yes - then - case $host_os in - linux*|freebsd*) - LDFLAGS="$LDFLAGS -Wl,-export-dynamic" - ;; - esac - fi fi ]) ;; esac - if test "x$enable_extensions$extensions_supported" = "xyesno" + if test "$enable_extensions$extensions_supported" = "yesno" then AC_MSG_ERROR([extension support requested, but unavailable]) fi enable_extensions=$extensions_supported fi -AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "x$enable_extensions" = "xyes"]) +AM_CONDITIONAL([ENABLE_EXTENSIONS], [test "$enable_extensions" = "yes"]) dnl check for how to use getpgrp dnl have to hardwire it for VMS POSIX. Sigh. @@ -431,7 +436,7 @@ AC_CONFIG_FILES(Makefile extras/Makefile po/Makefile.in test/Makefile) -if test "x$enable_extensions" = "xyes" +if test "$enable_extensions" = "yes" then AC_CONFIG_SUBDIRS(extension) fi |