git.fiddlerwoaroof.com
configure.ac
e993f970
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.69])
 AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
dd920112
 AC_CONFIG_SRCDIR([config.h.in])
e993f970
 AC_CONFIG_HEADERS([config.h])
 
 # Checks for programs.
 AC_PROG_CC
 
 # Checks for libraries.
 
 # Checks for header files.
 
 # Checks for typedefs, structures, and compiler characteristics.
 
 # Checks for library functions.
 
b5ea7efd
 # Implementation of the --with-pam-module-directory switch.
 DEFAULT_PAM_MODULE_DIRECTORY="${libdir}/security"
 AC_ARG_WITH(pam-module-directory,
     [  --with-pam-module-directory=NAME
         Use NAME as installation directory for PAM modules ],
     PAM_MODULE_DIRECTORY="$withval",
     PAM_MODULE_DIRECTORY="$DEFAULT_PAM_MODULE_DIRECTORY")
 AC_SUBST(PAM_MODULE_DIRECTORY)
 
f98218ea
 AC_CHECK_HEADERS([openssl/hmac.h openssl/evp.h],,[AC_MSG_ERROR("Can't find Openssl")])
78d9ed38
 AC_CHECK_LIB([ssl], [SSL_library_init],,[AC_MSG_ERROR("Can't find -lssl")])
 AC_CHECK_LIB([crypto], [EVP_EncryptInit],,[AC_MSG_ERROR("Can't find -lcrypto")])
 
 
e993f970
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
b5ea7efd
 
78d9ed38
 
 
b5ea7efd
 if test "$PAM_MODULE_DIRECTORY" = "$DEFAULT_PAM_MODULE_DIRECTORY"; then
     AC_MSG_WARN([
         **
         ** Warning: using default value ($DEFAULT_PAM_MODULE_DIRECTORY) as
         **          installation directory for PAM module; this is probably not
         **          what you want. Either use the configure flag
         **
         **                      --with-pam-module-directory=DIRECTORY
         **
         **          or copy the newly built pam_dual_control.so into the correct directory
         **          manually. Usually PAM modules are located in /lib/security or /lib64/security.
         **])
 else
     AC_MSG_NOTICE([PAM module installation directory: $PAM_MODULE_DIRECTORY])
 fi