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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/weex.c)
PACKAGE=weex
VERSION=2.6.1
ALL_LINGUAS="ja de es nl fr"
AM_INIT_AUTOMAKE($PACKAGE,$VERSION,no-define)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl for gettext
AM_GNU_GETTEXT
AC_CHECK_FUNC(gettext,,AC_CHECK_LIB(intl, gettext))
localedir='${prefix}/share/locale'
AC_SUBST(localedir)
dnl Checks for libraries.
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(nsl,gethostbyname)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h sys/time.h unistd.h gnuregex.h regex.h)
AC_CHECK_HEADER(gnuregex.h,gnuregex_ok=yes,gnuregex_ok=no)
if test "$gnuregex_ok" = no; then
AC_CHECK_HEADER(regex.h,,AC_MSG_ERROR(GNU regex library is not installed.))
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(mkdir regcomp select socket strdup strerror strtol strtoul)
dnl this is for debug
AC_ARG_ENABLE(debug, [ --enable-debug enable debug messages [default no]],,enable_debug=no)
AC_MSG_CHECKING(whether to enable debug)
if test x$enable_debug = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE(DEBUG)
else
AC_MSG_RESULT(no)
fi
dnl
AC_C_INLINE
if test x$CC = xgcc; then
CFLAGS="$CFLAGS -Wall"
fi
AC_OUTPUT(Makefile intl/Makefile src/Makefile po/Makefile.in \
debian/Makefile doc/Makefile man/Makefile)
|