File: configure.in

package info (click to toggle)
weex 2.8.4.4
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,568 kB
  • sloc: ansic: 7,134; sh: 3,619; makefile: 205; sed: 93
file content (83 lines) | stat: -rw-r--r-- 2,150 bytes parent folder | download
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
76
77
78
79
80
81
82
83
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/weex.c)

PACKAGE=weex
VERSION=2.8.0
ALL_LINGUAS="ja de es nl fr"

AM_INIT_AUTOMAKE($PACKAGE,$VERSION,no-define)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_USE_SYSTEM_EXTENSIONS()
AM_CONFIG_HEADER(config.h)

AC_ARG_WITH(cafile,
    AC_HELP_STRING([--with-cafile=FILE]
	[Define the default SSL CA certificates file.]),
    [default_cafile="$withval"],
    [default_cafile="/etc/ssl/certs/ca-certificates.crt"])
AC_DEFINE_UNQUOTED([DEFAULT_CAFILE], ["$default_cafile"], [default CA FILE])


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)
AC_CHECK_LIB([crypto],[CRYPTO_new_ex_data],
    AC_CHECK_LIB([ssl],[OPENSSL_init_ssl], 
	[LIBS="$LIBS -lssl -lcrypto"; CFLAGS="$CFLAGS -DUSE_SSL=1"], AC_MSG_ERROR([OpenSSL is not installed]))
    )

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 intl/po2tbl.sed src/Makefile po/Makefile.in \
debian/Makefile doc/Makefile man/Makefile)