1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
$NetBSD: patch-ac,v 1.3 2009/09/06 15:15:53 asau Exp $
--- configure.in.orig 2007-05-18 12:36:10.000000000 +0400
+++ configure.in 2009-09-06 19:11:00.000000000 +0400
@@ -24,6 +24,7 @@
AC_HEADER_STDC
AC_PROG_INTLTOOL
AM_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
dnl ------------------------------------
dnl | check for compiler characteristics |-------------------------------------
@@ -55,6 +56,35 @@
changequote([,])dnl
+dnl -------------------------------------
+dnl | internationalization (i18n) support |------------------------------------
+dnl -------------------------------------
+
+GETTEXT_PACKAGE=qalculate-gtk
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The package name for gettext])
+
+dnl Please keep this in alphabetical order
+ALL_LINGUAS="nl sv"
+AM_GLIB_GNU_GETTEXT
+
+dnl AM_GLIB_GNU_GETTEXT sets $DATADIRNAME
+AC_MSG_CHECKING(locale directory)
+if test "x$prefix" = "xNONE"; then
+ PACKAGE_LOCALE_DIR=$ac_default_prefix/share/locale
+else
+ PACKAGE_LOCALE_DIR=$prefix/share/locale
+fi
+
+AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "$PACKAGE_LOCALE_DIR",
+ [The directory in which qalculate's locale data will be stored])
+ AC_MSG_RESULT("$PACKAGE_LOCALE_DIR")
+
+
+
+INTLTOOL_QALCULATE_DEFINITIONS_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po-defs/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-defs/.intltool-merge-cache $(top_srcdir)/po-defs $< [$]@'
+AC_SUBST(INTLTOOL_QALCULATE_DEFINITIONS_RULE)
+
dnl --------------------------------
dnl | check for neccessary libraries |-----------------------------------------
dnl --------------------------------
@@ -63,11 +93,16 @@
AC_LANG([C++])
-AC_PATH_CLN(1.1.0, [
- LIBS="$LIBS $CLN_LIBS"
- CPPFLAGS="$CPPFLAGS $CLN_CPPFLAGS"
+if pkg-config --atleast-version=1.1.0 cln; then
+ CLN_CPPFLAGS="`pkg-config --cflags cln`"
+ CLN_LIBS="`pkg-config --libs cln`"
+ LIBS="$LIBS `pkg-config --libs cln`"
+ CPPFLAGS="$CPPFLAGS `pkg-config --cflags cln`"
AC_DEFINE(HAVE_LIBCLN,1,[If CLN can be used])
-], AC_MSG_ERROR([No suitable installed version of CLN could be found.]))
+else AC_MSG_ERROR([No suitable installed version of CLN could be found.])
+fi
+AC_SUBST(CLN_CPPFLAGS)
+AC_SUBST(CLN_LIBS)
PKG_CHECK_MODULES(GLIB, [
glib-2.0 >= 2.4
@@ -137,35 +172,6 @@
AC_SUBST(LN_QALCULATE)
-dnl -------------------------------------
-dnl | internationalization (i18n) support |------------------------------------
-dnl -------------------------------------
-
-GETTEXT_PACKAGE=qalculate-gtk
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The package name for gettext])
-
-dnl Please keep this in alphabetical order
-ALL_LINGUAS="nl sv"
-AM_GLIB_GNU_GETTEXT
-
-dnl AM_GLIB_GNU_GETTEXT sets $DATADIRNAME
-AC_MSG_CHECKING(locale directory)
-if test "x$prefix" = "xNONE"; then
- PACKAGE_LOCALE_DIR=$ac_default_prefix/share/locale
-else
- PACKAGE_LOCALE_DIR=$prefix/share/locale
-fi
-
-AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "$PACKAGE_LOCALE_DIR",
- [The directory in which qalculate's locale data will be stored])
- AC_MSG_RESULT("$PACKAGE_LOCALE_DIR")
-
-
-
-INTLTOOL_QALCULATE_DEFINITIONS_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po-defs/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po-defs/.intltool-merge-cache $(top_srcdir)/po-defs $< [$]@'
-AC_SUBST(INTLTOOL_QALCULATE_DEFINITIONS_RULE)
-
dnl --------
dnl | output |-----------------------------------------------------------------
dnl --------
|