24 |
AM_CONFIG_HEADER(config.h) |
AM_CONFIG_HEADER(config.h) |
25 |
AM_INIT_AUTOMAKE([weechat], [0.1.6-cvs]) |
AM_INIT_AUTOMAKE([weechat], [0.1.6-cvs]) |
26 |
|
|
27 |
# Checks for programs. |
# Checks for programs |
28 |
AC_PROG_CC |
AC_PROG_CC |
29 |
AC_PROG_MAKE_SET |
AC_PROG_MAKE_SET |
30 |
AC_PROG_RANLIB |
AM_PROG_LIBTOOL |
31 |
|
|
32 |
# Gettext |
# Gettext |
33 |
ALL_LINGUAS="fr es cs" |
ALL_LINGUAS="fr es cs" |
34 |
AM_GNU_GETTEXT |
AM_GNU_GETTEXT |
35 |
|
|
36 |
# Checks for libraries. |
# Checks for libraries |
37 |
AC_CHECK_LIB([ncurses], [initscr], LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0) |
AC_CHECK_LIB(ncurses, initscr, LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0) |
38 |
|
|
39 |
# Checks for header files. |
# Checks for header files |
40 |
AC_HEADER_STDC |
AC_HEADER_STDC |
41 |
AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h unistd.h pwd.h errno.h]) |
AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h unistd.h pwd.h errno.h]) |
42 |
|
|
43 |
# Checks for typedefs, structures, and compiler characteristics. |
# Checks for typedefs, structures, and compiler characteristics |
44 |
AC_HEADER_TIME |
AC_HEADER_TIME |
45 |
AC_STRUCT_TM |
AC_STRUCT_TM |
46 |
|
|
63 |
AC_TYPE_SIGNAL |
AC_TYPE_SIGNAL |
64 |
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname]) |
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname]) |
65 |
|
|
66 |
|
# Variables in config.h |
67 |
|
|
68 |
|
AH_VERBATIM([PREFIX], [#undef PREFIX]) |
69 |
|
AH_VERBATIM([WEECHAT_LIBDIR], [#undef WEECHAT_LIBDIR]) |
70 |
|
AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR]) |
71 |
AH_VERBATIM([PLUGINS], [#undef PLUGINS]) |
AH_VERBATIM([PLUGINS], [#undef PLUGINS]) |
72 |
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL]) |
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL]) |
73 |
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON]) |
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON]) |
75 |
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS]) |
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS]) |
76 |
AH_VERBATIM([DEBUG], [#undef DEBUG]) |
AH_VERBATIM([DEBUG], [#undef DEBUG]) |
77 |
|
|
78 |
|
# Arguments for ./configure |
79 |
|
|
80 |
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes) |
AC_ARG_ENABLE(ncurses, [ --disable-ncurses Turn off ncurses interface (default=auto)],enable_ncurses=$enableval,enable_ncurses=yes) |
81 |
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no) |
AC_ARG_ENABLE(wxwidgets,[ --enable-wxwidgets Turn on WxWidgets interface (default=no)],enable_wxwidgets=$enableval,enable_wxwidgets=no) |
82 |
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no) |
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=$enableval,enable_gtk=no) |
83 |
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no) |
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=$enableval,enable_qt=no) |
84 |
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=$enableval,enable_perl=no) |
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=yes)],enable_plugins=$enableval,enable_plugins=yes) |
85 |
AC_ARG_ENABLE(python, [ --enable-python Turn on Python plugins (default=no)],enable_python=$enableval,enable_python=no) |
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl script plugin (default=no)],enable_perl=$enableval,enable_perl=no) |
86 |
AC_ARG_ENABLE(ruby, [ --enable-ruby Turn on Ruby plugins (default=no)],enable_ruby=$enableval,enable_ruby=no) |
AC_ARG_ENABLE(python, [ --enable-python Turn on Python script plugin (default=no)],enable_python=$enableval,enable_python=no) |
87 |
|
AC_ARG_ENABLE(ruby, [ --enable-ruby Turn on Ruby script plugin (default=no)],enable_ruby=$enableval,enable_ruby=no) |
88 |
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=auto)],enable_gnutls=$enableval,enable_gnutls=yes) |
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=auto)],enable_gnutls=$enableval,enable_gnutls=yes) |
89 |
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0) |
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=0)],debug=$withval,debug=0) |
90 |
|
|
|
enable_plugins="no" |
|
|
|
|
91 |
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes") |
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes") |
92 |
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes") |
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes") |
93 |
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") |
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes") |
94 |
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") |
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes") |
95 |
|
AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes") |
96 |
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") |
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes") |
97 |
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") |
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes") |
98 |
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes") |
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes") |
99 |
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes") |
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes") |
100 |
|
|
101 |
|
# ------------------------------------------------------------------------------ |
102 |
|
# GUI |
103 |
|
# ------------------------------------------------------------------------------ |
104 |
|
|
105 |
if test "x$enable_ncurses" = "xyes" ; then |
if test "x$enable_ncurses" = "xyes" ; then |
106 |
if test "$LIBNCURSES_FOUND" = "0" ; then |
if test "$LIBNCURSES_FOUND" = "0" ; then |
107 |
AC_MSG_ERROR([ |
AC_MSG_ERROR([ |
147 |
AC_SUBST(GTK_LIBS) |
AC_SUBST(GTK_LIBS) |
148 |
fi |
fi |
149 |
|
|
150 |
|
# ------------------------------------------------------------------------------ |
151 |
|
# plugins |
152 |
|
# ------------------------------------------------------------------------------ |
153 |
|
|
154 |
PLUGINS_LIBS= |
PLUGINS_LIBS= |
155 |
|
|
156 |
if test "x$enable_perl" = "xyes" ; then |
if test "x$enable_perl" = "xyes" ; then |
184 |
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1` |
PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1` |
185 |
|
|
186 |
if test "x$PERL_LIB_TEST" = "x0" ; then |
if test "x$PERL_LIB_TEST" = "x0" ; then |
187 |
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/perl/lib_weechat_perl.a `$PERL -MExtUtils::Embed -e ldopts`" |
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts` |
188 |
else |
else |
189 |
AC_MSG_ERROR([ |
AC_MSG_ERROR([ |
190 |
*** Perl library couldn't be found in your system. |
*** Perl library couldn't be found in your system. |
193 |
AC_MSG_RESULT(found) |
AC_MSG_RESULT(found) |
194 |
|
|
195 |
AC_SUBST(PERL_CFLAGS) |
AC_SUBST(PERL_CFLAGS) |
196 |
|
AC_SUBST(PERL_LFLAGS) |
197 |
AC_DEFINE(PLUGIN_PERL) |
AC_DEFINE(PLUGIN_PERL) |
198 |
fi |
fi |
199 |
|
|
236 |
fi |
fi |
237 |
AC_MSG_RESULT(found) |
AC_MSG_RESULT(found) |
238 |
|
|
|
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/python/lib_weechat_python.a $PYTHON_LFLAGS" |
|
239 |
AC_SUBST(PYTHON_CFLAGS) |
AC_SUBST(PYTHON_CFLAGS) |
240 |
|
AC_SUBST(PYTHON_LFLAGS) |
241 |
AC_DEFINE(PLUGIN_PYTHON) |
AC_DEFINE(PLUGIN_PYTHON) |
242 |
fi |
fi |
243 |
|
|
248 |
|
|
249 |
RUBY_CFLAGS=-I`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"` |
RUBY_CFLAGS=-I`ruby -rrbconfig -e "puts Config::CONFIG[['archdir']]"` |
250 |
RUBY_LFLAGS=`ruby -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"` |
RUBY_LFLAGS=`ruby -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"` |
|
PLUGINS_LIBS="$PLUGINS_LIBS ../../plugins/ruby/lib_weechat_ruby.a $RUBY_LFLAGS" |
|
251 |
AC_SUBST(RUBY_CFLAGS) |
AC_SUBST(RUBY_CFLAGS) |
252 |
|
AC_SUBST(RUBY_LFLAGS) |
253 |
AC_DEFINE(PLUGIN_RUBY) |
AC_DEFINE(PLUGIN_RUBY) |
254 |
fi |
fi |
255 |
|
|
256 |
if test "x$enable_plugins" = "xyes" ; then |
if test "x$enable_plugins" = "xyes" ; then |
257 |
AC_DEFINE(PLUGINS) |
AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) |
258 |
|
if test "$LIBDL_FOUND" != "yes"; then |
259 |
|
AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no) |
260 |
|
fi |
261 |
|
if test "$LIBDL_FOUND" = "yes"; then |
262 |
|
PLUGINS_LIBS="../../plugins/lib_weechat_plugins.a -ldl" |
263 |
|
AC_DEFINE(PLUGINS) |
264 |
|
else |
265 |
|
AC_MSG_ERROR([ |
266 |
|
*** "dl" library (dynamic library loader) couldn't be found in your system. |
267 |
|
*** Try to install it with your software package manager or disable plugins.]) |
268 |
|
fi |
269 |
fi |
fi |
270 |
|
|
271 |
AC_SUBST(PLUGINS_LIBS) |
AC_SUBST(PLUGINS_LIBS) |
272 |
|
|
273 |
|
# ------------------------------------------------------------------------------ |
274 |
|
# gnutls |
275 |
|
# ------------------------------------------------------------------------------ |
276 |
|
|
277 |
if test "x$enable_gnutls" = "xyes" ; then |
if test "x$enable_gnutls" = "xyes" ; then |
278 |
found_gnutls="no" |
found_gnutls="no" |
279 |
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[ |
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[ |
288 |
enable_gnutls="no" |
enable_gnutls="no" |
289 |
fi |
fi |
290 |
fi |
fi |
291 |
|
|
292 |
|
# ------------------------------------------------------------------------------ |
293 |
|
# general vars |
294 |
|
# ------------------------------------------------------------------------------ |
295 |
|
|
296 |
|
if test "x$prefix" = "xNONE" ; then |
297 |
|
prefix="$ac_default_prefix" |
298 |
|
fi |
299 |
|
|
300 |
|
if test "x$exec_prefix" = "xNONE" ; then |
301 |
|
exec_prefix="$prefix" |
302 |
|
fi |
303 |
|
|
304 |
|
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}") |
305 |
|
|
306 |
|
WEECHAT_LIBDIR=`eval echo ${libdir}/weechat` |
307 |
|
AC_DEFINE_UNQUOTED(WEECHAT_LIBDIR, "$WEECHAT_LIBDIR") |
308 |
|
|
309 |
|
WEECHAT_SHAREDIR=`eval echo ${datadir}/weechat` |
310 |
|
AC_DEFINE_UNQUOTED(WEECHAT_SHAREDIR, "$WEECHAT_SHAREDIR") |
311 |
|
|
312 |
|
weechat_libdir=${libdir}/weechat |
313 |
|
AC_SUBST(weechat_libdir) |
314 |
|
|
315 |
CFLAGS=`echo $CFLAGS | sed s/-g//g` |
CFLAGS=`echo $CFLAGS | sed s/-g//g` |
316 |
if test "x$CFLAGS" = "x" ; then |
if test "x$CFLAGS" = "x" ; then |
326 |
AC_DEFINE(DEBUG) |
AC_DEFINE(DEBUG) |
327 |
fi |
fi |
328 |
|
|
329 |
dnl For FreeBSD |
# for FreeBSD |
330 |
LIBS="$LIBS $INTLLIBS" |
LIBS="$LIBS $INTLLIBS" |
331 |
CFLAGS="$CFLAGS $CPPFLAGS" |
CFLAGS="$CFLAGS $CPPFLAGS" |
332 |
|
|
333 |
|
# ------------------------------------------------------------------------------ |
334 |
|
# output Makefiles |
335 |
|
# ------------------------------------------------------------------------------ |
336 |
|
|
337 |
AC_OUTPUT([Makefile |
AC_OUTPUT([Makefile |
338 |
doc/Makefile |
doc/Makefile |
339 |
src/Makefile |
src/Makefile |
340 |
src/common/Makefile |
src/common/Makefile |
341 |
src/irc/Makefile |
src/irc/Makefile |
342 |
src/plugins/Makefile |
src/plugins/Makefile |
343 |
src/plugins/perl/Makefile |
src/plugins/scripts/Makefile |
344 |
src/plugins/python/Makefile |
src/plugins/scripts/perl/Makefile |
345 |
src/plugins/ruby/Makefile |
src/plugins/scripts/python/Makefile |
346 |
src/gui/Makefile |
src/gui/Makefile |
347 |
src/gui/curses/Makefile |
src/gui/curses/Makefile |
348 |
src/gui/wxwidgets/Makefile |
src/gui/wxwidgets/Makefile |
351 |
intl/Makefile |
intl/Makefile |
352 |
po/Makefile.in]) |
po/Makefile.in]) |
353 |
|
|
354 |
echo |
# ------------------------------------------------------------------------------ |
355 |
echo $PACKAGE $VERSION |
# end message |
356 |
|
# ------------------------------------------------------------------------------ |
357 |
|
|
358 |
listgui= |
listgui= |
359 |
if test "x$enable_ncurses" = "xyes" ; then |
if test "x$enable_ncurses" = "xyes" ; then |
384 |
msg_debug_verbose="yes" |
msg_debug_verbose="yes" |
385 |
fi |
fi |
386 |
|
|
387 |
echo |
echo "" |
388 |
echo Interfaces.................... :$listgui |
echo "Interfaces.................... :$listgui" |
389 |
echo |
echo "Build with GNUtls support..... : $enable_gnutls" |
390 |
echo Build with Plugin support..... : $enable_plugins |
echo "Build with Plugin support..... : $enable_plugins" |
391 |
echo Build with Perl support....... : $enable_perl |
echo " Perl plugin..... : $enable_perl" |
392 |
echo Build with Python support..... : $enable_python |
echo " Python plugin... : $enable_python" |
393 |
echo Build with Ruby support....... : $enable_ruby |
echo " Ruby plugin..... : $enable_ruby" |
394 |
echo Build with GNUtls support..... : $enable_gnutls |
echo "Compile with debug info....... : $msg_debug_compiler" |
395 |
echo |
echo "Print debugging messages...... : $msg_debug_verbose" |
396 |
echo Compile with debug info....... : $msg_debug_compiler |
echo "" |
397 |
echo Print debugging messages...... : $msg_debug_verbose |
eval echo "WeeChat will be installed in $bindir." |
398 |
echo |
echo "" |
399 |
eval eval echo WeeChat will be installed in $bindir. |
echo "configure complete, now type 'make' to build WeeChat $VERSION" |
400 |
echo |
echo "" |
|
echo configure complete, now type \'make\' to build WeeChat |
|
|
echo |
|