This repository was archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
222 lines (184 loc) · 6.8 KB
/
configure.in
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# Process this file with autoconf to produce a configure script.
AC_INIT(ickle/main.cpp)
#
# Version information
#
ICKLE_MAJOR_VERSION=0
ICKLE_MINOR_VERSION=4
ICKLE_MICRO_VERSION=pre2
ICKLE_VERSION=$ICKLE_MAJOR_VERSION.$ICKLE_MINOR_VERSION.$ICKLE_MICRO_VERSION
AC_DEFINE_UNQUOTED(ICKLE_MAJOR_VERSION, "$ICKLE_MAJOR_VERSION", [Major version of ickle])
AC_DEFINE_UNQUOTED(ICKLE_MINOR_VERSION, "$ICKLE_MINOR_VERSION", [Minor version of ickle])
AC_DEFINE_UNQUOTED(ICKLE_MICRO_VERSION, "$ICKLE_MICRO_VERSION", [Micro version of ickle])
AC_DEFINE_UNQUOTED(ICKLE_VERSION, "$ICKLE_VERSION", [Full version of ickle])
AM_INIT_AUTOMAKE(ickle,0.4.pre2)
AM_ACLOCAL_INCLUDE(macros)
AM_ACLOCAL_INCLUDE(m4)
AM_CONFIG_HEADER(config.h)
# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
# Compiler debug flag
# by default (if no --enable/disable-debug option is given) then it
# will only filter out the -g if no specific compiler flags are given
# as CXXFLAGS env variable.
AC_ARG_ENABLE(debug,
[ --enable-debug creates debugging code],
[ ickle_use_debug="$enableval"], [ickle_use_debug="no"])
if test "$ickle_use_debug" = "no"; then
CXXFLAGS="`echo $CXXFLAGS | sed s/-g//`"
CFLAGS="`echo $CFLAGS | sed s/-g//`"
fi
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_AWK
AM_PROG_LIBTOOL
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([errno.h stdlib.h string.h ctype.h sys/time.h sys/types.h sys/wait.h unistd.h],, AC_MSG_ERROR([Required header not found]) )
# doesn't matter if getopt is missing it's a gnu thing
AC_CHECK_HEADERS([getopt.h])
# Check for whether to use gettext support
AM_GNU_GETTEXT_VERSION(0.11.5)
AM_GNU_GETTEXT
dnl ickle_control
AC_ARG_WITH(ickle_control, [ --without-ickle-control don't build ickle_control], ickle_control=$withval, ickle_control=yes)
AC_MSG_CHECKING([whether ickle_control should be built])
if test "x$ickle_control" = xyes; then
AC_DEFINE(CONTROL_SOCKET,,[Define if the control socket should be enabled])
ICKLE_CONTROL="ickle_control"
ICKLE_CONTROL_MANPAGES="ickle_control.1"
LIBICKLE_CTRLSOCKET="libickle_ctrlsocket.a"
LIBICKLE_CTRLSOCKET_FLAG="-lickle_ctrlsocket"
LIBICKLE_CTRLSOCKET_DEP="\$(top_builddir)/ctrlsocket/libickle_ctrlsocket.a"
fi
AC_MSG_RESULT($ickle_control)
AC_SUBST(ICKLE_CONTROL)
AC_SUBST(ICKLE_CONTROL_MANPAGES)
AC_SUBST(LIBICKLE_CTRLSOCKET)
AC_SUBST(LIBICKLE_CTRLSOCKET_FLAG)
AC_SUBST(LIBICKLE_CTRLSOCKET_DEP)
# Switch to C++ mode and check for needed C++ headers
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS([vector iostream fstream string algorithm list memory iterator exception utility],,
AC_MSG_ERROR([You need to have the libstdc++ headers installed]))
sstream=no
AC_CHECK_HEADERS(sstream,sstream=yes)
AC_CHECK_HEADERS(strstream,sstream=yes)
if test $sstream != yes ; then
AC_MSG_ERROR([Your libstdc++ installation does not have the sstream or strstream classes])
fi
# Check for std::locale() in libstdc++
ICKLE_CXX_HAVE_STD_LOCALE()
AC_LANG_RESTORE
# Checks for libraries.
PKG_CHECK_MODULES(SIGC, sigc++-1.2)
AC_SUBST(SIGC_CFLAGS)
AC_SUBST(SIGC_LIBS)
# glibmm separate for the benefit of ickle_control
# (which doesn't need the whole of gtkmm)
PKG_CHECK_MODULES(GLIBMM, glibmm-2.0)
AC_SUBST(GLIBMM_CFLAGS)
AC_SUBST(GLIBMM_LIBS)
PKG_CHECK_MODULES(GTKMM, gtkmm-2.0)
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
# gtkspell check
AC_ARG_ENABLE(gtkspell, [ --disable-gtkspell compile without gtkspell (default: check for it)],,enable_gtkspell=yes)
if test "$enable_gtkspell" = yes ; then
PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0,,enable_gtkspell=no)
if test "$enable_gtkspell" = yes ; then
AC_SUBST(GTKSPELL_CFLAGS)
AC_SUBST(GTKSPELL_LIBS)
AC_DEFINE(HAVE_GTKSPELL, [1], [Is there a gtkspell?])
fi
fi
# libicq2000 check
PKG_CHECK_MODULES(LIBICQ2000, libicq2000)
AC_SUBST(LIBICQ2000_CFLAGS)
AC_SUBST(LIBICQ2000_LIBS)
# Switch to C++ mode - on some systems with the gtkmm libs they need libstdc++
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Check for XScreenSaver support, adapted from gnomeicu
xss_ldflags=""
AC_ARG_WITH(xss, [ --with-xss=PREFIX
Enable XScreenSaver support (default: check for it)],
if test "x$withval" != "xno"; then
want_xss=yes
if test "x$withval" != "xyes" && test -d "$withval/lib"; then
xss_ldflags="-L$withval/lib"
fi
else
want_xss=no
fi,
want_xss=yes)
if test "x$want_xss" = xyes; then
AC_CHECK_LIB(Xext, XextCreateExtension,
have_xext=yes,
have_xext=no,
$GTKMM_LIBS)
AC_CHECK_LIB(Xss, XScreenSaverRegister,
have_xss=yes,
have_xss=no,
$GTKMM_LIBS $xss_ldflags)
if test "x$have_xext" = xyes && test "x$have_xss" = xyes; then
XSS_LIBS="$XSS_LIBS $xss_ldflags -lXext -lXss"
AC_SUBST(XSS_LIBS)
AC_DEFINE(USE_XSCREENSAVER,,[Whether the XScreenSaver extension should be used])
fi
fi
AC_LANG_RESTORE
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_C_INLINE
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([mktime stat mkdir strerror],,AC_MSG_ERROR([You do not have one of the standard C functions required - check you have libc installed properly]))
# Check for backtrace debug functionality
ICKLE_HAVE_BACKTRACE
AC_OUTPUT([Makefile ickle/Makefile share/Makefile po/Makefile.in m4/Makefile intl/Makefile \
control/Makefile ctrlsocket/Makefile \
share/icons/Makefile share/icons/ickle/Makefile \
share/icons/doors/Makefile share/icons/icq/Makefile \
share/icons/new/Makefile share/icons/gnomeicu/Makefile \
share/icons/eureka/Makefile share/translations/Makefile \
share/icons/kit/Makefile macros/Makefile pixmaps/Makefile])
if test -z "$ECHO"; then
ECHO=echo
fi
$ECHO
$ECHO "-----------------------------------------------------------------"
$ECHO "ickle $ICKLE_VERSION"
if test "x$USE_NLS" = xyes; then
$ECHO "gettext support: enabled"
else
$ECHO "gettext support: disabled"
fi
if test "$ickle_use_debug" = no; then
$ECHO "debug support: disabled"
else
$ECHO "debug support: enabled"
fi
if test "x$ac_cv_have_backtrace" = xyes; then
$ECHO "backtrace debug support: enabled"
else
$ECHO "backtrace debug support: disabled"
fi
if test "x$enable_gtkspell" = xyes; then
$ECHO "gtkspell support: enabled"
else
$ECHO "gtkspell support: disabled"
fi
$ECHO
$ECHO "Now type make (or gmake) to build ickle, and then make install to"
$ECHO "install. After installing, run ickle by typing 'ickle' at the "
$ECHO "prompt."
$ECHO "-----------------------------------------------------------------"
$ECHO