diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 47 |
1 files changed, 36 insertions, 11 deletions
diff --git a/configure.in b/configure.in index ce844702..d09d753f 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([conf/pam_conv1/pam_conv_y.y]) -AM_INIT_AUTOMAKE("Linux-PAM", 1.1.2) +AM_INIT_AUTOMAKE("Linux-PAM", 1.1.3) AC_PREREQ(2.61) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -84,14 +84,9 @@ AC_PROG_MAKE_SET AC_PROG_LIBTOOL AM_PROG_CC_C_O PAM_LD_AS_NEEDED +PAM_LD_NO_UNDEFINED PAM_LD_O1 -if test x"$cross_compiling" = xyes; then - AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) -else - CC_FOR_BUILD="$CC" -fi - dnl Largefile support AC_SYS_LARGEFILE @@ -134,6 +129,35 @@ if eval "test x$CC = xicc"; then done fi +if test "x${CC_FOR_BUILD+set}" != "xset" ; then + if test "x$cross_compiling" = "xyes" ; then + AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) + else + CC_FOR_BUILD=${CC} + fi +fi +AC_MSG_CHECKING([for CC_FOR_BUILD]) +AC_MSG_RESULT([$CC_FOR_BUILD]) +AC_SUBST(CC_FOR_BUILD) + +if test "x${BUILD_CFLAGS+set}" != "xset" ; then + if test "x$cross_compiling" = "xyes" ; then + BUILD_CFLAGS= + else + BUILD_CFLAGS=${CFLAGS} + fi +fi +AC_SUBST(BUILD_CFLAGS) + +if test "x${BUILD_LDFLAGS+set}" != "xset" ; then + if test "x$cross_compiling" = "xyes" ; then + BUILD_LDFLAGS= + else + BUILD_LDFLAGS=${LDFLAGS} + fi +fi +AC_SUBST(BUILD_LDFLAGS) + AC_C___ATTRIBUTE__ dnl @@ -399,10 +423,11 @@ AC_ARG_WITH([db-uniquename], AS_HELP_STRING([--with-db-uniquename=extension],[Unique name for db libraries and functions.])) if test x"$WITH_DB" != xno ; then if test x"$WITH_DB" = xyes -o x"$WITH_DB" = xdb ; then - AC_CHECK_LIB([db$with_db_uniquename], [db_create$with_db_uniquename], LIBDB="-ldb$with_db_uniquename", LIBDB="") - if test -z "$LIBDB" ; then - AC_CHECK_LIB([db$with_db_uniquename], [dbm_store$with_db_uniquename], LIBDB="-ldb$with_db_uniquename", LIBDB="") - fi + old_libs=$LIBS + LIBS="$LIBS -ldb$with_db_uniquename" + AC_CHECK_FUNCS([db_create$with_db_uniquename db_create dbm_store$with_db_uniquename dbm_store], + [LIBDB="-ldb$with_db_uniquename"; break]) + LIBS=$old_libs fi if test -z "$LIBDB" ; then AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="") |