summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-07-15 10:30:50 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-07-15 10:30:50 +0000
commit26f17aab3f2a7dd8e2811ca760357355f8dd836a (patch)
tree6abbd43b02a96b3a176467c3d496ef32de5120f4 /configure.in
parent0c77a70fbf6549ccf6edf7627aab020c4501f341 (diff)
Relevant BUGIDs: none
Purpose of commit: cleanup Commit summary: --------------- Fix AC_DEFINE usage in configure.in
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in80
1 files changed, 59 insertions, 21 deletions
diff --git a/configure.in b/configure.in
index 9012b30a..36822017 100644
--- a/configure.in
+++ b/configure.in
@@ -13,8 +13,6 @@ LIBPAM_VERSION_MINOR=81
AC_SUBST(LIBPAM_VERSION_MAJOR)
AC_SUBST(LIBPAM_VERSION_MINOR)
-AC_DEFINE(LIBPAM_VERSION_MAJOR)
-AC_DEFINE(LIBPAM_VERSION_MINOR)
dnl
dnl By default, everything under PAM is installed under the root fs.
@@ -63,24 +61,40 @@ dnl
dnl lots of debugging information goes to /tmp/pam-debug.log
AC_ARG_ENABLE(debug,
[ --enable-debug specify you are building with debugging on],
- WITH_DEBUG=yes ; AC_DEFINE(DEBUG) , WITH_DEBUG=no)
+ WITH_DEBUG=yes ; AC_DEFINE([DEBUG],,
+ [lots of stuff gets written to /tmp/pam-debug.log]),
+ WITH_DEBUG=no)
AC_SUBST(WITH_DEBUG)
AC_ARG_ENABLE(memory-debug,
[ --enable-memory-debug specify you want every malloc etc. call tracked],
- WITH_MEMORY_DEBUG=yes ; AC_DEFINE(MEMORY_DEBUG) , WITH_MEMORY_DEBUG=no)
+ WITH_MEMORY_DEBUG=yes ; AC_DEFINE([MEMORY_DEBUG],,
+ [Every malloc etc. call will be tracked]) , WITH_MEMORY_DEBUG=no)
AC_SUBST(WITH_MEMORY_DEBUG)
+AH_VERBATIM([_MEMORY_DEBUG],
+[#ifdef MEMORY_DEBUG
+/*
+ * this is basically a hack - we need to include a semiarbitrary
+ * number of headers to ensure that we don't get silly prototype/macro
+ * confusion.
+ */
+# include <string.h>
+# include <stdlib.h>
+# include <security/pam_malloc.h>
+#endif /* MEMORY_DEBUG */])
dnl build specially named libraries (for debugging purposes)
AC_ARG_ENABLE(libdebug,
[ --enable-libdebug specify you are building debugging libraries],
- WITH_LIBDEBUG=yes ; AC_DEFINE(WITH_LIBDEBUG) , WITH_LIBDEBUG=no)
+ WITH_LIBDEBUG=yes ; AC_DEFINE([WITH_LIBDEBUG],,
+ [build libraries with different names (suffixed with 'd')]) , WITH_LIBDEBUG=no)
AC_SUBST(WITH_LIBDEBUG)
dnl have prelude support
AC_ARG_ENABLE(prelude,
[ --enable-prelude build prelude ids support],
- WITH_PRELUDE=yes ; AC_DEFINE(WITH_PRELUDE), WITH_PRELUDE=no)
+ WITH_PRELUDE=yes ; AC_DEFINE([WITH_PRELUDE],,
+ [Build with prelude ids support]), WITH_PRELUDE=no)
AC_SUBST(WITH_PRELUDE)
dnl packaging convenience
@@ -128,12 +142,15 @@ AC_SUBST(MANDIR)
AC_ARG_ENABLE(pamlocking,
[ --enable-pamlocking configure libpam to observe a global authentication lock],
- WITH_PAMLOCKING=yes ; AC_DEFINE(PAM_LOCKING) , WITH_PAMLOCKING=no)
+ WITH_PAMLOCKING=yes ; AC_DEFINE([PAM_LOCKING],,
+ [libpam should observe a global authentication lock]),
+ WITH_PAMLOCKING=no)
AC_SUBST(WITH_PAMLOCKING)
AC_ARG_ENABLE(read-both-confs,
[ --enable-read-both-confs read both /etc/pam.d and /etc/pam.conf files],
- AC_DEFINE(PAM_READ_BOTH_CONFS))
+ AC_DEFINE([PAM_READ_BOTH_CONFS],,
+ [read both /etc/pam.d and /etc/pam.conf files]))
AC_SUBST(PAM_READ_BOTH_CONFS)
AC_ARG_ENABLE(static-libpam, [ --enable-static-libpam build a libpam.a library],
@@ -178,7 +195,8 @@ exit(1);
pam_mail_spool="\"/var/spool/mail\"",
pam_mail_spool="\"/var/spool/mail\"")
fi
-AC_DEFINE_UNQUOTED(PAM_PATH_MAILDIR, $pam_mail_spool)
+AC_DEFINE_UNQUOTED(PAM_PATH_MAILDIR, $pam_mail_spool,
+ [Path where mails are stored])
dnl Checks for libraries.
AC_CHECK_LIB(c, __libc_sched_setscheduler, PAM_NEEDS_LIBC=, PAM_NEEDS_LIBC=-lc)
@@ -196,34 +214,43 @@ dnl
dnl At least on Solaris, the existing libcrack must be dynamic.
dnl Ought to introduce a check for this.
dnl
-AC_CHECK_LIB(crack, FascistCheck, HAVE_LIBCRACK=yes ; AC_DEFINE(HAVE_LIBCRACK),
+AC_CHECK_LIB(crack, FascistCheck, HAVE_LIBCRACK=yes ;
+ AC_DEFINE([HAVE_LIBCRACK],,[Define to 1 if you have the `crack' library (-lcrack).]),
HAVE_LIBCRACK=no)
AC_SUBST(HAVE_LIBCRACK)
-AC_CHECK_LIB(crypt, crypt, HAVE_LIBCRYPT=yes ; AC_DEFINE(HAVE_LIBCRYPT),
+AC_CHECK_LIB(crypt, crypt, HAVE_LIBCRYPT=yes ;
+ AC_DEFINE([HAVE_LIBCRYPT],,[Define to 1 if you have the `crypt' library (-lcrypt).]),
HAVE_LIBCRYPT=no)
AC_SUBST(HAVE_LIBCRYPT)
-AC_CHECK_LIB(util, logwtmp, HAVE_LIBUTIL=yes ; AC_DEFINE(HAVE_LIBUTIL),
+AC_CHECK_LIB(util, logwtmp, HAVE_LIBUTIL=yes ;
+ AC_DEFINE([HAVE_LIBUTIL],,[Define to 1 if you have the `util' library (-lutil).]),
HAVE_LIBUTIL=no)
AC_SUBST(HAVE_LIBUTIL)
-AC_CHECK_LIB(ndbm, dbm_store, HAVE_LIBNDBM=yes ; AC_DEFINE(HAVE_LIBNDBM),
+AC_CHECK_LIB(ndbm, dbm_store, HAVE_LIBNDBM=yes ;
+ AC_DEFINE([HAVE_LIBNDBM],,[Define to 1 if you have the `ndbm' library (-lndbm).]),
HAVE_LIBNDBM=no)
AC_SUBST(HAVE_LIBNDBM)
-AC_CHECK_LIB(db, dbm_store, HAVE_LIBDB=yes ; AC_DEFINE(HAVE_LIBDB),
+AC_CHECK_LIB(db, dbm_store, HAVE_LIBDB=yes ;
+ AC_DEFINE([HAVE_LIBDB],,[Define to 1 if you have the `db' library (-ldb).]),
HAVE_LIBDB=no)
if test x$HAVE_LIBDB != xyes ; then
- AC_CHECK_LIB(db, db_create, HAVE_LIBDB=yes ; AC_DEFINE(HAVE_LIBDB),
+ AC_CHECK_LIB(db, db_create, HAVE_LIBDB=yes ;
+ AC_DEFINE([HAVE_LIBDB],,[Define to 1 if you have the `db' library (-ldb).]),
HAVE_LIBDB=no)
fi
AC_SUBST(HAVE_LIBDB)
-AC_CHECK_LIB(fl, yylex, yyterminate, HAVE_LIBFL=yes ; AC_DEFINE(HAVE_LIBFL),
+AC_CHECK_LIB(fl, yylex, yyterminate, HAVE_LIBFL=yes ;
+ AC_DEFINE([HAVE_LIBFL],,[Define to 1 if you have the `fl' library (-lfl).]),
HAVE_LIBFL=no)
AC_SUBST(HAVE_LIBFL)
-AC_CHECK_LIB(nsl, yp_maplist, HAVE_LIBNSL=yes ; AC_DEFINE(HAVE_LIBNSL),
+AC_CHECK_LIB(nsl, yp_maplist, HAVE_LIBNSL=yes ;
+ AC_DEFINE([HAVE_LIBNSL],,[Define to 1 if you have the `nsl' library (-lnsl).]),
HAVE_LIBNSL=no)
AC_SUBST(HAVE_LIBNSL)
-AC_CHECK_LIB(selinux, getfilecon, HAVE_LIBSELINUX=yes ; AC_DEFINE(HAVE_LIBSELINUX),
+AC_CHECK_LIB(selinux, getfilecon, HAVE_LIBSELINUX=yes ;
+ AC_DEFINE([HAVE_LIBSELINUX],,[Define to 1 if you have the `nsl' library (-lnsl).]),
HAVE_LIBSELINUX=no)
AC_SUBST(HAVE_LIBSELINUX)
@@ -233,15 +260,18 @@ fi
if test $HAVE_LIBNSL = yes ; then
pwdblibs="$pwdblibs -lnsl"
fi
-AC_CHECK_LIB(pwdb, pwdb_db_name, HAVE_LIBPWDB=yes ; AC_DEFINE(HAVE_LIBPWDB),
+AC_CHECK_LIB(pwdb, pwdb_db_name, HAVE_LIBPWDB=yes ;
+ AC_DEFINE([HAVE_LIBPWDB],,[Define to 1 if you have the `pwdb' library (-lpwdb).]),
HAVE_LIBPWDB=no,$pwdblibs)
AC_SUBST(HAVE_LIBPWDB)
unset pwdblibs
-AC_CHECK_LIB(fl, yywrap, HAVE_LIBFLEX=yes ; AC_DEFINE(HAVE_LIBFLEX),
+AC_CHECK_LIB(fl, yywrap, HAVE_LIBFLEX=yes ;
+ AC_DEFINE([HAVE_LIBFLEX],,[Define to 1 if you have the `fl' library (-lfl).]),
HAVE_LIBFLEX=no)
AC_SUBST(HAVE_LIBFLEX)
-AC_CHECK_LIB(l, yywrap, HAVE_LIBLEX=yes ; AC_DEFINE(HAVE_LIBLEX),
+AC_CHECK_LIB(l, yywrap, HAVE_LIBLEX=yes ;
+ AC_DEFINE([HAVE_LIBLEX],,[Define to 1 if you have the `l' library (-ll).]),
HAVE_LIBLEX=no)
AC_SUBST(HAVE_LIBLEX)
@@ -253,6 +283,14 @@ AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h sys
dnl Linux wants features.h in some of the source files.
AC_CHECK_HEADERS(features.h)
+AH_VERBATIM([_HAVE_FEATURES_H],
+[/* GNU systems as a class, all have the feature.h file */
+#ifdef HAVE_FEATURES_H
+# define _SVID_SOURCE
+# define _BSD_SOURCE
+# define _GNU_SOURCE
+# include <features.h>
+#endif /* HAVE_FEATURES_H */])
dnl For module/pam_cracklib
AC_CHECK_HEADERS(crypt.h)