From a00fd90cded04581b53d107f07ad2ff4e83384b3 Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Sun, 25 Aug 2013 14:43:26 -0400 Subject: Renamed configure.in to configure.ac --- threadlib/configure.ac | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ threadlib/configure.in | 84 -------------------------------------------------- 2 files changed, 84 insertions(+), 84 deletions(-) create mode 100644 threadlib/configure.ac delete mode 100644 threadlib/configure.in (limited to 'threadlib') diff --git a/threadlib/configure.ac b/threadlib/configure.ac new file mode 100644 index 0000000..6962099 --- /dev/null +++ b/threadlib/configure.ac @@ -0,0 +1,84 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(threadlib, 0.10, [courier-users@lists.sourceforge.net]) + +>confdefs.h # Kill PACKAGE_ macros + +AC_CONFIG_SRCDIR(pthread.c) +AC_CONFIG_AUX_DIR(../..) +AM_INIT_AUTOMAKE([foreign no-define]) + +AM_CONFIG_HEADER(config.h) + +dnl Checks for programs. +AC_USE_SYSTEM_EXTENSIONS +AC_PROG_AWK +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_RANLIB +AC_PROG_CC + +dnl Checks for libraries. + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h pthread.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Checks for library functions. + +THREADLIB="" +save_LIBS="$LIBS" + +AC_CHECK_LIB(pthread, pthread_cond_wait, [ + THREADLIB="-lpthread" ; LIBS="-lpthread $LIBS" ], [ + +LIBS="-pthread $save_LIBS" +AC_TRY_LINK([ +void pthread_cond_wait(); +],[ + pthread_cond_wait(); +], + THREADLIB="-pthread" +) +] +) + +LIBS="$THREADLIB $save_LIBS" + +have_pthreads=no + +AC_CHECK_HEADER(pthread.h, [ + AC_CHECK_FUNC(pthread_cond_wait, have_pthreads=yes) +] +) + +LIBS="$save_LIBS" + +AC_ARG_WITH(pthreads, [--without-pthreads - do not use Posix threads ], + if test "$withval" = "no" + then + have_pthreads=no + fi + ) + +if test "$have_pthreads" = "no" +then + THREADLIB="" +else + AC_DEFINE_UNQUOTED(HAVE_PTHREADS,1, + [ Whether pthreads are available ]) +fi + +AM_CONDITIONAL(HAVE_PTHREADS, test "$have_pthreads" != "no") + +AC_SUBST(THREADLIB) + +AC_CHECK_LIB(m, sqrt) + +if test "$GCC" = "yes" +then + CFLAGS="-Wall $CFLAGS" +fi +AC_OUTPUT(Makefile) diff --git a/threadlib/configure.in b/threadlib/configure.in deleted file mode 100644 index 6962099..0000000 --- a/threadlib/configure.in +++ /dev/null @@ -1,84 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(threadlib, 0.10, [courier-users@lists.sourceforge.net]) - ->confdefs.h # Kill PACKAGE_ macros - -AC_CONFIG_SRCDIR(pthread.c) -AC_CONFIG_AUX_DIR(../..) -AM_INIT_AUTOMAKE([foreign no-define]) - -AM_CONFIG_HEADER(config.h) - -dnl Checks for programs. -AC_USE_SYSTEM_EXTENSIONS -AC_PROG_AWK -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_RANLIB -AC_PROG_CC - -dnl Checks for libraries. - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h pthread.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -dnl Checks for library functions. - -THREADLIB="" -save_LIBS="$LIBS" - -AC_CHECK_LIB(pthread, pthread_cond_wait, [ - THREADLIB="-lpthread" ; LIBS="-lpthread $LIBS" ], [ - -LIBS="-pthread $save_LIBS" -AC_TRY_LINK([ -void pthread_cond_wait(); -],[ - pthread_cond_wait(); -], - THREADLIB="-pthread" -) -] -) - -LIBS="$THREADLIB $save_LIBS" - -have_pthreads=no - -AC_CHECK_HEADER(pthread.h, [ - AC_CHECK_FUNC(pthread_cond_wait, have_pthreads=yes) -] -) - -LIBS="$save_LIBS" - -AC_ARG_WITH(pthreads, [--without-pthreads - do not use Posix threads ], - if test "$withval" = "no" - then - have_pthreads=no - fi - ) - -if test "$have_pthreads" = "no" -then - THREADLIB="" -else - AC_DEFINE_UNQUOTED(HAVE_PTHREADS,1, - [ Whether pthreads are available ]) -fi - -AM_CONDITIONAL(HAVE_PTHREADS, test "$have_pthreads" != "no") - -AC_SUBST(THREADLIB) - -AC_CHECK_LIB(m, sqrt) - -if test "$GCC" = "yes" -then - CFLAGS="-Wall $CFLAGS" -fi -AC_OUTPUT(Makefile) -- cgit v1.2.3