dnl Process this file with autoconf to produce a configure script. AC_INIT(src/actions.c) AC_CONFIG_AUX_DIR(config) AC_CANONICAL_SYSTEM echo "Found the host os: $host_os." dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET dnl Host specific defines. case "$host_os" in linux-gnu) CFLAGS="$CFLAGS -Wall" ;; solaris2.*) CFLAGS="$CFLAGS -Wall -DSOLARIS" LIBS="$LIBS -lnsl -lsocket -lresolv" ;; esac AC_ARG_ENABLE( debug, [ --enable-debug Enable debug options throughout the code.] ) if test "x$enable_debug" = xyes; then CFLAGS="$CFLAGS -DDEBUG" fi dnl Checks for libraries. AC_CHECK_LIB(pam,pam_start, LIBS="$LIBS -lpam" , AC_MSG_ERROR(pam is required by pgina_pam)) AC_CHECK_LIB(crypto, CRYPTO_set_id_callback, LIBS="$LIBS -lcrypto" , AC_MSG_ERROR(libcrypto is required by pgina_pam)) AC_CHECK_LIB(ssl, SSL_write, LIBS="$LIBS -lssl" , AC_MSG_ERROR(openssl is required by pgina_pam) ) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(syslog.h unistd.h sys/stat.h openssl/ssl.h openssl/err.h openssl/rand.h \ security/pam_appl.h pwd.h grp.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_FUNC_SETPGRP AC_CHECK_FUNCS(strdup) AC_OUTPUT(Makefile src/Makefile)