summaryrefslogtreecommitdiffstats
path: root/contrib/dialog/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dialog/aclocal.m4')
-rw-r--r--contrib/dialog/aclocal.m41119
1 files changed, 1039 insertions, 80 deletions
diff --git a/contrib/dialog/aclocal.m4 b/contrib/dialog/aclocal.m4
index 4fb129e..35f94c5 100644
--- a/contrib/dialog/aclocal.m4
+++ b/contrib/dialog/aclocal.m4
@@ -1,7 +1,7 @@
dnl macros used for DIALOG configure script
-dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $
+dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $
dnl ---------------------------------------------------------------------------
-dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
+dnl Copyright 1999-2012,2013 -- Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@@ -590,7 +590,7 @@ changequote([,])dnl
AC_SUBST(GENCAT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53
+dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
dnl ------------------
dnl Conditionally generate script according to whether we're using a given autoconf.
dnl
@@ -599,6 +599,7 @@ dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
dnl $3 = code to use if AC_ACVERSION is older than $1.
define([CF_ACVERSION_CHECK],
[
+ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
ifdef([m4_version_compare],
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
[CF_ACVERSION_COMPARE(
@@ -1125,6 +1126,27 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
+dnl ------------------------
+dnl Show the version of libtool
+dnl
+dnl Save the version in a cache variable - this is not entirely a good thing,
+dnl but the version string from libtool is very ugly, and for bug reports it
+dnl might be useful to have the original string.
+AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[
+if test -n "$LIBTOOL" && test "$LIBTOOL" != none
+then
+ AC_MSG_CHECKING(version of $LIBTOOL)
+ CF_LIBTOOL_VERSION
+ AC_MSG_RESULT($cf_cv_libtool_version)
+ if test -z "$cf_cv_libtool_version" ; then
+ AC_MSG_ERROR(This is not GNU libtool)
+ fi
+else
+ AC_MSG_ERROR(GNU libtool has not been found)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
dnl -----------------
dnl Check if the given compiler is really clang. clang's C driver defines
@@ -1293,7 +1315,7 @@ fi
AC_CHECK_HEADERS($cf_cv_ncurses_header)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48
+dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50
dnl --------------
dnl Look for the curses libraries. Older curses implementations may require
dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first.
@@ -1330,7 +1352,7 @@ hpux10.*) #(vi
ac_cv_func_initscr=yes
])])
fi
- ;;
+ ;;
linux*)
case `arch 2>/dev/null` in
x86_64)
@@ -1345,7 +1367,7 @@ linux*)
CF_ADD_LIBDIR(/lib)
;;
esac
- ;;
+ ;;
sunos3*|sunos4*)
if test "x$cf_cv_screen" = "xcurses_5lib"
then
@@ -1359,59 +1381,63 @@ sunos3*|sunos4*)
esac
if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
- cf_term_lib=""
- cf_curs_lib=""
+ cf_save_LIBS="$LIBS"
- if test ".${cf_cv_ncurses_version:-no}" != .no
- then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
- fi
+ if test ".${cf_cv_ncurses_version:-no}" != .no
+ then
+ cf_check_list="ncurses curses cursesX"
+ else
+ cf_check_list="cursesX curses ncurses"
+ fi
- # Check for library containing tgoto. Do this before curses library
- # because it may be needed to link the test-case for initscr.
- AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
- for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
- do
- AC_CHECK_LIB($cf_term_lib,tgoto,[break])
- done
- ])
+ # Check for library containing tgoto. Do this before curses library
+ # because it may be needed to link the test-case for initscr.
+ if test "x$cf_term_lib" = x
+ then
+ AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
+ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
+ do
+ AC_CHECK_LIB($cf_term_lib,tgoto,[break])
+ done
+ ])
+ fi
- # Check for library containing initscr
- test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
- for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
- do
- AC_CHECK_LIB($cf_curs_lib,initscr,[break])
- done
- test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
-
- LIBS="-l$cf_curs_lib $cf_save_LIBS"
- if test "$cf_term_lib" = unknown ; then
- AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr()],
- [cf_result=yes],
- [cf_result=no])
- AC_MSG_RESULT($cf_result)
- test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
- elif test "$cf_curs_lib" = "$cf_term_lib" ; then
- :
- elif test "$cf_term_lib" != predefined ; then
- AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr(); tgoto((char *)0, 0, 0);],
- [cf_result=no],
- [
- LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr()],
- [cf_result=yes],
- [cf_result=error])
- ])
- AC_MSG_RESULT($cf_result)
- fi
+ # Check for library containing initscr
+ test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
+ if test "x$cf_curs_lib" = x
+ then
+ for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
+ do
+ AC_CHECK_LIB($cf_curs_lib,initscr,[break])
+ done
+ fi
+ test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
+
+ LIBS="-l$cf_curs_lib $cf_save_LIBS"
+ if test "$cf_term_lib" = unknown ; then
+ AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr()],
+ [cf_result=yes],
+ [cf_result=no])
+ AC_MSG_RESULT($cf_result)
+ test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
+ elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+ :
+ elif test "$cf_term_lib" != predefined ; then
+ AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr(); tgoto((char *)0, 0, 0);],
+ [cf_result=no],
+ [
+ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr()],
+ [cf_result=yes],
+ [cf_result=error])
+ ])
+ AC_MSG_RESULT($cf_result)
+ fi
fi
fi
@@ -1708,6 +1734,20 @@ if test "$cf_disable_rpath_hack" = no ; then
fi
])
dnl ---------------------------------------------------------------------------
+dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42
+dnl ---------------
+dnl Check if the rpath option should be used, setting cache variable
+dnl cf_cv_enable_rpath if so.
+AC_DEFUN([CF_ENABLE_RPATH],
+[
+AC_MSG_CHECKING(if rpath option should be used)
+AC_ARG_ENABLE(rpath,
+[ --enable-rpath use rpath option when generating shared libraries],
+[cf_cv_enable_rpath=$enableval],
+[cf_cv_enable_rpath=no])
+AC_MSG_RESULT($cf_cv_enable_rpath)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
dnl ---------------
dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
@@ -1888,6 +1928,15 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09
+dnl --------------
+dnl Forget that we saw the given tool.
+AC_DEFUN([CF_FORGET_TOOL],[
+unset ac_cv_prog_ac_ct_$1
+unset ac_ct_$1
+unset $1
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51
dnl ------------
dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'
@@ -2256,7 +2305,7 @@ test -d "$oldincludedir" && {
$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
+dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -2270,6 +2319,7 @@ dnl $1 = GCC (default) or GXX
dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
dnl $3 = CFLAGS (default) or CXXFLAGS
AC_DEFUN([CF_INTEL_COMPILER],[
+AC_REQUIRE([AC_CANONICAL_HOST])
ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
@@ -2415,6 +2465,18 @@ CF_SUBDIR_PATH($1,$2,lib)
$1="$cf_library_path_list [$]$1"
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
+dnl ------------------
+AC_DEFUN([CF_LIBTOOL_VERSION],[
+if test -n "$LIBTOOL" && test "$LIBTOOL" != none
+then
+ cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
+else
+ cf_cv_libtool_version=
+fi
+test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
dnl -------------
dnl Compute the library-prefix for the given host system
@@ -2432,6 +2494,69 @@ ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05
+dnl -------------
+dnl Compute the library file-suffix from the given model name
+dnl $1 = model name
+dnl $2 = variable to set (the nominal library suffix)
+dnl $3 = dependency variable to set (actual filename)
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_SUFFIX],
+[
+ case X$1 in #(vi
+ Xlibtool) #(vi
+ $2='.la'
+ $3=[$]$2
+ ;;
+ Xdebug) #(vi
+ $2='_g.a'
+ $3=[$]$2
+ ;;
+ Xprofile) #(vi
+ $2='_p.a'
+ $3=[$]$2
+ ;;
+ Xshared) #(vi
+ case $cf_cv_system_name in
+ aix[[5-7]]*) #(vi
+ $2='.a'
+ $3=[$]$2
+ ;;
+ cygwin*|msys*|mingw*) #(vi
+ $2='.dll'
+ $3='.dll.a'
+ ;;
+ darwin*) #(vi
+ $2='.dylib'
+ $3=[$]$2
+ ;;
+ hpux*) #(vi
+ case $target in
+ ia64*) #(vi
+ $2='.so'
+ $3=[$]$2
+ ;;
+ *) #(vi
+ $2='.sl'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ *) #(vi
+ $2='.so'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ *)
+ $2='.a'
+ $3=[$]$2
+ ;;
+ esac
+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+ test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
dnl ------------
dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
@@ -2569,7 +2694,7 @@ if test "$cf_cv_mbstate_t" != unknown ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
+dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05
dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that.
@@ -2578,7 +2703,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
if test "$cross_compiling" = yes ; then
case $target_alias in #(vi
- *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi
cf_cv_mixedcase=no
;;
*)
@@ -2959,6 +3084,25 @@ case .$with_cflags in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
+dnl ----------------
+dnl Check if the given variable is a number. If not, report an error.
+dnl $1 is the variable
+dnl $2 is the message
+AC_DEFUN([CF_NUMBER_SYNTAX],[
+if test -n "$1" ; then
+ case $1 in #(vi
+ [[0-9]]*) #(vi
+ ;;
+ *)
+ AC_MSG_ERROR($2 is not a number: $1)
+ ;;
+ esac
+else
+ AC_MSG_ERROR($2 value is empty)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55
dnl ---------------
dnl Check if we use the messages included with this program
@@ -3049,6 +3193,40 @@ case ".[$]$1" in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+dnl -------------
+dnl Check for the package-config program, unless disabled by command-line.
+AC_DEFUN([CF_PKG_CONFIG],
+[
+AC_MSG_CHECKING(if you want to use pkg-config)
+AC_ARG_WITH(pkg-config,
+ [ --with-pkg-config{=path} enable/disable use of pkg-config],
+ [cf_pkg_config=$withval],
+ [cf_pkg_config=yes])
+AC_MSG_RESULT($cf_pkg_config)
+
+case $cf_pkg_config in #(vi
+no) #(vi
+ PKG_CONFIG=none
+ ;;
+yes) #(vi
+ CF_ACVERSION_CHECK(2.52,
+ [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
+ [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
+ ;;
+*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+ CF_PATH_SYNTAX(PKG_CONFIG)
+fi
+
+AC_SUBST(PKG_CONFIG)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
@@ -3168,6 +3346,28 @@ AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37
+dnl ------------
+dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
+dnl option if it is supported.
+AC_DEFUN([CF_PROG_LN_S],[
+AC_PROG_LN_S
+AC_MSG_CHECKING(if $LN_S -f options work)
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+AC_MSG_RESULT($cf_prog_ln_sf)
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
dnl ----------------
dnl Remove all -U and -D options that refer to the given symbol from a list
@@ -3185,7 +3385,7 @@ $1=`echo "$2" | \
-e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33
+dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00
dnl -------------
AC_DEFUN([CF_RPATH_HACK],
[
@@ -3202,8 +3402,8 @@ if test -n "$LD_RPATH_OPT" ; then
AC_TRY_LINK([#include <stdio.h>],
[printf("Hello");],
- [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
- cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`])
+ [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`])
# If we passed the link-test, but get a "not found" on a given library,
# this could be due to inept reconfiguration of gcc to make it only
@@ -3236,6 +3436,8 @@ AC_TRY_LINK([#include <stdio.h>],
CF_RPATH_HACK_2(LIBS)
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
+else
+ AC_MSG_RESULT(no)
fi
AC_SUBST(EXTRA_LDFLAGS)
])dnl
@@ -3300,6 +3502,440 @@ CF_VERBOSE(...checked $1 [$]$1)
AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53
+dnl --------------
+dnl --------------
+dnl Attempt to determine the appropriate CC/LD options for creating a shared
+dnl library.
+dnl
+dnl Notes:
+dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within
+dnl the build-tree, i.e., by making use of the libraries that are compiled in
+dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
+dnl shared library since that can lead to unexpected results at runtime.
+dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared
+dnl libraries are compiled in ../../lib
+dnl
+dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
+dnl to install symbolic links to the rel/abi versions of shared libraries.
+dnl
+dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi
+dnl version when making symbolic links.
+dnl
+dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library
+dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix
+dnl (ex: libncurses.so.<ver>).
+dnl
+dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
+AC_DEFUN([CF_SHARED_OPTS],
+[
+ AC_REQUIRE([CF_LD_RPATH_OPT])
+ RM_SHARED_OPTS=
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+ : ${rel_builddir:=.}
+
+ cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+
+ AC_MSG_CHECKING(if release/abi version should be used for shared libs)
+ AC_ARG_WITH(shlib-version,
+ [ --with-shlib-version=X Specify rel or abi version for shared libs],
+ [test -z "$withval" && withval=auto
+ case $withval in #(vi
+ yes) #(vi
+ cf_cv_shlib_version=auto
+ ;;
+ rel|abi|auto|no) #(vi
+ cf_cv_shlib_version=$withval
+ ;;
+ *)
+ AC_MSG_ERROR([option value must be one of: rel, abi, auto or no])
+ ;;
+ esac
+ ],[cf_cv_shlib_version=auto])
+ AC_MSG_RESULT($cf_cv_shlib_version)
+
+ cf_cv_rm_so_locs=no
+ cf_try_cflags=
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ then
+ AC_MSG_CHECKING(which $CC option to use)
+ cf_save_CFLAGS="$CFLAGS"
+ for CC_SHARED_OPTS in -fPIC -fpic ''
+ do
+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
+ AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
+ done
+ AC_MSG_RESULT($CC_SHARED_OPTS)
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in #(vi
+ aix4.[3-9]*|aix[[5-7]]*) #(vi
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ else
+ # CC_SHARED_OPTS='-qpic=large -G'
+ # perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ fi
+ ;;
+ beos*) #(vi
+ MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
+ ;;
+ cygwin*) #(vi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ msys*) #(vi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=msysdll
+ cf_cv_shlib_version_infix=msysdll
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ darwin*) #(vi
+ cf_try_cflags="no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
+ cf_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no)
+ LDFLAGS=$cf_save_LDFLAGS])
+ if test $cf_cv_ldflags_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ ;;
+ hpux[[7-8]]*) #(vi
+ # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='+Z'
+ fi
+ MK_SHARED_LIB='${LD} -b -o $[@]'
+ INSTALL_LIB="-m 555"
+ ;;
+ hpux*) #(vi
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,${libdir}'
+ fi
+ MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ interix*)
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_shared_soname='`basename $@`'
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
+ ;;
+ irix*) #(vi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ mingw*) #(vi
+ cf_cv_shlib_version=mingw
+ cf_cv_shlib_version_infix=mingw
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,--enable-auto-import"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ openbsd[[2-9]].*|mirbsd*) #(vi
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ nto-qnx*|openbsd*|freebsd[[12]].*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ dragonfly*|freebsd*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
+ ;;
+ netbsd*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ if test "$cf_cv_shlib_version" = auto; then
+ if test -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=abi
+ else
+ cf_cv_shlib_version=rel
+ fi
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]'
+ fi
+ ;;
+ osf*|mls+*) #(vi
+ # tested with OSF/1 V3.2 and 'cc'
+ # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
+ # link with shared libs).
+ MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`'
+ case $host_os in #(vi
+ osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
+ if test "$cf_cv_enable_rpath" = yes ; then
+ # only way is to set LD_RUN_PATH but no switch for it
+ RUN_PATH=$libdir
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=${libdir}'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ sunos4*) #(vi
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -assert pure-text -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ solaris2*) #(vi
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ if test "$GCC" != yes; then
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break])
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
+ MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ fi
+ ;;
+ sysv5uw7*|unix_sv*) #(vi
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -d y -G -o [$]@'
+ ;;
+ *)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in #(vi
+ rel|abi)
+ case "$MK_SHARED_LIB" in #(vi
+ *'-o $[@]') #(vi
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ *)
+ AC_MSG_WARN(ignored --with-shlib-version)
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_try_cflags"
+ then
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+#include <stdio.h>
+int main(int argc, char *argv[[]])
+{
+ printf("hello\n");
+ return (argv[[argc-1]] == 0) ;
+}
+EOF
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_opt in $cf_try_cflags
+ do
+ CFLAGS="$cf_save_CFLAGS -$cf_opt"
+ AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
+ if AC_TRY_EVAL(ac_compile); then
+ AC_MSG_RESULT(yes)
+ cf_save_CFLAGS="$CFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+
+ # RPATH_LIST is a colon-separated list of directories
+ test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
+ test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
+
+ test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
+
+ CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
+ CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB)
+
+ AC_SUBST(CC_SHARED_OPTS)
+ AC_SUBST(LD_RPATH_OPT)
+ AC_SUBST(LD_SHARED_OPTS)
+ AC_SUBST(MK_SHARED_LIB)
+ AC_SUBST(RM_SHARED_OPTS)
+
+ AC_SUBST(LINK_PROGS)
+ AC_SUBST(LINK_TESTS)
+
+ AC_SUBST(EXTRA_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS2)
+
+ AC_SUBST(INSTALL_LIB)
+ AC_SUBST(RPATH_LIST)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
+dnl ----------------
+dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for
+dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
+dnl option.
+dnl
+dnl $1 is the default that should be used for "$cf_cv_shlib_version".
+dnl If missing, use "rel".
+define([CF_SHARED_SONAME],
+[
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1)
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $[@]`'
+ fi
+])
+dnl ---------------------------------------------------------------------------
dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
dnl --------------
dnl Construct a search-list for a nonstandard header/lib-file
@@ -3492,7 +4128,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51
+dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53
dnl ---------------
dnl Define several useful symbols derived from the VERSION file. A separate
dnl file is preferred to embedding the version numbers in various scripts.
@@ -3557,7 +4193,7 @@ else
fi
# show the actual data that we have for versions:
-CF_VERBOSE(VERSION $VERSION)
+CF_VERBOSE(ABI VERSION $VERSION)
CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR)
CF_VERBOSE(VERSION_MINOR $VERSION_MINOR)
CF_VERBOSE(VERSION_PATCH $VERSION_PATCH)
@@ -3611,6 +4247,26 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's ABI to be overridden. Generally this happens when a
+dnl packager has incremented the ABI past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive a corresponding {package}_ABI
+dnl symbol.
+AC_DEFUN([CF_WITH_ABI_VERSION],[
+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+AC_ARG_WITH(abi-version,
+[ --with-abi-version=XXX override derived ABI version],
+[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
+ cf_cv_abi_version=$withval])
+ CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
+ifelse($1,,,[
+$1_ABI=$cf_cv_abi_version
+])
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38
dnl ------------------
dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses
@@ -3665,7 +4321,7 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32
+dnl CF_WITH_LIBTOOL version: 30 updated: 2013/09/07 13:54:05
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
@@ -3735,7 +4391,14 @@ ifdef([AC_PROG_LIBTOOL],[
CF_PATH_SYNTAX(with_libtool)
LIBTOOL=$with_libtool
else
- AC_PATH_PROG(LIBTOOL,libtool)
+ AC_CHECK_TOOLS(LIBTOOL,[libtool glibtool],none)
+ CF_LIBTOOL_VERSION
+ if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
+ then
+ CF_FORGET_TOOL(LIBTOOL)
+ AC_CHECK_TOOLS(LIBTOOL,[glibtool],none)
+ CF_LIBTOOL_VERSION
+ fi
fi
if test -z "$LIBTOOL" ; then
AC_MSG_ERROR(Cannot find libtool)
@@ -3751,22 +4414,12 @@ ifdef([AC_PROG_LIBTOOL],[
LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
LIB_PREP=:
- # Show the version of libtool
- AC_MSG_CHECKING(version of libtool)
-
- # Save the version in a cache variable - this is not entirely a good
- # thing, but the version string from libtool is very ugly, and for
- # bug reports it might be useful to have the original string. "("
- cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
- AC_MSG_RESULT($cf_cv_libtool_version)
- if test -z "$cf_cv_libtool_version" ; then
- AC_MSG_ERROR(This is not GNU libtool)
- fi
+ CF_CHECK_LIBTOOL_VERSION
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in #(vi
- cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
+ cygwin*|msys*|mingw32*|uwin*|aix[[4-7]]) #(vi
LT_UNDEF=-no-undefined
;;
esac
@@ -3865,6 +4518,108 @@ CF_NO_LEAKS_OPTION(purify,
AC_SUBST(LINK_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's release-version to be overridden. Generally this happens when a
+dnl packager has incremented the release-version past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR
+dnl and {package}_MINOR symbols
+dnl symbol.
+AC_DEFUN([CF_WITH_REL_VERSION],[
+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+AC_ARG_WITH(rel-version,
+[ --with-rel-version=XXX override derived release version],
+[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval)
+ cf_cv_rel_version=$withval])
+ifelse($1,,[
+ CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version)
+],[
+ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
+ $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
+ CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
+ CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_SHARED_OR_LIBTOOL version: 5 updated: 2013/09/02 09:17:44
+dnl -------------------------
+dnl Provide shared libraries using either autoconf macros (--with-shared) or
+dnl using the external libtool script (--with-libtool).
+dnl
+dnl $1 = program name (all caps preferred)
+dnl $1 = release version
+dnl $2 = ABI version
+define([CF_WITH_SHARED_OR_LIBTOOL],[
+
+REL_VERSION=$2
+ABI_VERSION=$3
+cf_cv_rel_version=$REL_VERSION
+AC_SUBST(ABI_VERSION)
+AC_SUBST(REL_VERSION)
+
+CF_WITH_REL_VERSION($1)
+CF_WITH_ABI_VERSION
+
+LIB_MODEL=static
+DFT_LWR_MODEL=$LIB_MODEL
+LIBTOOL_MAKE="#"
+
+# use to comment-out makefile lines
+MAKE_NORMAL=
+MAKE_STATIC=
+MAKE_SHARED="#"
+
+CF_WITH_LIBTOOL
+
+LIB_CREATE="$LIB_CREATE \[$]@"
+
+if test "$with_libtool" = "yes" ; then
+ OBJEXT="lo"
+ LIB_MODEL=libtool
+ DFT_LWR_MODEL=$LIB_MODEL
+ LIBTOOL_MAKE=
+ CF_WITH_LIBTOOL_OPTS
+ MAKE_NORMAL="#"
+ MAKE_STATIC="#"
+ MAKE_SHARED=
+else
+ AC_MSG_CHECKING(if you want to build shared libraries)
+ AC_ARG_WITH(shared,
+ [ --with-shared generate shared-libraries],
+ [with_shared=$withval],
+ [with_shared=no])
+ AC_MSG_RESULT($with_shared)
+ if test "$with_shared" = "yes" ; then
+ LIB_MODEL=shared
+ DFT_LWR_MODEL=$LIB_MODEL
+ CF_SHARED_OPTS
+ LIB_PREP=:
+ LIB_CREATE="[$]MK_SHARED_LIB"
+ CFLAGS="$CFLAGS $CC_SHARED_OPTS"
+ MAKE_NORMAL="#"
+ MAKE_STATIC="#"
+ MAKE_SHARED=
+ fi
+fi
+
+LIB_SUFFIX=
+CF_LIB_SUFFIX($LIB_MODEL, DFT_LIB_SUFFIX, DFT_DEP_SUFFIX)
+LIB_SUFFIX=$DFT_LIB_SUFFIX
+
+AC_SUBST(DFT_LWR_MODEL)
+AC_SUBST(DFT_LIB_SUFFIX)
+AC_SUBST(DFT_DEP_SUFFIX)
+AC_SUBST(LIB_MODEL)
+
+AC_SUBST(LIBTOOL_MAKE)
+
+AC_SUBST(MAKE_NORMAL)
+AC_SUBST(MAKE_SHARED)
+AC_SUBST(MAKE_STATIC)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
dnl ----------------
AC_DEFUN([CF_WITH_VALGRIND],[
@@ -3935,7 +4690,7 @@ AC_TRY_LINK([
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
+dnl CF_XOPEN_SOURCE version: 45 updated: 2013/09/07 14:06:25
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -3945,6 +4700,7 @@ dnl Parameters:
dnl $1 is the nominal value for _XOPEN_SOURCE
dnl $2 is the nominal value for _POSIX_C_SOURCE
AC_DEFUN([CF_XOPEN_SOURCE],[
+AC_REQUIRE([AC_CANONICAL_HOST])
cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
@@ -3954,7 +4710,7 @@ case $host_os in #(vi
aix[[4-7]]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin) #(vi
+cygwin|msys) #(vi
cf_XOPEN_SOURCE=600
;;
darwin[[0-8]].*) #(vi
@@ -4053,6 +4809,127 @@ make an error
fi
])
dnl ---------------------------------------------------------------------------
+dnl CF__ADD_SHLIB_RULES version: 4 updated: 2013/07/22 18:49:24
+dnl -------------------
+dnl Append rules for creating, installing, uninstalling and cleaning library.
+dnl In particular, this is needed for shared libraries since there are symbolic
+dnl links which depend on configuration choices.
+dnl
+dnl The logic is controlled by these cache variables:
+dnl $cf_cv_do_symlinks
+dnl $cf_cv_shlib_version
+dnl
+dnl The macro uses variables set by CF__DEFINE_SHLIB_VARS
+dnl
+dnl $1 = makefile to append to
+dnl $2 = model (static, shared, libtool)
+dnl $3 = objects (dependencies)
+dnl $4 = additional libraries needed to link the shared library
+define([CF__ADD_SHLIB_RULES],[
+
+CF__DEFINE_LIB_TARGET
+
+case x$2 in
+xlibtool|xshared) #(vi
+ cf_libdeps="ifelse($4,,,[$4])"
+ ;;
+x*)
+ cf_libdeps=
+ ;;
+esac
+
+cat >>$1 <<CF_EOF
+
+# generated by CF__ADD_SHLIB_RULES
+# libmodel: $2
+# symlinks: $cf_cv_do_symlinks
+# shlibver: $cf_cv_shlib_version
+
+CF_EOF
+
+cat >>$1 <<CF_EOF
+$cf_libname :: \\
+CF_EOF
+
+cat >>$1 <<CF_EOF
+ $3
+ @echo linking \[$]@
+ \$(LIBTOOL_CREATE) $3 $cf_libdeps
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ \$(LN_S) $cf_libname $cf_liblink
+ \$(LN_S) $cf_liblink $cf_libroot
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+
+install \\
+install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
+
+\$(DESTDIR)\$(libdir)/$cf_libname :: \\
+ \$(DESTDIR)\$(libdir) \\
+ $3
+ @echo linking \[$]@
+ \$(LIBTOOL_CREATE) $3 $cf_libdeps
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
+CF_EOF
+fi
+
+if test x$2 = xshared
+then
+cat >>$1 <<CF_EOF
+ - test -z "\$(DESTDIR)" && /sbin/ldconfig
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+
+uninstall \\
+uninstall.libs ::
+ @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
+
+clean \\
+clean.libs ::
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ -rm -f $cf_libroot
+ -rm -f $cf_liblink
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+ -rm -f $cf_libname
+
+mostlyclean::
+ -rm -f $3
+# end generated by CF__ADD_SHLIB_RULES
+CF_EOF
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
dnl ---------------
dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
@@ -4073,6 +4950,72 @@ char * XCursesProgramName = "test";
#endif
])
dnl ---------------------------------------------------------------------------
+dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
+dnl ---------------
+dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
+dnl are both available.
+define([CF__CURSES_HEAD],[
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header:-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+])
+dnl ---------------------------------------------------------------------------
+dnl CF__DEFINE_LIB_TARGET version: 1 updated: 2013/07/22 18:27:50
+dnl ---------------------
+define([CF__DEFINE_LIB_TARGET],[
+cf_libname=\${LIB_BASENAME}
+cf_liblink=$cf_libname
+cf_libroot=$cf_libname
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+ case "x$cf_cv_shlib_version" in #(vi
+ xrel) #(vi
+ cf_liblink="\${LIB_ABI_NAME}"
+ cf_libname="\${LIB_REL_NAME}"
+ ;;
+ xabi)
+ cf_liblink="\${LIB_REL_NAME}"
+ cf_libname="\${LIB_ABI_NAME}"
+ ;;
+ esac
+fi
+LIB_TARGET=$cf_libname
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF__DEFINE_SHLIB_VARS version: 2 updated: 2013/07/27 17:38:32
+dnl ---------------------
+dnl Substitute makefile variables useful for CF__ADD_SHLIB_RULES.
+dnl
+dnl The substitution requires these variables:
+dnl LIB_PREFI - "lib"
+dnl LIB_ROOTNAME - "foo"
+dnl LIB_SUFFIX - ".so"
+dnl REL_VERSION - "5.0"
+dnl ABI_VERSION - "4.2.4"
+define([CF__DEFINE_SHLIB_VARS],[
+CF__DEFINE_LIB_TARGET
+SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
+LIB_BASENAME = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
+LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}\\
+LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}\\
+LIB_TARGET = $LIB_TARGET\\
+RM_SHARED_OPTS = $RM_SHARED_OPTS\\
+# end CF__DEFINE_SHLIB_VARS"
+AC_SUBST(SET_SHLIB_VARS)
+AC_SUBST(LIB_TARGET)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF__ICONV_BODY version: 2 updated: 2007/07/26 17:35:47
dnl --------------
dnl Test-code needed for iconv compile-checks
@@ -4090,6 +5033,22 @@ define([CF__ICONV_HEAD],[
#include <iconv.h>]
)dnl
dnl ---------------------------------------------------------------------------
+dnl CF__INIT_SHLIB_RULES version: 2 updated: 2013/07/27 17:38:32
+dnl --------------------
+dnl The third parameter to AC_OUTPUT, used to pass variables needed for
+dnl CF__ADD_SHLIB_RULES.
+define([CF__INIT_SHLIB_RULES],[
+ABI_VERSION="$ABI_VERSION"
+REL_VERSION="$REL_VERSION"
+LIB_MODEL="$LIB_MODEL"
+LIB_PREFIX="$LIB_PREFIX"
+LIB_ROOTNAME="$LIB_ROOTNAME"
+DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
+RM_SHARED_OPTS="$RM_SHARED_OPTS"
+cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_shlib_version="$cf_cv_shlib_version"
+])
+dnl ---------------------------------------------------------------------------
dnl CF__INTL_BODY version: 1 updated: 2007/07/26 17:35:47
dnl -------------
dnl Test-code needed for libintl compile-checks
OpenPOWER on IntegriCloud