File: configure.ac

package info (click to toggle)
esmtp 1.2-17
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 908 kB
  • sloc: ansic: 1,842; sh: 1,389; yacc: 200; lex: 145; makefile: 49
file content (48 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download | duplicates (3)
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.65)
AC_INIT(esmtp, 1.2)
AC_CONFIG_SRCDIR(Makefile.am)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(1.11 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 -lesmtp"
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