diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/configure.in b/configure.in index c7c07ccc..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.1) +AM_INIT_AUTOMAKE("Linux-PAM", 1.1.3) AC_PREREQ(2.61) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -84,6 +84,7 @@ AC_PROG_MAKE_SET AC_PROG_LIBTOOL AM_PROG_CC_C_O PAM_LD_AS_NEEDED +PAM_LD_NO_UNDEFINED PAM_LD_O1 dnl Largefile support @@ -128,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 @@ -361,10 +391,14 @@ AM_CONDITIONAL([HAVE_AUDIT_TTY_STATUS], [test "x$HAVE_AUDIT_TTY_STATUS" = xyes]) AC_CHECK_HEADERS(xcrypt.h crypt.h) +AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], + [crypt_libs="xcrypt crypt"], + [crypt_libs="crypt"]) + BACKUP_LIBS=$LIBS -AC_SEARCH_LIBS([crypt],[xcrypt crypt], LIBCRYPT="-l$ac_lib", LIBCRYPT="") +AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="-l$ac_lib", LIBCRYPT="") AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) -Libs=$BACKUP_LIBS +LIBS=$BACKUP_LIBS AC_SUBST(LIBCRYPT) if test "$LIBCRYPT" = "-lxcrypt" -a "$ac_cv_header_xcrypt_h" = "yes" ; then AC_DEFINE([HAVE_LIBXCRYPT], 1, [Define to 1 if xcrypt support should be compiled in.]) @@ -389,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="") @@ -458,7 +493,7 @@ AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_CHECK_FUNCS(fseeko gethostname gettimeofday lckpwdf mkdir select) AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname) -AC_CHECK_FUNCS(getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) +AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) AC_CHECK_FUNCS(getgrouplist getline getdelim) AC_CHECK_FUNCS(inet_ntop inet_pton ruserok_af) |