diff options
| author | Sam Varshavchik | 2013-08-25 14:43:26 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2013-08-25 14:43:52 -0400 |
| commit | a00fd90cded04581b53d107f07ad2ff4e83384b3 (patch) | |
| tree | 6525d7dfa86d4a84bca3b3ed188b7e54636e68d9 /rfc822/configure.ac | |
| parent | 3587050bb0729dfc8759a84e7ffbc860662b1b25 (diff) | |
| download | courier-libs-a00fd90cded04581b53d107f07ad2ff4e83384b3.tar.bz2 | |
Renamed configure.in to configure.ac
Diffstat (limited to 'rfc822/configure.ac')
| -rw-r--r-- | rfc822/configure.ac | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/rfc822/configure.ac b/rfc822/configure.ac new file mode 100644 index 0000000..3dc3659 --- /dev/null +++ b/rfc822/configure.ac @@ -0,0 +1,125 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright 1998 - 2009 Double Precision, Inc. See COPYING for +dnl distribution information. + +AC_INIT(rfc822lib, 0.13, [courier-users@lists.sourceforge.net]) + +>confdefs.h # Kill PACKAGE_ macros + +AC_CONFIG_SRCDIR(rfc822.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_CC +AC_PROG_LIBTOOL + +if test "$GCC" = yes ; then + CXXFLAGS="$CXXFLAGS -Wall" + CFLAGS="$CFLAGS -Wall" +fi + +CFLAGS="$CFLAGS -I.. -I$srcdir/.." + +dnl Checks for libraries. + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(locale.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_SYS_LARGEFILE + +dnl Checks for library functions. + +AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], + [Support IDN (needs GNU Libidn)]), + libidn=$withval, libidn=yes) + +if test "$libidn" != "no" +then + PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no]) + if test "$libidn" != "yes" + then + libidn=no + AC_MSG_WARN([Libidn not found]) + else + libidn=yes + AC_DEFINE(LIBIDN, 1, [Define to 1 if you want Libidn.]) + fi +fi +AC_MSG_CHECKING([if Libidn should be used]) +AC_MSG_RESULT($libidn) + +AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale) + +AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE, + +AC_TRY_COMPILE([ +#include <time.h> +],[ +int main() +{ +time_t t=altzone; + + return (0); +} +], librfc822_cv_SYS_TIMEZONE=altzone, + + AC_TRY_COMPILE([ +#include <time.h> +],[ +int main() +{ +int n=daylight; + + return (0); +} + ], librfc822_cv_SYS_TIMEZONE=daylight, + + AC_TRY_COMPILE([ +#include <time.h> + +extern struct tm dummy; +],[ +int main() +{ +long n=dummy.tm_gmtoff; + + return (0); +} + ] ,librfc822_cv_SYS_TIMEZONE=tm_gmtoff, + librfc822_cv_SYS_TIMEZONE=unknown + ) + ) + ) +) + +case $librfc822_cv_SYS_TIMEZONE in +tm_gmtoff) + AC_DEFINE_UNQUOTED(USE_TIME_GMTOFF,1, + [ The time offset is specified in the tm_gmtoff member ]) + ;; +altzone) + AC_DEFINE_UNQUOTED(USE_TIME_ALTZONE,1, + [ The daylight savings time offset is in the altzone member ]) + ;; +daylight) + AC_DEFINE_UNQUOTED(USE_TIME_DAYLIGHT,1, + [ The daylight savings time offset is in the tm_isdst member ]) + ;; +*) + AC_MSG_WARN([Cannot figure out how to calculate the alternate timezone, will use GMT]) + ;; +esac + +AM_CONDITIONAL(HAVE_SGML, test -d ${srcdir}/../docbook) + +echo "libidn=$libidn" >rfc822.config +AC_OUTPUT(Makefile) |
