# # Most of this configure script was ripped from the # gaim-guifications configure script, thanks # AC_INIT([openq], [0.3.2], [http://openq.sourceforge.net/]) AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AC_PREREQ([2.50]) AC_PATH_PROG(sedpath, sed) AC_DISABLE_STATIC # Setup libtool # AM_PROG_LIBTOOL LIBTOOL="$LIBTOOL --silent" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:$HOME/lib/pkgconfig" export PKG_CONFIG_PATH # The header # AH_TOP([ /* the header file */ #ifndef _CONFIG_H_ #define _CONFIG_H_ ]) AH_BOTTOM([ #endif /* _CONFIG_H_ */ ]) # gettext # ALL_LINGUAS="zh_CN" AM_GNU_GETTEXT_VERSION(0.10.40) AM_GNU_GETTEXT # # Look for the C compiler # CFLAGS_save="$CFLAGS" AC_PROG_CC_STDC CFLAGS="$CFLAGS_save" AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) if test "x$enable_debug" = "xyes" ; then AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) fi AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes) if test "x$enable_deprecated" = no; then DEBUG_CFLAGS = "$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" fi AC_SUBST(DEBUG_CFLAGS) if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall -g3" fi AC_SUBST(CFLAGS) # # Check for gaim # PKG_CHECK_MODULES(GAIM, gaim, [ AC_DEFINE(HAVE_GAIM, 1, [Define if we've found gaim.]) ]) AC_SUBST(GAIM_CFLAGS) GAIM_LIBDIR=`pkg-config --variable=libdir gaim` GAIM_DATADIR=`pkg-config --variable=datadir gaim` AC_SUBST(GAIM_LIBDIR) AC_SUBST(GAIM_DATADIR) # # check for gtk and other dependencies # AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([ *** GLib 2.0 is required to build OpenQ; please make sure you have the *** GLib development headers installed. The latest version of GLib is always *** available at http://www.gtk.org/.])) AC_SUBST(GLIB_CFLAGS) AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([ *** GTK+ 2.0 is required to build OpenQ; please make sure you have the *** GTK+ development headers installed. The latest version of GTK+ is always *** available at http://www.gtk.org/.])) AC_SUBST(GTK_CFLAGS) # # Version stuff # AC_CONFIG_COMMANDS_PRE([ if test -e VERSION; then cp -p VERSION VERSION.ac-save fi ]) AC_CONFIG_COMMANDS_POST([ cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION rm -f VERSION.ac-save ]) # # Finish up # AC_OUTPUT([ Makefile VERSION openq.spec data/Makefile intl/Makefile nsis/Makefile nsis/translations/Makefile pixmaps/Makefile pixmaps/smileys/Makefile pixmaps/smileys/2003iii/Makefile pixmaps/status/Makefile pixmaps/status/default/Makefile po/Makefile.in src/Makefile ]) echo; echo Configuration complete echo; echo Debugging enabled..............: $enable_debug echo Deprecated API enabled.........: $enable_deprecated echo; echo Type make to compile echo Thank you for choosing OpenQ echo;