From 83e37efc8ed785cd095eb585ff747e5702ec49b3 Mon Sep 17 00:00:00 2001 From: Sam Varshavchik Date: Sun, 22 May 2022 23:52:28 -0400 Subject: gcc 12, autotool updates, sqwebmail fixes. --- threadlib/configure.ac | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'threadlib/configure.ac') diff --git a/threadlib/configure.ac b/threadlib/configure.ac index 408c07c..92ab971 100644 --- a/threadlib/configure.ac +++ b/threadlib/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(threadlib, 0.10, [courier-users@lists.sourceforge.net]) +AC_INIT([threadlib],[0.10],[courier-users@lists.sourceforge.net]) >confdefs.h # Kill PACKAGE_ macros @@ -16,12 +16,11 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_CC -AC_PROG_CC_C99 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. @@ -36,13 +35,12 @@ AC_CHECK_LIB(pthread, pthread_cond_wait, [ THREADLIB="-lpthread" ; LIBS="-lpthread $LIBS" ], [ LIBS="-pthread $save_LIBS" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ void pthread_cond_wait(); -],[ +]], [[ pthread_cond_wait(); -], - THREADLIB="-pthread" -) +]])],[THREADLIB="-pthread" +],[]) ] ) @@ -76,19 +74,20 @@ AM_CONDITIONAL(HAVE_PTHREADS, test "$have_pthreads" != "no") AC_SUBST(THREADLIB) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include double x() { return sqrt(0); -}],[ -], [ +}]], [[ +]])],[ LIBS='-lm' -]) +],[]) if test "$GCC" = "yes" then CFLAGS="-Wall $CFLAGS" fi -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT -- cgit v1.2.3