* aclocal.m4: Include acx_pthread.m4.
authorKen Raeburn <raeburn@mit.edu>
Thu, 18 Mar 2004 02:59:17 +0000 (02:59 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 18 Mar 2004 02:59:17 +0000 (02:59 +0000)
(KRB5_AC_ENABLE_THREADS): New macro.
(CONFIG_RULES): Invoke it.  Use AC_REQUIRE to get topdir set early.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16182 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4

index d52f85599603d34cf872b514e780621653c3a883..af8910fa8ce5b46d07e270090be1ba5e7332c2fa 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-17  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4: Include acx_pthread.m4.
+       (KRB5_AC_ENABLE_THREADS): New macro.
+       (CONFIG_RULES): Invoke it.  Use AC_REQUIRE to get topdir set
+       early.
+
 2004-03-14  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (update-autoconf-h): New target.  Checks that
index 128457ab73a0e1e7219beecaf554b9195025eef3..66599d179bb7540c223a5e240b727b3708ac28b1 100644 (file)
@@ -46,7 +46,7 @@ dnl
 dnl drop in standard rules for all configure files -- CONFIG_RULES
 dnl
 AC_DEFUN(CONFIG_RULES,[dnl
-V5_SET_TOPDIR dnl
+AC_REQUIRE([V5_SET_TOPDIR]) dnl
 WITH_CC dnl
 AC_REQUIRE_CPP
 if test -z "$LD" ; then LD=$CC; fi
@@ -99,6 +99,8 @@ lib_frag=$srcdir/$ac_config_fragdir/lib.in
 AC_SUBST_FILE(lib_frag)
 libobj_frag=$srcdir/$ac_config_fragdir/libobj.in
 AC_SUBST_FILE(libobj_frag)
+dnl
+KRB5_AC_ENABLE_THREADS dnl
 ])dnl
 
 dnl Maintainer mode, akin to what automake provides, 'cept we don't
@@ -123,6 +125,21 @@ AC_SUBST(MAINTAINER_MODE_FALSE)
 AC_SUBST(MAINT)
 ])
 
+dnl Hack for now.
+AC_DEFUN([KRB5_AC_ENABLE_THREADS],[
+AC_ARG_ENABLE([thread-support],
+AC_HELP_STRING([--enable-thread-support],use PRELIMINARY EXPERIMENTAL UNFINISHED POSIX-only thread support),
+[  if test "$withval" = yes ; then
+    AC_MSG_NOTICE(enabling PRELIMINARY EXPERIMENTAL UNFINISHED POSIX-only thread support)
+    AC_DEFINE(ENABLE_THREADS,1,[Define if thread support enabled])
+  fi
+])
+dnl Maybe this should be inside the conditional above?  Doesn't cache....
+ACX_PTHREAD
+dnl Not really needed -- if pthread.h isn't found, ACX_PTHREAD will fail.
+AC_CHECK_HEADERS(pthread.h)
+])
+
 dnl This is somewhat gross and should go away when the build system
 dnl is revamped. -- tlyu
 dnl DECLARE_SYS_ERRLIST - check for sys_errlist in libc
@@ -1507,3 +1524,6 @@ AC_DEFUN([KRB5_AC_PRIOCNTL_HACK],
        ;;
 esac
 AC_SUBST(PRIOCNTL_HACK)])
+dnl
+dnl
+m4_include(config/ac-archive/acx_pthread.m4)