From 91549cfa4fe0e8aac9e56d0a603de6d9d22c8396 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Fri, 17 Dec 1999 13:36:15 +0000 Subject: Move config code into separate file --- TSRM/configure.in | 22 +++++----------------- TSRM/tsrm.m4 | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 TSRM/tsrm.m4 (limited to 'TSRM') diff --git a/TSRM/configure.in b/TSRM/configure.in index ded8166948..43171d8f5d 100644 --- a/TSRM/configure.in +++ b/TSRM/configure.in @@ -7,27 +7,15 @@ AC_INIT(TSRM.c) AM_INIT_AUTOMAKE(TSRM, 1.0) AM_CONFIG_HEADER(tsrm_config.h) -AC_PROG_CC -AM_PROG_CC_STDC -AC_PROG_CC_C_O -AC_PROG_RANLIB - +sinclude(tsrm.m4) + +TSRM_BASIC_CHECKS + AM_PROG_LIBTOOL if test "$enable_debug" != "yes"; then AM_SET_LIBTOOL_VARIABLE([--silent]) fi -AC_CHECK_LIB(c_r, pthread_kill) -AC_CHECK_LIB(pthread, pthread_kill) - -AC_CHECK_FUNCS(pthread_kill) - -if test "$ac_cv_func_pthread_kill" != "yes"; then - AC_MSG_ERROR(You need pthreads to build TSRM.) -fi - -AC_DEFINE(PTHREADS) - -AC_CHECK_HEADERS(stdarg.h) +TSRM_PTHREAD AC_OUTPUT(Makefile) diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 new file mode 100644 index 0000000000..352b4654e1 --- /dev/null +++ b/TSRM/tsrm.m4 @@ -0,0 +1,25 @@ + +AC_DEFUN(TSRM_BASIC_CHECKS,[ + +AC_REQUIRE([AC_PROG_CC])dnl +dnl AC_REQUIRE([AM_PROG_CC_STDC])dnl +AC_REQUIRE([AC_PROG_CC_C_O])dnl +AC_REQUIRE([AC_PROG_RANLIB])dnl + +AC_CHECK_HEADERS(stdarg.h) + +]) + +AC_DEFUN(TSRM_PTHREAD,[ + +AC_CHECK_LIB(c_r, pthread_kill) +AC_CHECK_LIB(pthread, pthread_kill) + +AC_CHECK_FUNCS(pthread_kill) + +if test "$ac_cv_func_pthread_kill" != "yes"; then + AC_MSG_ERROR(You need pthreads to build TSRM.) +fi + +AC_DEFINE(PTHREADS, [], Whether to use Pthreads) +]) -- cgit v1.2.1