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