configure.ac
author hegyi
Tue, 27 Feb 2007 17:23:55 +0000
changeset 192 9d7489e8921e
parent 182 5cdee8207025
child 201 879e47e5b731
permissions -rw-r--r--
Forgot the meat.
     1 dnl Process this file with autoconf to produce a configure script.
     2 
     3 dnl Version information.
     4 m4_define([glemon_version_major], [0])
     5 m4_define([glemon_version_minor], [5])
     6 m4_define([glemon_version_micro], [90])
     7 m4_define([glemon_version_nano], [])
     8 m4_define([glemon_version_tag], [svn])
     9 m4_define([glemon_svn_revision], [m4_normalize(esyscmd([svn info |grep ^Revision |cut -d ' ' -f 2]))])
    10 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()])])
    11 
    12 AC_PREREQ([2.59])
    13 AC_INIT([gLEMON], [glemon_version()], [etik-ol@cs.elte.hu], [glemon])
    14 AC_CONFIG_AUX_DIR([build-aux])
    15 AC_CONFIG_MACRO_DIR([m4])
    16 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
    17 AC_CONFIG_SRCDIR([main_win.h])
    18 AC_CONFIG_HEADERS([config.h])
    19 
    20 dnl Checks for programs.
    21 AC_PROG_CXX
    22 AC_PROG_CC
    23 AM_GNU_GETTEXT_VERSION([0.14.2])
    24 AM_GNU_GETTEXT([external])
    25 
    26 dnl Checks for libraries.
    27 PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0 gtkmm-2.4 >= 2.6])
    28 
    29 AC_ARG_WITH([lemon-prefix],
    30 AS_HELP_STRING([--with-lemon-prefix@<:@=PREFIX@:>@], [search for LEMON under PREFIX]), [], [with_lemon_prefix=no])
    31 if test x"$with_lemon_prefix" != x"no"; then
    32   export PKG_CONFIG_PATH="$with_lemon_prefix/lib/pkgconfig/:$PKG_CONFIG_PATH"
    33 fi
    34 
    35 PKG_CHECK_MODULES([LEMON_0_5], [lemon >= 0.5],
    36   [lemon_0_5_found=yes], [
    37     AC_MSG_RESULT([no])
    38     lemon_0_5_found=no])
    39 PKG_CHECK_MODULES([LEMON_SVNHEAD], [lemon = svnhead],
    40   [lemon_svn_head_found=yes], [
    41     AC_MSG_RESULT([no])
    42     lemon_svn_head_found=no])
    43 if test x"$lemon_0_5_found" = x"no" -a x"$lemon_svn_head_found" = x"no"; then
    44   AC_MSG_ERROR([LEMON not found.])
    45 else
    46   if test x"$lemon_svn_head_found" = x"yes"; then
    47     LEMON_CFLAGS="$LEMON_SVNHEAD_CFLAGS"
    48     LEMON_LIBS="$LEMON_SVNHEAD_LIBS"
    49   else
    50     LEMON_CFLAGS="$LEMON_0_5_CFLAGS"
    51     LEMON_LIBS="$LEMON_0_5_LIBS"
    52   fi
    53   AC_SUBST(LEMON_CFLAGS)
    54   AC_SUBST(LEMON_LIBS)
    55 fi
    56 
    57 dnl Checks for header files.
    58 AC_CHECK_HEADERS([libintl.h locale.h])
    59 
    60 dnl Checks for typedefs, structures, and compiler characteristics.
    61 AC_HEADER_STDBOOL
    62 AC_C_CONST
    63 
    64 dnl Checks for library functions.
    65 AC_CHECK_FUNCS([setlocale sqrt])
    66 
    67 AC_CONFIG_FILES([
    68 Makefile
    69 glemon.spec
    70 autopackage/default.apspec
    71 po/Makefile.in
    72 m4/Makefile
    73 ])
    74 
    75 AC_OUTPUT
    76 
    77 echo
    78 echo '****************************** SUMMARY ******************************'
    79 echo
    80 echo Package version............... : $PACKAGE-$VERSION
    81 echo
    82 echo C++ compiler.................. : $CXX
    83 echo C++ compiles flags............ : $CXXFLAGS
    84 echo
    85 echo LEMON CFLAGS.................. : $LEMON_CFLAGS
    86 echo LEMON LIBS.................... : $LEMON_LIBS
    87 echo
    88 echo The packace will be installed in
    89 echo -n '  '
    90 echo $prefix.
    91 echo
    92 echo '*********************************************************************'
    93 
    94 echo
    95 echo configure complete, now type \'make\' and then \'make install\'.
    96 echo