configure.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:2k
- dnl $Id: configure.in,v 1.10 1999/12/06 13:29:02 mrsam Exp $
- dnl
- dnl Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
- dnl distribution information.
- AC_INIT(rfc2045.c)
- AM_INIT_AUTOMAKE(rfc2045lib, 0.10, 0)
- AM_CONFIG_HEADER(config.h)
- dnl Checks for programs.
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_ISC_POSIX
- AC_AIX
- AC_MINIX
- if test "$GCC" = yes ; then
- CXXFLAGS="$CXXFLAGS -Wall"
- CFLAGS="$CFLAGS -Wall"
- fi
- dnl Checks for libraries.
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_CHECK_HEADERS(unistd.h sys/wait.h strings.h)
- AC_CACHE_CHECK([for missing gethostname prototype],rfc2045_cv_SYS_GETHOSTNAME,
- AC_TRY_COMPILE([
- #if HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- extern int gethostname(int,int);
- ],[
- ],rfc2045_cv_SYS_GETHOSTNAME=yes,rfc2045_cv_SYS_GETHOSTNAME=no
- )
- )
- if test $rfc2045_cv_SYS_GETHOSTNAME = "no"
- then
- AC_DEFINE_UNQUOTED(HAS_GETHOSTNAME,1)
- fi
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_TYPE_OFF_T
- AC_TYPE_SIZE_T
- AC_TYPE_PID_T
- dnl Checks for library functions.
- AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp")
- AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp")
- AC_ARG_WITH(package, [], package="$withval",
- [
- package="$PACKAGE"
- ac_configure_args="$ac_configure_args --with-package=$PACKAGE"
- ])
- AC_ARG_WITH(version, [], version="$withval",
- [
- version="$VERSION"
- ac_configure_args="$ac_configure_args --with-version=$VERSION"
- ])
- AC_DEFINE_UNQUOTED(RFC2045PKG,"$package")
- AC_DEFINE_UNQUOTED(RFC2045VER,"$version")
- AC_ARG_ENABLE(mimecharset,
- [ --enable-mimecharset=charset Default MIME charset to set on new messages],
- RFC2045CHARSET="$enableval", RFC2045CHARSET="us-ascii")
- CFLAGS="$CFLAGS -I${srcdir}/.."
- AC_SUBST(rfc822includedir)
- AC_SUBST(RFC2045CHARSET)
- AC_OUTPUT(Makefile rfc2045charset.h)