forked from GNUFreetalk/freetalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
106 lines (81 loc) · 3.15 KB
/
configure.ac
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
dnl Copyright 2005-2014 Freetalk Core Team
dnl GNU General Publicense v3 or later
dnl Process this file with autoconf to produce a configure script
AC_INIT([freetalk], [4.0], [https://github.com/GNUFreetalk/freetalk/issues])
AM_INIT_AUTOMAKE
AC_PREREQ([2.57])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
if make --help 2>&1 | grep -q no-print-directory; then
AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
fi
if make --help 2>&1 | grep -q quiet; then
AM_MAKEFLAGS="$AM_MAKEFLAGS --quiet"
fi
if libtool --help 2>&1 | grep -q quiet; then
AM_LIBTOOLFLAGS="--quiet";
fi
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile
src/Makefile
extensions/Makefile
extensions/init.scm
extensions/first-time-run.sh
doc/Makefile
examples/Makefile])
AC_PROG_MAKE_SET
AC_PROG_CXX
CONTRIBDIR='$(top_srcdir)/contrib'
dnl Check for argp
AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
AC_CONFIG_SUBDIRS(contrib/argp-standalone)
BUILD_ARGP_STANDALONE=no
if test "x${ac_cv_header_argp_h}" = "xno"; then
BUILD_ARGP_STANDALONE=yes
ARGP_STANDALONE_CFLAGS='-I${top_srcdir}/contrib/argp-standalone'
ARGP_STANDALONE_LDADD='${top_builddir}/contrib/argp-standalone/libargp.a'
ARGP_STANDALONE_DIR='${top_builddir}/contrib/argp-standalone'
fi
AC_SUBST(ARGP_STANDALONE_CFLAGS)
AC_SUBST(ARGP_STANDALONE_LDADD)
AC_SUBST(ARGP_STANDALONE_DIR)
AC_SUBST(CONTRIBDIR)
AC_CHECK_LIB([readline -lcurses],[readline],[RLLIBS="-lreadline -lcurses"])
AC_CHECK_LIB([readline -ltermcap],[readline],[RLLIBS="-lreadline -ltermcap"])
AC_CHECK_LIB([readline -lncurses],[readline],[RLLIBS="-lreadline -lncurses"])
if test "x$RLLIBS" == "x"; then
AC_MSG_ERROR([ERROR! readline not found..])
fi
AC_SUBST(RLLIBS)
AC_SEARCH_LIBS([tgetent],[ncurses termcap curses])
AC_CHECK_LIB([readline], [readline],,AC_MSG_ERROR([ERROR! readline not found...]))
AC_CHECK_PROG([PKGCONFIG], [pkg-config], [yes], [no])
if test "x$PKGCONFIG" = "xno"; then
AC_MSG_ERROR([pkg-config not found])
fi
PKG_CHECK_MODULES([GUILE], [guile-2.0], [HAVE_GUILE_2="yes"], [HAVE_GUILE_2="no"])
if test "x$HAVE_GUILE_2" == "xno"; then
AC_MSG_ERROR([ERROR! guile-2.0 not found...])
fi
PKG_CHECK_MODULES([GLIB], [glib-2.0], [HAVE_GLIB_2="yes"], [HAVE_GLIB_2="no"])
if test "x$HAVE_GLIB_2" == "xno"; then
AC_MSG_ERROR([ERROR! glib-2.0 not found...])
fi
PKG_CHECK_MODULES([LOUDMOUTH], [loudmouth-1.0], [HAVE_LOUDMOUTH="yes"], [HAVE_LOUDMOUTH="no"])
if test "x$HAVE_LOUDMOUTH" == "xno"; then
AC_MSG_ERROR([ERROR! loudmouth-1.0 not found...])
fi
PKG_CHECK_MODULES([CURL], [libcurl], [HAVE_CURL="yes"], [HAVE_CURL="no"])
if test "x$HAVE_CURL" == "xno"; then
AC_MSG_ERROR([ERROR! libcurl not found...])
fi
PKG_CHECK_MODULES([JANSSON], [jansson], [HAVE_JANSSON="yes"], [HAVE_JANSSON="no"])
if test "x$HAVE_JANSSON" == "xno"; then
AC_MSG_ERROR([ERROR! jansson not found...])
fi
if test "x$HAVE_CURL" == "xyes" -a "x$HAVE_JANSSON" == "xyes"; then
AC_DEFINE(FACEBOOK, 1, [enable facebook jid translation support])
FACEBOOK_LIBS="${CURL_LIBS} ${JANSSON_LIBS}"
AC_SUBST(FACEBOOK_LIBS)
fi
AC_CHECK_HEADERS([libintl.h])
AC_OUTPUT