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], [hg_]) |
---|
9 | m4_define([glemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) |
---|
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(), [hg_], [[_]glemon_version_tag()[]glemon_hg_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], |
---|
30 | AS_HELP_STRING([--with-lemon@<:@=PREFIX@:>@], [search for LEMON under PREFIX]), [], [with_lemon=no]) |
---|
31 | if test x"$with_lemon" != x"no"; then |
---|
32 | export PKG_CONFIG_PATH="$with_lemon/lib/pkgconfig/:$PKG_CONFIG_PATH" |
---|
33 | fi |
---|
34 | |
---|
35 | PKG_CHECK_MODULES([LEMON], [lemon >= 0.6.90], [], [AC_MSG_ERROR([ |
---|
36 | No appropriate version of package 'lemon' found. |
---|
37 | |
---|
38 | Consider adjusting the PKG_CONFIG_PATH environment variable or using |
---|
39 | the --with-lemon=PREFIX configure flag if you installed it in a |
---|
40 | non-standard prefix. |
---|
41 | |
---|
42 | Alternatively, you may set the environment variables LEMON_CFLAGS and |
---|
43 | LEMON_LIBS to avoid the need to call pkg-config. See the pkg-config |
---|
44 | man page for more details.])]) |
---|
45 | |
---|
46 | dnl Checks for header files. |
---|
47 | AC_CHECK_HEADERS([libintl.h locale.h]) |
---|
48 | |
---|
49 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
50 | AC_HEADER_STDBOOL |
---|
51 | AC_C_CONST |
---|
52 | |
---|
53 | dnl Checks for library functions. |
---|
54 | AC_CHECK_FUNCS([setlocale sqrt]) |
---|
55 | |
---|
56 | AC_CONFIG_FILES([ |
---|
57 | Makefile |
---|
58 | glemon.spec |
---|
59 | autopackage/default.apspec |
---|
60 | po/Makefile.in |
---|
61 | m4/Makefile |
---|
62 | ]) |
---|
63 | |
---|
64 | AC_OUTPUT |
---|
65 | |
---|
66 | echo |
---|
67 | echo '****************************** SUMMARY ******************************' |
---|
68 | echo |
---|
69 | echo Package version............... : $PACKAGE-$VERSION |
---|
70 | echo |
---|
71 | echo C++ compiler.................. : $CXX |
---|
72 | echo C++ compiles flags............ : $CXXFLAGS |
---|
73 | echo |
---|
74 | echo LEMON CFLAGS.................. : $LEMON_CFLAGS |
---|
75 | echo LEMON LIBS.................... : $LEMON_LIBS |
---|
76 | echo |
---|
77 | echo The packace will be installed in |
---|
78 | echo -n ' ' |
---|
79 | echo $prefix. |
---|
80 | echo |
---|
81 | echo '*********************************************************************' |
---|
82 | |
---|
83 | echo |
---|
84 | echo configure complete, now type \'make\' and then \'make install\'. |
---|
85 | echo |
---|