summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@users.sourceforge.net>2003-06-24 12:30:20 +0000
committerJosé Fonseca <jrfonseca@users.sourceforge.net>2003-06-24 12:30:20 +0000
commit99b9f85740e355e8f0bc6b83e9050e50464efb1f (patch)
treed19c3b2787178f5b3fc6b294098f2212be06d900 /configure.ac
parent3df180dcc693518a61e5af93e717ca3c822a5365 (diff)
Fixes to the configure script to cope with different pthread and getopt
libraries in order to compile on FreeBSD and possibly also on other platforms (Tim Hemel).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 15 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 4be6fc5..1628432 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT(esmtp, 0.4)
AC_CONFIG_SRCDIR(Makefile.am)
-AM_INIT_AUTOMAKE(1.6 dist-bzip2)
+AM_INIT_AUTOMAKE(1.7 dist-bzip2)
AM_MAINTAINER_MODE
AC_PROG_CC
@@ -21,11 +21,21 @@ AC_PROG_YACC
YFLAGS=-d
+dnl Check for pthreads
+ACX_PTHREAD(
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ CC="$PTHREAD_CC",
+ AC_MSG_WARN([No pthreads on this system.]))
+
dnl Check for libESMTP
-AC_CHECK_LIB(esmtp, smtp_start_session,
- LIBS="$LIBS -lesmtp -lpthread",
- AC_MSG_ERROR([*** libESMTP library not found.]),
- -lpthread)
+AC_CHECK_LIB(
+ esmtp,
+ smtp_start_session,
+ LIBS="$LIBS -lesmtp",
+ AC_MSG_ERROR([*** libESMTP library not found.]))
+
+adl_FUNC_GETOPT_LONG
AC_CONFIG_FILES([Makefile])
AC_OUTPUT