www.pudn.com > libsmtp.zip > configure.in


dnl Process this file with autoconf to produce a configure script.
AC_INIT(libsmtp, 0.9)

AC_CONFIG_HEADER(config.h)

dnl satisfy automake
PACKAGE=libsmtp
CODENAME=None

dnl version number
MAJOR_VERSION=0
MINOR_VERSION=9
MICRO_VERSION=0
EXTRA_VERSION=0

AC_PROG_MAKE_SET

subdirs="smtp"

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

dnl Checks for libraries.
dnl Replace `main' with a function in -lglib:
AC_CHECK_LIB(glib, main)

AC_ARG_ENABLE(mime,
	[  --enable-mime         enable libsmtp_mime and mime support [default=yes]],
	[enable_mime=$enableval], [enable_mime=yes])

if test "$enable_mime" != "yes"; then
	AC_DEFINE(WITHOUT_MIME)
	with_mime=no
else
	AC_DEFINE(WITH_MIME)
	subdirs="$subdirs mime"
	with_mime=yes
	addtl_flags="-DUSE_MIME"
	dnl Checks for libraries.
	dnl Replace `main' with a function in -lglib:
	AC_CHECK_LIB(glib, main)
fi

AC_ARG_ENABLE(debug,
	[  --enable-debug         compile with debug info [default=no]],
	[ac_cv_with_debug=$enableval], [ac_cv_with_debug=no])

if test "$ac_cv_with_debug" = yes; then
	AC_DEFINE(LIBSMTP_DEBUG)
	AC_DEFINE(LIBSMTP_MIME_DEBUG)
	addtl_flags="-DLIBSMTP_DEBUG -DLIBSMTP_MIME_DEBUG"
fi

subdirs="$subdirs examples"

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h time.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Checks for library functions.
AC_CHECK_FUNCS(gethostname socket strstr)

AC_SUBST(subdirs)
AC_SUBST(with_mime)
AC_SUBST(addtl_flags)

AC_OUTPUT(mime/Makefile smtp/Makefile examples/Makefile Makefile, echo timestamp > stamp-h)