1# Process this file with autoconf to produce a configure script.
2AC_INIT([jggtrans], [2.2.6], [jajcus@jajcus.net])
3
4AC_CONFIG_SRCDIR([src/ggtrans.h])
5AM_INIT_AUTOMAKE
6AM_GNU_GETTEXT_VERSION([0.18.3])
7AC_CONFIG_HEADERS([config.h])
8
9# Checks for programs.
10AC_PROG_CC
11AC_C_BIGENDIAN
12AC_PROG_MAKE_SET
13AM_PROG_LIBTOOL
14AM_GNU_GETTEXT([external])
15AM_PROG_CC_C_O
16
17CFLAGS="$CFLAGS -Wall"
18
19AM_PATH_GLIB_2_0([2.0.0],[],AC_MSG_ERROR("You need glib >= 2.0.0 to compile this."))
20PKG_CHECK_MODULES([LIBIDN], [libidn >= 0.3.0])
21PKG_CHECK_MODULES([LIBGADU], [libgadu >= 1.9.0])
22
23AC_SUBST(LIBIDN_LIBS)
24AC_SUBST(LIBIDN_CFLAGS)
25
26AC_ARG_ENABLE([debug],AC_HELP_STRING([--disable-debug],[Disable debugging code]))
27
28AC_ARG_WITH([efence],AC_HELP_STRING([--with-efence],[Link against ElectricFence library]))
29
30if test "x$enable_debug" != "xno" ; then
31	AC_DEFINE(DEBUG,1,[Define to enable debugging code])
32fi
33
34if test "x$with_efence" = "xyes" ; then
35	AC_CHECK_LIB([efence], [malloc])
36fi
37
38# Checks for header files.
39AC_HEADER_DIRENT
40AC_HEADER_STDC
41AC_HEADER_SYS_WAIT
42AC_CHECK_HEADERS([stdlib.h string.h])
43AC_CHECK_HEADERS([sys/socket.h netdb.h netinet/in.h])
44AC_CHECK_HEADERS([sys/time.h unistd.h errno.h fcntl.h])
45
46# Checks for typedefs, structures, and compiler characteristics.
47AC_C_CONST
48AC_TYPE_SIZE_T
49AC_HEADER_TIME
50
51# Checks for library functions.
52AC_FUNC_ERROR_AT_LINE
53AC_TYPE_SIGNAL
54AC_FUNC_STAT
55
56AC_SEARCH_LIBS([gethostbyname],[resolv nsl],[],AC_MSG_ERROR("Some functions needed are missing"))
57AC_SEARCH_LIBS([inet_aton],[resolv nsl],[],AC_MSG_ERROR("Some functions needed are missing"))
58AC_SEARCH_LIBS([socket],[socket],[],AC_MSG_ERROR("Some functions needed are missing"))
59AC_CHECK_FUNCS([isascii],[],AC_MSG_ERROR("Some functions needed are missing"))
60AC_CHECK_FUNCS([select],[],AC_MSG_ERROR("Some functions needed are missing"))
61AC_CHECK_FUNCS([memset strchr],[],AC_MSG_ERROR("Some functions needed are missing"))
62
63AC_CONFIG_SUBDIRS([libxode])
64
65MKINSTALLDIRS="${MKINSTALLDIRS} -m 755"
66XGETTEXT="${XGETTEXT} --keyword=L_"
67
68AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in])
69AC_OUTPUT
70