# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(libgss, 1.0, support@likewisesoftware.com) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([include/config.h]) AM_CPPFLAGS="" AM_CFLAGS="" AM_LDFLAGS="" # crypto lib AC_ARG_WITH([crypto], [AC_HELP_STRING([--with-crypto=], [use crypto located in prefix ])], [ CRYPTO_INCLUDES="-I$withval/include" CRYPTO_LDFLAGS="-L$withval/lib" ]) AC_ARG_WITH([crypto-includes], [AC_HELP_STRING([--with-crypto-includes=], [use crypto includes located in ])], [ CRYPTO_INCLUDES="-I$withval" ]) AC_ARG_WITH([crypto-libs], [AC_HELP_STRING([--with-crypto-libs=], [use crypto libs located in ])], [ CRYPTO_LDFLAGS="-L$withval" ]) CRYPTO_LIBS="-lcrypto" AC_SUBST(CRYPTO_INCLUDES) AC_SUBST(CRYPTO_LDFLAGS) AC_SUBST(CRYPTO_LIBS) # debugging AC_ARG_ENABLE([debug], [AC_HELP_STRING([--enable-debug], [enable debugging (default: disabled)])], [ if test x"$enableval" = x"yes" then AM_CFLAGS="$AM_CFLAGS -g -O0" AM_CPPFLAGS="$AM_CPPFLAGS -DDEBUG" fi ]) CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_GNU_SOURCE" AM_CPPFLAGS="$AM_CPPFLAGS -I${top_srcdir}/include" AM_CFLAGS="$AM_CFLAGS -Wall -Werror -fno-strict-aliasing" AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([inttypes.h arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdint.h stdlib.h stdbool.h string.h strings.h sys/socket.h syslog.h unistd.h sys/types.h fcntl.h iconv.h sys/stat.h time.h sys/time.h pthread.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_HEADER_TIME AC_STRUCT_TM # Check for basic types AC_CHECK_TYPES([int8, int16, int32, int64], [], [], [#include #if __ia64 #include #endif]) AC_CHECK_TYPES([uint8, uint16, uint32, uint64]) AC_CHECK_SIZEOF([long long int]) AC_CHECK_SIZEOF([long int]) # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_FUNC_STRERROR_R AC_CHECK_FUNCS([atexit bzero localtime_r memset select socket strchr strerror vsyslog rpl_realloc rpl_malloc clock_gettime clock_settime settimeofday gettimeofday timegm getgrouplist strtoll __strtoll strtoull __strtoull strtol strtoul]) AC_CHECK_DECLS([isblank], [], [], [#include ]) AC_CHECK_TYPES([wchar16_t], [], [], [AC_INCLUDES_DEFAULT #ifdef HAVE_WC16STR_H # include #endif ]) AC_CHECK_LIB([pthread], [pthread_self], [PTHREAD_LIBS="-lpthread"]) AC_SUBST(PTHREAD_LIBS) AC_CONFIG_FILES([Makefile include/Makefile schannel/Makefile ]) AC_OUTPUT