* configure.ac: Fix for defines for pthreads not being included properly
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 21 Mar 2004 17:13:15 +0000 (17:13 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 21 Mar 2004 17:13:15 +0000 (17:13 +0000)
citadel/ChangeLog
citadel/configure.ac

index 486f2ac80fcb5da1dc4b0108c008a683320e45d6..1bbe29a237db044ef5ec7561d7f520e073469e37 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 614.88  2004/03/21 17:13:15  error
+ * configure.ac: Fix for defines for pthreads not being included properly
+
  Revision 614.87  2004/03/21 06:15:06  ajc
  * docs/citadel.html: documented TLS support and administration procedures
 
@@ -5556,3 +5559,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index afde805ed325bf2e7e5caba8f5ff9e8d1f2a1b98..eaa93f0cae05e82598c01e115822b8fe530a922d 100644 (file)
@@ -54,6 +54,7 @@ TARGETS=client
 
 AC_CANONICAL_HOST
 PTHREAD_DEFS=-D_REENTRANT
+AC_MSG_CHECKING([how to compile with POSIX threads])
 case "$host" in
        dnl BSDI 3.0 wants relocatable object modules instead of shared libs
        dnl for dlopen(), and has a wrapper script to link with shared libs.
@@ -61,13 +62,16 @@ case "$host" in
        *-*-bsdi[123]*)
                test -z "$CC" -a -x /usr/bin/shlicc2 && CC=shlicc2
                AC_DEFINE(HAVE_NONREENTRANT_NETDB)
+               AC_MSG_RESULT([Old BSDI])
        ;;
        *-*-bsdi*)
                AC_DEFINE(HAVE_NONREENTRANT_NETDB)
+               AC_MSG_RESULT([BSD/OS])
        ;;
        dnl Curses support on Mac OS X is kind of screwed at the moment.
        *-*-darwin*)
                AC_DEFINE(DISABLE_CURSES)
+               AC_MSG_RESULT([Mac OS X])
        ;;
        dnl Digital Unix has an odd way to build for pthreads, and we can't
        dnl build pthreads programs with gcc due to header problems.
@@ -75,6 +79,7 @@ case "$host" in
                test -z "$CC" && CC=cc
                LIBS="-lpthread -lexc $LIBS"
                check_pthread=no
+               AC_MSG_RESULT([Tru64 or Digital UNIX])
        ;;
        dnl FreeBSD is similar to Digital UNIX with DEC C, which has a -pthread flag:
        *-*-freebsd*)
@@ -85,20 +90,31 @@ case "$host" in
                fi
                check_pthread=no
                PTHREAD_DEFS=-D_THREAD_SAFE
+               AC_MSG_RESULT([FreeBSD])
        ;;
        *-*-openbsd*)
                LIBS="-pthread $LIBS"
                check_pthread=no
                PTHREAD_DEFS=-pthread
+               AC_MSG_RESULT([OpenBSD])
+       ;;
+       *-*-linux*)
+               PTHREAD_DEFS="-D_REENTRANT -pthread"
+               AC_MSG_RESULT([Linux])
        ;;
        *-*-solaris*)
                PTHREAD_DEFS="-D_REENTRANT -D_PTHREADS"
+               AC_MSG_RESULT([Solaris])
        ;;
        *-*-cygwin*)
                SERVER_LDFLAGS="-Wl,-subsystem,windows"
+               AC_MSG_RESULT([Cygwin])
+       ;;
+       *)
+               AC_MSG_RESULT([default])
        ;;
 esac
-DEFS="$DEFS $PTHREAD_DEFS"
+dnl DEFS="$DEFS $PTHREAD_DEFS"
 
 dnl Checks for programs.
 AC_PROG_CC
@@ -107,10 +123,10 @@ dnl Set up system-dependent compiler flags.
 if test "$GCC" = yes; then
        case "$host" in
                *-*-solaris*|alpha*-dec-osf*)
-                       CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wno-char-subscripts"
+                       CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wno-char-subscripts $PTHREAD_DEFS"
                ;;
                *)
-                       CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wstrict-prototypes"
+                       CFLAGS="$CFLAGS -Wall -Wcast-qual -Wcast-align -Wstrict-prototypes $PTHREAD_DEFS"
                ;;
        esac
 fi