ladanyi@139: dnl Process this file with autoconf to produce a configure script. ladanyi@181: ladanyi@181: dnl Version information. ladanyi@181: m4_define([glemon_version_major], [0]) ladanyi@181: m4_define([glemon_version_minor], [5]) ladanyi@181: m4_define([glemon_version_micro], [90]) ladanyi@181: m4_define([glemon_version_nano], []) ladanyi@181: m4_define([glemon_version_tag], [svn]) ladanyi@181: m4_define([glemon_svn_revision], [m4_normalize(esyscmd([svn info |grep ^Revision |cut -d ' ' -f 2]))]) ladanyi@182: m4_define([glemon_version], [glemon_version_major().glemon_version_minor()ifelse(glemon_version_micro(), [], [], [.glemon_version_micro()])ifelse(glemon_version_nano(), [], [], [.glemon_version_nano()])ifelse(glemon_version_tag(), [], [], glemon_version_tag(), [svn], [[_]glemon_version_tag()[]glemon_svn_revision()], [[_]glemon_version_tag()])]) ladanyi@181: ladanyi@139: AC_PREREQ([2.59]) ladanyi@181: AC_INIT([gLEMON], [glemon_version()], [etik-ol@cs.elte.hu], [glemon]) ladanyi@139: AC_CONFIG_AUX_DIR([build-aux]) ladanyi@139: AC_CONFIG_MACRO_DIR([m4]) ladanyi@139: AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ladanyi@139: AC_CONFIG_SRCDIR([main_win.h]) ladanyi@139: AC_CONFIG_HEADERS([config.h]) ladanyi@139: ladanyi@139: dnl Checks for programs. ladanyi@139: AC_PROG_CXX ladanyi@139: AC_PROG_CC ladanyi@139: AM_GNU_GETTEXT_VERSION([0.14.2]) ladanyi@139: AM_GNU_GETTEXT([external]) ladanyi@139: ladanyi@139: dnl Checks for libraries. ladanyi@139: PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0 gtkmm-2.4 >= 2.6]) ladanyi@159: ladanyi@159: AC_ARG_WITH([lemon-prefix], ladanyi@159: AS_HELP_STRING([--with-lemon-prefix@<:@=PREFIX@:>@], [search for LEMON under PREFIX]), [], [with_lemon_prefix=no]) ladanyi@159: if test x"$with_lemon_prefix" != x"no"; then ladanyi@183: export PKG_CONFIG_PATH="$with_lemon_prefix/lib/pkgconfig/:$PKG_CONFIG_PATH" ladanyi@159: fi ladanyi@159: ladanyi@144: PKG_CHECK_MODULES([LEMON_0_5], [lemon >= 0.5], ladanyi@144: [lemon_0_5_found=yes], [ ladanyi@144: AC_MSG_RESULT([no]) ladanyi@144: lemon_0_5_found=no]) alpar@170: PKG_CHECK_MODULES([LEMON_SVNHEAD], [lemon = svnhead], ladanyi@144: [lemon_svn_head_found=yes], [ ladanyi@144: AC_MSG_RESULT([no]) ladanyi@144: lemon_svn_head_found=no]) ladanyi@144: if test x"$lemon_0_5_found" = x"no" -a x"$lemon_svn_head_found" = x"no"; then ladanyi@144: AC_MSG_ERROR([LEMON not found.]) ladanyi@144: else ladanyi@144: if test x"$lemon_svn_head_found" = x"yes"; then alpar@170: LEMON_CFLAGS="$LEMON_SVNHEAD_CFLAGS" alpar@170: LEMON_LIBS="$LEMON_SVNHEAD_LIBS" ladanyi@144: else ladanyi@144: LEMON_CFLAGS="$LEMON_0_5_CFLAGS" ladanyi@144: LEMON_LIBS="$LEMON_0_5_LIBS" ladanyi@144: fi ladanyi@144: AC_SUBST(LEMON_CFLAGS) ladanyi@144: AC_SUBST(LEMON_LIBS) ladanyi@144: fi ladanyi@139: ladanyi@139: dnl Checks for header files. ladanyi@139: AC_CHECK_HEADERS([libintl.h locale.h]) ladanyi@139: ladanyi@139: dnl Checks for typedefs, structures, and compiler characteristics. ladanyi@139: AC_HEADER_STDBOOL ladanyi@139: AC_C_CONST ladanyi@139: ladanyi@139: dnl Checks for library functions. ladanyi@139: AC_CHECK_FUNCS([setlocale sqrt]) ladanyi@139: ladanyi@139: AC_CONFIG_FILES([ ladanyi@139: Makefile alpar@164: glemon.spec alpar@175: autopackage/default.apspec ladanyi@139: po/Makefile.in ladanyi@139: m4/Makefile ladanyi@139: ]) ladanyi@139: ladanyi@139: AC_OUTPUT alpar@170: alpar@170: echo alpar@170: echo '****************************** SUMMARY ******************************' alpar@170: echo alpar@170: echo Package version............... : $PACKAGE-$VERSION alpar@170: echo alpar@170: echo C++ compiler.................. : $CXX alpar@170: echo C++ compiles flags............ : $CXXFLAGS alpar@170: echo alpar@170: echo LEMON CFLAGS.................. : $LEMON_CFLAGS alpar@170: echo LEMON LIBS.................... : $LEMON_LIBS alpar@170: echo alpar@170: echo The packace will be installed in alpar@170: echo -n ' ' alpar@170: echo $prefix. alpar@170: echo alpar@170: echo '*********************************************************************' alpar@170: alpar@170: echo alpar@170: echo configure complete, now type \'make\' and then \'make install\'. alpar@170: echo