dnl Process this file with autoconf to produce a configure script. AC_INIT(token/skipSpace.c) AC_CONFIG_HEADER(config.h:conf.in) AC_ARG_ENABLE(ssl, [ --disable-ssl=disable ssl.], if test $enableval = no; then echo disable ssl; AC_DEFINE(NO_SSL) disable_ssl=yes fi) osname=`uname -s | sed 's@/@@'` if test X$prefix = XNONE ; then prefix=$ac_default_prefix fi ssltop=$prefix/ssl ssllib=$prefix/ssl dnl Checks for programs. AC_PROG_AWK AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_CC AC_PROG_MAKE_SET SHELL=sh AC_PATH_PROG(SHELL, sh, /bin/sh) AC_PATH_PROG(LD, ld, /usr/bin/ld) PIDFILE=/var/run/bjorb.pid if test ! -d /var/run ; then PIDFILE=/etc/bjorb.pid fi AC_SUBST(PIDFILE) #dnl Checks for header files. AC_CHECK_HEADER($prefix/include/ssl.h, ssltop=$prefix) AC_CHECK_HEADERS(string.h sys/types.h errno.h) #AC_HEADER_STDC #AC_HEADER_SYS_WAIT #AC_CHECK_HEADERS(unistd.h) #dnl Checks for typedefs, structures, and compiler characteristics. #AC_C_CONST #dnl Checks for library functions. #AC_FUNC_VPRINTF #AC_CHECK_FUNCS(select socket) AC_REPLACE_FUNCS(strerror) AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3) AC_MSG_CHECKING(for union wait) AC_CACHE_VAL(make_cv_union_wait, [dnl AC_TRY_LINK([#include #include ], [union wait status; int pid; pid = wait (&status); #ifdef WEXITSTATUS /* Some POSIXoid systems have both the new-style macros and the old union wait type, and they do not work together. If union wait conflicts with WEXITSTATUS et al, we don't want to use it at all. */ if (WEXITSTATUS (status) != 0) pid = -1; #ifdef WTERMSIG /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */ -- blow chunks here -- #endif #endif #ifdef HAVE_WAITPID /* Make sure union wait works with waitpid. */ pid = waitpid (-1, &status, 0); #endif ], [make_cv_union_wait=yes], [make_cv_union_wait=no])]) if test "$make_cv_union_wait" = yes; then AC_DEFINE(HAVE_UNION_WAIT) fi AC_MSG_RESULT($make_cv_union_wait) # with SSL top AC_ARG_WITH(ssltop, [ --with-ssltop=DIR specifies directory to put SSL include.], ssltop=$with_ssltop) AC_SUBST(ssltop) # with SSL lib AC_ARG_WITH(ssllib, [ --with-ssllib=DIR specifies directory to put SSL libbary.], ssllib=$with_ssllib) AC_SUBST(ssllib) dnl Checks for libraries. # shared option SHARED_OPT=-fpic if test X$osname = XBSDOS ; then SHARED_OPT= fi AC_SUBST(SHARED_OPT) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyaddr) # for USA_RESIDENT on FreeBSD if test X$disable_ssl = X; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ssllib" export LD_LIBRARY_PATH AC_MSG_CHECKING([for RSAref library]) saved_LIBS="-L$ssllib -lcrypto -lssl" LIBS="$saved_LIBS -L${LOCALBASE}/lib -lRSAglue -lrsaref" AC_TRY_LINK([], [], [AC_MSG_RESULT(yes); ], [AC_MSG_RESULT(no)]; LIBS="$saved_LIBS") ssllibs="$LIBS" fi deflib() { LIBS="-l$1 $LIBS" AC_DEFINE_UNQUOTED($2) } #dnl Replace `main' with a function in -lcrypto: #AC_CHECK_LIB(crypto, main) #dnl Replace `main' with a function in -lssl: #AC_CHECK_LIB(ssl, main) #AC_CHECK_LIB(c_r,pthread_create, deflib c_r USE_THREAD) #AC_CHECK_LIB(pthreads, pthred_create, deflib pthreads USE_THREAD) AC_SUBST(LIBS) AC_SUBST(ssllibs) AC_OUTPUT(util/Makefile Makefile token/Makefile common.h) perl tools/make_path_h path.h Makefile