1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([Citadel], [902], [http://www.citadel.org/])
4 AC_REVISION([$Revision: 5108 $])
6 AC_CONFIG_HEADER(sysdep.h)
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_PREFIX_DEFAULT(/usr/local/citadel)
9 if test "$prefix" = NONE; then
10 AC_DEFINE_UNQUOTED(CTDLDIR, "$ac_default_prefix", [define this to the Citadel home directory])
11 ssl_dir="$ac_default_prefix/keys"
12 localedir=$ac_default_prefix
14 AC_DEFINE_UNQUOTED(CTDLDIR, "$prefix", [define this to the Citadel home directory])
15 ssl_dir="$prefix/keys"
19 dnl Make sure we see all GNU and Solaris extensions.
23 dnl Checks for the Datadir
25 [ --with-datadir directory to store the databases under],
26 [ if test "x$withval" != "xno" ; then
27 AC_DEFINE(HAVE_DATA_DIR,[],[use alternate database location?])
28 AC_DEFINE_UNQUOTED(DATA_DIR, "$withval",[define, if the user suplied a data-directory to use.])
29 MAKE_DATA_DIR=$withval
30 AC_SUBST(MAKE_DATA_DIR)
36 dnl Checks for the helpDatadir
38 [ --with-helpdir directory to store the helpfiles under],
39 [ if test "x$withval" != "xno" ; then
40 AC_DEFINE(HAVE_HELP_DIR,[],[use alternate database location?])
41 AC_DEFINE_UNQUOTED(HELP_DIR, "$withval",[define, if the user suplied a helpfile-directory to use.])
42 MAKE_HELP_DIR=$withval
43 AC_SUBST(MAKE_HELP_DIR)
48 dnl Checks for the Static Datadir
49 AC_ARG_WITH(staticdatadir,
50 [ --with-staticdatadir directory to store citadels system messages under],
51 [ if test "x$withval" != "xno" ; then
52 AC_DEFINE(HAVE_STATICDATA_DIR, [], [should we activate an alternate static text location?])
53 AC_DEFINE_UNQUOTED(STATICDATA_DIR, "$withval", [where do we put our static text data?])
54 MAKE_STATICDATA_DIR=$withval
55 AC_SUBST(MAKE_STATICDATA_DIR)
61 dnl Checks for the SSLdir
62 dnl this is a bit different than the rest,
63 dnl because of the citadel used to have a keys/ subdir.
65 [ --with-ssldir directory to store the ssl certificates under],
66 [ if test "x$withval" != "xno" ; then
70 AC_SUBST(MAKE_SSL_DIR)
73 AC_DEFINE_UNQUOTED(SSL_DIR, "$ssl_dir", [were should we put our keys?])
76 dnl Checks for the spooldir
78 [ --with-spooldir directory to keep queues under],
79 [ if test "x$withval" != "xno" ; then
80 AC_DEFINE(HAVE_SPOOL_DIR, [], [enable alternate spool dir?])
81 AC_DEFINE_UNQUOTED(SPOOL_DIR,"$withval", [where do we place our spool dirs?])
82 MAKE_SPOOL_DIR=$withval
83 AC_SUBST(MAKE_SPOOL_DIR)
89 dnl Checks for the Configdir
90 AC_ARG_WITH(sysconfdir,
91 [ --with-sysconfdir directory to store the configs under],
92 [ if test "x$withval" != "xno" ; then
93 AC_DEFINE(HAVE_ETC_DIR, [], [should we search our system config in an alternate place?])
94 AC_DEFINE_UNQUOTED(ETC_DIR, "$withval", [where to search our config files])
96 AC_SUBST(MAKE_ETC_DIR)
101 dnl Checks for the Configdir
102 AC_ARG_WITH(autosysconfdir,
103 [ --with-autosysconfdir directory to store the automaticaly maintained configs under],
104 [ if test "x$withval" != "xno" ; then
105 AC_DEFINE(HAVE_AUTO_ETC_DIR, [], [should we search our automatic config in an alternate place?])
106 AC_DEFINE_UNQUOTED(AUTO_ETC_DIR, "$withval", [where to search our automatic config files])
107 MAKE_AUTO_ETC_DIR=$withval
108 AC_SUBST(MAKE_AUTO_ETC_DIR)
113 dnl Checks for where to put our utilities
114 AC_ARG_WITH(utility-bindir,
115 [ --with-utility-bindir directory where to find helper binaries],
116 [ if test "x$withval" != "xno" ; then
117 AC_DEFINE(HAVE_UTILBIN_DIR,[],[should we put our helper binaries to another location?])
118 AC_DEFINE_UNQUOTED(UTILBIN_DIR, "$withval", [were to put our helper programs])
119 MAKE_UTILBIN_DIR=$withval
120 AC_SUBST(MAKE_UTILBIN_DIR)
126 dnl Checks for the run-dir for the sockets
128 [ --with-rundir directory to place runtime files (UDS) to?],
129 [ if test "x$withval" != "xno" ; then
130 AC_DEFINE(HAVE_RUN_DIR, [], [should we put our non volatile files elsewhere?])
131 AC_DEFINE_UNQUOTED(RUN_DIR, "$withval", [define, where the config should go in unix style])
132 MAKE_RUN_DIR=$withval
133 AC_SUBST(MAKE_RUN_DIR)
139 dnl Checks for the Pseudo Random Generator sockets TODO: this keeps being default.
140 AC_DEFINE_UNQUOTED(EGD_POOL, "/var/run/egd-pool", [place to keep our pseudo random generator file])
142 [ --with-egdpool the socket from Pseudo Random Generator, defaults to /var/run/egd-pool],
143 [ if test "x$withval" != "xno" ; then
144 AC_DEFINE_UNQUOTED(EGD_POOL, "$withval", [the socket from Pseudo Random Generator])
151 [ --with-docdir where to install the documentation. default: /usr/local/citadel/],
152 [ if test "x$withval" != "xno" ; then
153 MAKE_DOC_DIR=$withval
154 AC_SUBST(MAKE_DOC_DIR)
159 dnl where to put the locale files
160 AC_ARG_WITH(localedir,
161 [ --with-localedir directory to put the locale files to],
162 [ if test "x$withval" != "xno" ; then
167 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir",[where to find our pot files])
173 dnl Checks for the zlib compression library.
174 saved_CFLAGS="$CFLAGS"
176 AC_CHECK_HEADER(zlib.h,
177 [AC_CHECK_LIB(z, zlibVersion,
182 AC_MSG_ERROR(zlib was not found or is not usable. Please install zlib.)
187 AC_MSG_ERROR(zlib.h was not found or is not usable. Please install zlib.)
190 CFLAGS="$saved_CFLAGS"
192 dnl Here is the check for a libc integrated iconv
194 [ --disable-iconv do not use iconv charset conversion],
195 ok_iconv=no, ok_iconv=yes)
197 AC_MSG_CHECKING(Checking to see if your system supports iconv)
201 iconv_t ic = (iconv_t)(-1) ;
202 ic = iconv_open("UTF-8", "us-ascii");
217 dnl Check for iconv in external libiconv
218 if test "$ok_iconv" = no; then
219 AC_MSG_CHECKING(Checking for an external libiconv)
220 OLD_LDFLAGS="$LDFLAGS"
221 LDFLAGS="$LDFLAGS -liconv"
225 iconv_t ic = (iconv_t)(-1) ;
226 ic = iconv_open("UTF-8", "us-ascii");
236 LDFLAGS="$OLD_LDFLAGS"
241 if test "$ok_iconv" != "no"; then
242 AC_MSG_RESULT(Citadel will be built with character set conversion.)
243 AC_DEFINE(HAVE_ICONV,[],[whether we have iconv for charset conversion])
245 AC_MSG_RESULT(Citadel will be built without character set conversion.)
248 AC_CHECK_LIB(intl, libintl_bindtextdomain, [LDFLAGS="$LDFLAGS -lintl"])
252 AC_ARG_ENABLE(threaded-client, [ --disable-threaded-client
253 disable multithreaded client])
255 AC_ARG_ENABLE(pie, [ --enable-pie build position-independent executables])
257 AC_ARG_WITH(pam, [ --with-pam use PAM if present (see PAM.txt before you try this)])
258 AC_ARG_WITH(kthread, [ --with-kthread use kernel threads (on FreeBSD) (not recommended yet)])
261 [ --with-ssl=PATH Specify path to OpenSSL installation ],
263 if test "x$withval" != "xno" ; then
270 dnl By default, we only build the client (citadel and whobbs) unless we can
271 dnl figure out how to build with POSIX threads.
275 PTHREAD_DEFS=-D_REENTRANT
276 AC_MSG_CHECKING([how to compile with POSIX threads])
278 dnl BSDI 3.0 wants relocatable object modules instead of shared libs
279 dnl for dlopen(), and has a wrapper script to link with shared libs.
280 dnl Also has stupid non-reentrant gethostbyaddr() and friends.
282 test -z "$CC" -a -x /usr/bin/shlicc2 && CC=shlicc2
283 AC_DEFINE(HAVE_NONREENTRANT_NETDB,[], [define this if the OS has broken non-reentrant gethostby{name,addr}() ])
284 AC_MSG_RESULT([Old BSDI])
287 AC_DEFINE(HAVE_NONREENTRANT_NETDB, [], [define this if the OS has broken non-reentrant gethostby{name,addr}() ])
288 AC_MSG_RESULT([BSD/OS])
290 dnl Curses support on Mac OS X is kind of screwed at the moment.
291 dnl TCP buffering isn't ideal under OS X. This define should also be
292 dnl checked in other cases of OS X-Linux differences.
294 AC_DEFINE(HAVE_DARWIN, [], [define if using OS X/Darwin])
295 AC_MSG_RESULT([Mac OS X])
297 dnl Digital Unix has an odd way to build for pthreads, and we can't
298 dnl build pthreads programs with gcc due to header problems.
300 test -z "$CC" && CC=cc
301 LIBS="-lpthread -lexc $LIBS"
303 AC_MSG_RESULT([Tru64 or Digital UNIX])
305 dnl FreeBSD is similar to Digital UNIX with DEC C, which has a -pthread flag:
307 if test "$with_kthread" = yes; then
308 LIBS="-kthread $LIBS"
310 LIBS="-pthread $LIBS"
313 PTHREAD_DEFS=-D_THREAD_SAFE
314 AC_MSG_RESULT([FreeBSD])
317 LIBS="-pthread $LIBS"
319 PTHREAD_DEFS=-pthread
320 AC_MSG_RESULT([OpenBSD])
323 PTHREAD_DEFS="-D_REENTRANT -pthread"
324 AC_MSG_RESULT([Linux])
327 PTHREAD_DEFS="-D_REENTRANT -D_PTHREADS"
328 AC_MSG_RESULT([Solaris])
331 SERVER_LDFLAGS="-Wl,-subsystem,windows"
332 AC_MSG_RESULT([Cygwin])
335 AC_MSG_RESULT([default])
338 dnl DEFS="$DEFS $PTHREAD_DEFS"
341 dnl Checks for programs.
346 dnl Set up system-dependent compiler flags.
347 if test "$GCC" = yes; then
348 if test "$CC" = icc; then
352 *-*-solaris*|alpha*-dec-osf*)
353 CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wno-char-subscripts $PTHREAD_DEFS"
356 CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-strict-aliasing $PTHREAD_DEFS"
362 if test "x$enable_pie" = xyes; then
363 save_CFLAGS="$CFLAGS"
364 save_LDFLAGS="$LDFLAGS"
365 CFLAGS="$CFLAGS -fpie"
366 LDFLAGS="$LDFLAGS -pie -fpie"
367 AC_CACHE_CHECK([whether compiler accepts -pie -fpie], ac_cv_pie_fpie,
369 ac_cv_pie_fpie=yes, ac_cv_pie_fpie=no)])
370 if test $ac_cv_pie_fpie = no; then
371 CFLAGS="$save_CFLAGS"
372 LDFLAGS="$save_LDFLAGS"
376 AC_MSG_CHECKING([how to create dependancy checks])
377 if test -n "`$CC -V 2>&1 |grep Sun`"; then
382 AC_SUBST(DEPEND_FLAG)
387 AC_PATH_PROG(DIFF,diff)
388 AC_PATH_PROG(PATCH,patch)
389 missing_dir=`cd $ac_aux_dir && pwd`
390 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
391 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
393 dnl Checks for system services.
395 dnl Check the size of various builtin types; see typesize.h (error)
396 AC_CHECK_SIZEOF(char, 0)
397 AC_CHECK_SIZEOF(short, 0)
398 AC_CHECK_SIZEOF(int, 0)
399 AC_CHECK_SIZEOF(long, 0)
400 AC_CHECK_SIZEOF(size_t, 0)
401 dnl AC_CHECK_SIZEOF(long long, 0)
403 dnl Checks for libraries.
405 dnl We want to test for the following in libc before checking for their
406 dnl respective libraries, because some systems (like Irix) have both, and the
407 dnl non-libc versions may be broken.
408 AC_CHECK_FUNCS(crypt gethostbyname connect flock getpwnam_r getpwuid_r getloadavg)
410 AC_CHECK_FUNCS(strftime_l uselocale gettext)
412 if test "$ok_nls" != "no"; then
413 AC_CHECK_PROG(ok_xgettext, xgettext, yes, no)
417 if test "$ok_nls" != "no"; then
418 AC_CHECK_PROG(ok_msgmerge, msgmerge, yes, no)
422 if test "$ok_nls" != "no"; then
423 AC_CHECK_PROG(ok_msgfmt, msgfmt, yes, no)
427 if test "$ok_nls" != "no"; then
428 AC_MSG_RESULT(citadel will be built with national language support.)
429 AC_DEFINE(ENABLE_NLS, [], [whether we have NLS support])
430 PROG_SUBDIRS="$PROG_SUBDIRS po/citadel-setup"
432 AC_MSG_RESULT(citadel will be built without national language support.)
435 dnl disable backtrace if we don't want it.
436 AC_ARG_WITH(backtrace,
437 [ --with-backtrace enable backtrace dumps in the syslog],
438 [ if test "x$withval" != "xno" ; then
439 CFLAGS="$CFLAGS -rdynamic "
440 LDFLAGS="$LDFLAGS -rdynamic "
441 AC_CHECK_FUNCS(backtrace)
446 dnl disable backtrace if we don't want it.
448 [ --with-gprof enable profiling],
449 [ if test "x$withval" != "xno" ; then
450 CFLAGS="$CFLAGS -pg "
451 LDFLAGS="$LDFLAGS -pg "
456 if test "$ac_cv_func_gethostbyname" = no; then
457 AC_CHECK_LIB(nsl, gethostbyname)
460 if test "$ac_cv_func_connect" = no; then
461 AC_CHECK_LIB(socket, connect)
464 dnl Check for Solaris realtime support
465 AC_CHECK_LIB(rt, sched_yield)
467 AC_CHECK_FUNCS(vw_printw wcolor_set resizeterm wresize)
469 dnl Check for libpthread(s) if we're not using Digital UNIX or FreeBSD. (On
470 dnl which the -pthread flag takes care of this.)
471 if test "$check_pthread" != no; then
472 AC_CHECK_LIB(pthread, pthread_create)
473 AC_CHECK_LIB(pthreads, pthread_create)
476 test -d /usr/kerberos/include && CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
479 saved_CFLAGS="$CFLAGS"
481 dnl Check for libcitadel
482 AC_CHECK_HEADER(libcitadel.h,
483 [AC_CHECK_LIB(citadel, libcitadel_version_string,
485 LIBS="-lcitadel $LIBS"
488 AC_MSG_ERROR(libcitadel was not found or is not usable. Please install libcitadel.)
493 AC_MSG_ERROR(libcitadel.h was not found or is not usable. Please install libcitadel.)
497 CFLAGS="$saved_CFLAGS"
499 saved_CFLAGS="$CFLAGS"
501 dnl Check for libcitadelclient
502 dnl AC_CHECK_HEADER(citadel_ipc.h,
503 dnl [AC_CHECK_LIB(citadelclient, libcitadelclient_version_string,
505 dnl LIBS="-lcitadelclient $LIBS "
508 dnl AC_MSG_ERROR(libcitadelclient was not found or is not usable. Please install libcitadelclient.)
513 dnl AC_MSG_ERROR(citadel_ipc.h was not found or is not usable. Please install libcitadelclient.)
517 dnl CFLAGS="$saved_CFLAGS"
520 # The big search for OpenSSL
521 if test "$with_ssl" != "no"; then
523 saved_LDFLAGS="$LDFLAGS"
524 saved_CFLAGS="$CFLAGS"
525 if test "x$prefix" != "xNONE"; then
526 tryssldir="$tryssldir $prefix"
528 AC_CACHE_CHECK([for OpenSSL], ac_cv_openssldir, [
529 for ssldir in $tryssldir "" /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
530 CFLAGS="$saved_CFLAGS"
531 LDFLAGS="$saved_LDFLAGS"
532 LIBS="$saved_LIBS -lssl -lcrypto"
534 # Skip directories if they don't exist
535 if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
538 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
539 # Try to use $ssldir/lib if it exists, otherwise
541 if test -d "$ssldir/lib" ; then
542 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
543 if test ! -z "$need_dash_r" ; then
544 LDFLAGS="-R$ssldir/lib $LDFLAGS"
547 LDFLAGS="-L$ssldir $saved_LDFLAGS"
548 if test ! -z "$need_dash_r" ; then
549 LDFLAGS="-R$ssldir $LDFLAGS"
552 # Try to use $ssldir/include if it exists, otherwise
554 if test -d "$ssldir/include" ; then
555 CFLAGS="-I$ssldir/include $saved_CFLAGS"
557 CFLAGS="-I$ssldir $saved_CFLAGS"
561 # Basic test to check for compatible version and correct linking
562 # *does not* test for RSA - that comes later.
566 #include <openssl/rand.h>
570 memset(a, 0, sizeof(a));
571 RAND_add(a, sizeof(a), sizeof(a));
572 return(RAND_status() <= 0);
581 if test ! -z "$found_crypto" ; then
586 if test -z "$ssldir" ; then
590 if test ! -z "$found_crypto" ; then
591 ac_cv_openssldir=$ssldir
593 ac_cv_openssldir="no"
597 LDFLAGS="$saved_LDFLAGS"
598 CFLAGS="$saved_CFLAGS"
600 if test "x$ac_cv_openssldir" != "xno" ; then
601 AC_DEFINE(HAVE_OPENSSL, [], [Define if you have OpenSSL.])
602 LIBS="-lssl -lcrypto $LIBS"
603 dnl Need to recover ssldir - test above runs in subshell
604 ssldir=$ac_cv_openssldir
605 if test ! -z "$ssldir" -a "x$ssldir" != "x/usr" -a "x$ssldir" != "x(system)"; then
606 # Try to use $ssldir/lib if it exists, otherwise
608 if test -d "$ssldir/lib" ; then
609 LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
610 if test ! -z "$need_dash_r" ; then
611 LDFLAGS="-R$ssldir/lib $LDFLAGS"
614 LDFLAGS="-L$ssldir $saved_LDFLAGS"
615 if test ! -z "$need_dash_r" ; then
616 LDFLAGS="-R$ssldir $LDFLAGS"
619 # Try to use $ssldir/include if it exists, otherwise
621 if test -d "$ssldir/include" ; then
622 CFLAGS="-I$ssldir/include $saved_CFLAGS"
624 CFLAGS="-I$ssldir $saved_CFLAGS"
636 dnl Checks for header files.
642 dnl TODO: for the DB header checks, we should check whether the headers
643 dnl define db_env_create, somehow
645 AC_CHECK_HEADERS(dl.h fcntl.h limits.h malloc.h termios.h sys/ioctl.h sys/select.h sys/stat.h sys/time.h sys/prctl.h syslog.h unistd.h paths.h db.h db4/db.h pthread.h netinet/in.h arpa/nameser.h arpa/nameser_compat.h syscall.h sys/syscall.h)
647 AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H, [], [define this if you have the resolv.h header file.]),,
648 [#ifdef HAVE_SYS_TYPES_H
649 #include <sys/types.h>
651 #ifdef HAVE_NETINET_IN_H
652 #include <netinet/in.h>
654 #ifdef HAVE_ARPA_NAMESER_H
655 #include <arpa/nameser.h>
659 dnl Checks for typedefs, structures, and compiler characteristics.
665 dnl defined in acinclude.m4:
669 [for call semantics from getpwuid_r],
670 ac_cv_call_getpwuid_r,
671 [AC_TRY_COMPILE([#include <sys/types.h>
674 struct passwd pw, *pwp;
678 getpwuid_r(uid, &pw, pwbuf, sizeof(pwbuf), &pwp);
680 ac_cv_call_getpwuid_r=yes,
681 ac_cv_call_getpwuid_r=no)
684 if test $ac_cv_call_getpwuid_r = no; then
685 AC_DEFINE(SOLARIS_GETPWUID,[],[do we need to use solaris call syntax?])
686 AC_DEFINE(F_UID_T, "%ld", [whats the matching format string for uid_t?])
687 AC_DEFINE(F_PID_T, "%ld", [whats the matching format string for pid_t?])
688 AC_DEFINE(F_XPID_T, "%lx", [whats the matching format string for xpid_t?])
690 AC_DEFINE(F_UID_T, "%d", [whats the matching format string for uid_t?])
691 AC_DEFINE(F_PID_T, "%d", [whats the matching format string for pid_t?])
692 AC_DEFINE(F_XPID_T, "%x", [whats the matching format string for xpid_t?])
696 dnl Our own happy little check for the resolver library.
700 echo "we don't need to check for resolv on openbsd"
703 echo "we don't need to check for resolv on freeBSD"
706 test -f /usr/local/lib/libresolv.a && LDFLAGS="$LDFLAGS -L/usr/local/lib"
707 AC_CHECK_LIB(resolv, res_query,
708 RESOLV="$RESOLV -lresolv",
709 [dnl Have to include resolv.h as res_query is sometimes defined as a macro
710 AC_MSG_CHECKING([for res_query in -lresolv (with resolv.h if present)])
712 LIBS="-lresolv $LIBS"
717 [res_query(0,0,0,0,0)],
721 AC_MSG_ERROR(libresolv was not found. Citadel requires the resolver library.)
730 dnl Checks for library functions.
732 AC_PROG_GCC_TRADITIONAL
735 AC_CHECK_FUNCS(getspnam mkdir mkfifo mktime rmdir select socket strerror strcasecmp strncasecmp)
737 dnl Now check for pthreads
739 dnl On some platforms, AC_CHECK_FUNC[S] doesn't work for pthreads programs;
740 dnl we need to include pthread.h
742 AC_CACHE_CHECK([for pthread_cancel], ac_cv_func_pthread_cancel,
743 [AC_TRY_LINK([#include <pthread.h>],
746 /* The GNU C library defines this for functions which it implements
747 to always fail with ENOSYS. Some functions are actually named
748 something starting with __ and the normal name is an alias. */
749 #if defined (__stub_pthread_cancel) || defined (__stub___pthread_cancel)
752 pthread_cancel(thread);
754 ac_cv_func_pthread_cancel=yes, ac_cv_func_pthread_cancel=no)])
755 if test "$ac_cv_func_pthread_cancel" = yes; then
756 AC_DEFINE(HAVE_PTHREAD_CANCEL, [], [define this if you have the pthread_cancel() function])
759 AC_CACHE_CHECK([for pthread_create], ac_cv_func_pthread_create,
760 [AC_TRY_LINK([#include <pthread.h>],
761 [ /* The GNU C library defines this for functions which it implements
762 to always fail with ENOSYS. Some functions are actually named
763 something starting with __ and the normal name is an alias. */
764 #if defined (__stub_pthread_cancel) || defined (__stub___pthread_cancel)
767 pthread_create(NULL, NULL, NULL, NULL);
769 ac_cv_func_pthread_create=yes, ac_cv_func_pthread_create=no)])
770 if test "$ac_cv_func_pthread_create" = yes; then
771 test "$DATABASE" && TARGETS="client server utils"
772 if test "x$enable_threaded_client" != xno; then
773 AC_DEFINE(THREADED_CLIENT, [], [define this if you want to enable the multithreaded client])
777 AC_REPLACE_FUNCS(snprintf getutline)
779 AC_CACHE_CHECK([the weather], ac_cv_weather, [
781 echo $ECHO_N "opening your window... $ECHO_C" >&6
783 month=`date | cut -f 2 -d ' '`
786 ac_cv_weather="it's cold!"
789 ac_cv_weather="it's wet!"
792 ac_cv_weather="it's hot!"
795 ac_cv_weather="it's cool"
798 ac_cv_weather="it's fine"
806 AC_CACHE_CHECK([under the bed], ac_cv_under_the_bed, [
807 number=`date | cut -c 19`
810 ac_cv_under_the_bed="lunatics and monsters found"
813 ac_cv_under_the_bed="dust bunnies found"
819 dnl Done! Now write the Makefile and sysdep.h
824 AC_CONFIG_FILES([Makefile])
828 abs_srcdir="`cd $srcdir && pwd`"
830 if test "$abs_srcdir" != "$abs_builddir"; then
831 ln -sf $abs_srcdir/include $abs_builddir
832 ln -sf $abs_srcdir/Make_sources $abs_builddir
833 ln -sf $abs_srcdir/Make_modules $abs_builddir
834 for i in $abs_srcdir/*.h ; do
835 if test "$abs_srcdir/sysdep.h" != "$i"; then
836 ln -sf $i $abs_builddir
839 for d in `/bin/ls $abs_srcdir/modules/`; do
840 (mkdir -p $abs_builddir/modules/$d)
842 if test -d "$abs_srcdir/user_modules/"; then
843 for d in `/bin/ls $abs_srcdir/user_modules/`; do
844 (mkdir -p $abs_builddir/user_modules/$d)
847 mkdir -p $abs_builddir/utils
848 mkdir -p $abs_builddir/utillib
849 mkdir -p $abs_builddir/textclient
852 if test -n "$srcdir"; then
857 echo ------------------------------------------------------------------------
858 echo 'Character set conversion support:' $ok_iconv
860 echo 'Note: if you are not using Linux, make sure you are using GNU make'
861 echo '(gmake) to compile Citadel.'