bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pthreads configuration still bad for Tru64


From: Dave Love
Subject: pthreads configuration still bad for Tru64
Date: 13 Mar 2003 17:51:38 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

I reported this before, but it's still a problem in 2.0.5.  The build
fails, failing to find pthread stuff correctly on Tru64 5.1A/B, since
configure doesn't DTRT.

The following generalized testing works for me and should be better
generally (tested on GNU/Linux, Solaris 8, Tru64 5.1, Irix 6.5).  I
had to change the original ACX_PTHREAD to duplicate the CFLAGS
additions in CPPFLAGS, and it's possible this isn't correct on other
systems which might then need corrections.

Note the comment about rtentry on Irix.  The other pthreads special
cases can probably be removed.

2003-02-26  Dave Love  <address@hidden>

        * acinclude.m4: New.

        * configure.ac: Use ACX_PTHREAD.  Set CC, CFLAGS, CPPFLAGS,
        LDFLAGS from the result.  Modify setting HAVE_RTENTRY,
        HAVE_ORTENTRY.

--- configure.ac        2003/02/21 14:26:50     1.1
+++ configure.ac        2003/03/07 17:42:53
@@ -45,6 +45,13 @@
   fi
 done
 
+AC_CONFIG_LIBOBJ_DIR(src)
+
+ACX_PTHREAD
+CC=$PTHREAD_CC
+CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+CPPFLAGS="$PTHREAD_CPPFLAGS $CPPFLAGS"
+LDFLAGS="$PTHREAD_LDFLAGS $LDFLAGS"
 
 dnl ######################################################################
 dnl Checks for programs.
@@ -335,10 +342,16 @@
 dnl #######################################################################
  
 rtry=none
 AC_MSG_CHECKING(for either struct rtentry or struct ortentry)
-AC_EGREP_HEADER(rtentry, net/route.h, AC_DEFINE(HAVE_RTENTRY) rtry=rtentry)
-AC_EGREP_HEADER(ortentry, net/route.h, AC_DEFINE(HAVE_ORTENTRY) rtry=ortentry)
-AC_MSG_RESULT($rtry)
+AC_EGREP_HEADER(rtentry, net/route.h, rtry=rtentry)
+if test "$rtry" = rtentry; then
+ AC_DEFINE(HAVE_RTENTRY)
+fi
+AC_EGREP_HEADER(ortentry, net/route.h, rtry=ortentry)
+if test "$rtry" = ortentry; then
+ AC_DEFINE(HAVE_ORTENTRY)
+fi
+AC_MSG_RESULT([$rtry])
 
 dnl #######################################################################
 dnl Handle DCE + threading stuff
@@ -434,6 +449,7 @@
        AC_DEFINE(OSF)
         ;;
    irix6*)
+       # rtentry is detected OK on a 6.5.19 system.
         AC_DEFINE(HAVE_ORTENTRY) # Have to hack this for 6.* owing to bug
        AC_DEFINE(IRIX)
         CFLAGS="$CFLAGS -w"

Attachment: acinclude.m4
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]