summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 92ff4bab991e7de1294d6a864b04fccfb36e816f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.53)
AC_INIT(esmtp, 1.1)
AC_CONFIG_SRCDIR(Makefile.am)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(1.9 dist-bzip2)
AM_MAINTAINER_MODE

AC_PROG_CC

AC_HEADER_STDC

dnl getopt needs this
AC_C_CONST

AC_PROG_LEX
AC_PROG_LN_S
AC_PROG_YACC

dnl Check for libESMTP
AC_ARG_WITH(libesmtp,
	    AC_HELP_STRING([--with-libesmtp=DIR],
			   [use libesmtp library from (prefix) directory DIR]),
	    ,)
if test "$with_libesmtp" != "no" -a "$with_libesmtp" != "yes"
then
	CPPFLAGS="$CPPFLAGS -I$with_libesmtp/include"
	LDFLAGS="$LDFLAGS -L$with_libesmtp/lib"
	AC_CHECK_HEADER(libesmtp.h, ,[AC_MSG_ERROR([libesmtp.h not found in $with_libesmtp])])
fi    
AC_MSG_CHECKING(for libESMTP)
if libesmtp-config --version > /dev/null 2>&1
then
	AC_MSG_RESULT(yes)
	CFLAGS="$CFLAGS `libesmtp-config --cflags`"
	LIBS="$LIBS `libesmtp-config --libs`"
else
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(libESMTP library not found)
fi

jrf_FUNC_GETOPT

AC_CHECK_FUNCS([getuid geteuid])
		
AC_CONFIG_FILES([Makefile])
AC_OUTPUT