]> Dogcows Code - chaz/homebank/blob - configure.ac
add short description of the extension support
[chaz/homebank] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.52)
5 AC_INIT([homebank], [5.1.2])
6 #AC_INIT([homebank], [x.x-rc])
7
8 AM_CONFIG_HEADER(config.h)
9
10 AM_INIT_AUTOMAKE([1.9 foreign])
11
12 LT_PREREQ([2.2])
13 LT_INIT([dlopen])
14 AC_CONFIG_MACRO_DIR([m4])
15
16 # If the source code has changed at all, increment REVISION
17 # If any interfaces have been added, removed, or changed, increment CURRENT, and set REVISION to 0.
18 # If any interfaces have been added since the last public release, then increment AGE.
19 # If any interfaces have been removed since the last public release, then set AGE to 0.
20 # Reference: http://www.gnu.org/software/libtool/manual.html#Versioning
21
22 # Checks for programs.
23 AC_PROG_CC
24 AC_PROG_LN_S
25 AC_PROG_INSTALL
26 AC_PROG_INTLTOOL
27
28 # Checks for libraries.
29 PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.12 glib-2.0 >= 2.39 gmodule-2.0 >= 2.39)
30 AC_SUBST(DEPS_CFLAGS)
31 AC_SUBST(DEPS_LIBS)
32 AC_CHECK_LIB(m, pow)
33
34 PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])
35 AC_SUBST(LIBSOUP_CFLAGS)
36 AC_SUBST(LIBSOUP_LIBS)
37
38 # general usage flags
39 CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes"
40
41 # disable deprecated warnings
42 CFLAGS="${CFLAGS} -Wno-deprecated-declarations"
43
44 # extended flags
45 #CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter"
46
47 # profiling valgrind/gprof flags
48 #CFLAGS="${CFLAGS} -g -O0 -pg"
49
50 # pre-relase # 2 - error as warning for
51 #CFLAGS="${CFLAGS} -Werror"
52
53 # gtk3 migration
54 #CFLAGS="${CFLAGS} -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE"
55
56 # GLib/Gtk deprecated flags
57 #CFLAGS="${CFLAGS} -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
58
59
60 # Check for libofx
61 AC_CHECK_HEADER(libofx/libofx.h,,noofx=true)
62 AC_ARG_WITH(ofx,
63 [ --without-ofx build without ofx support [default=with]],
64 [build_ofx=$withval],
65 [build_ofx=yes]
66 )
67 if test x$build_ofx != xno
68 then
69 if test x$noofx != xtrue
70 then
71 AC_CHECK_LIB(ofx, ofx_set_status_cb, OFX_0_7="-DOFX_ENABLE")
72 DEPS_LIBS="-lofx ${DEPS_LIBS}"
73 CPPFLAGS="${CPPFLAGS} $OFX_0_7"
74 else
75 noofx=true
76 AC_MSG_RESULT([Libofx header missing. Check your libofx installation])
77 CFLAGS="${CFLAGS} -DNOOFX"
78 fi
79 else
80 noofx=true
81 CFLAGS="${CFLAGS} -DNOOFX"
82 fi
83 AM_CONDITIONAL(NOOFX, test x$noofx = xtrue)
84
85 AC_ARG_WITH(perl,
86 [ --with-perl build with perl plug-in support [default=without]],
87 [build_perl=$withval],
88 [build_perl=no]
89 )
90 if test x$build_perl != xno
91 then
92 test x$build_perl != xyes -a -x "$build_perl" && PERL=$build_perl
93 AC_PATH_PROG(PERL, perl, perl)
94 AC_MSG_CHECKING(if perl can be embedded)
95 if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1
96 then
97 AC_MSG_RESULT(yes)
98 CPPFLAGS="${CPPFLAGS} -DPERL_ENABLE"
99 PERL_CPPFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
100 PERL_OBJS="ext-perl.o perlxsi.o"
101 PERL_PRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
102 PERL_SITELIBEXP="`$PERL -MConfig -e 'print $Config{sitelibexp}'`"
103 DEPS_LIBS="`$PERL -MExtUtils::Embed -e ldopts` ${DEPS_LIBS}"
104 if test -e "$PERL_SITELIBEXP/ExtUtils/xsubpp"
105 then
106 XSUBPP="$PERL $PERL_SITELIBEXP/ExtUtils/xsubpp"
107 else
108 XSUBPP="$PERL $PERL_PRIVLIBEXP/ExtUtils/xsubpp"
109 fi
110 else
111 AC_MSG_ERROR([no working perl found, or perl not version >= 5.8])
112 fi
113 fi
114 AC_SUBST(PERL_CPPFLAGS)
115 AC_SUBST(PERL_OBJS)
116 AC_SUBST(PERL_PRIVLIBEXP)
117 AC_SUBST(PERL_SITELIBEXP)
118 AC_SUBST(XSUBPP)
119
120 # Checks for header files.
121 AC_HEADER_STDC
122 AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h])
123
124 # Checks for typedefs, structures, and compiler characteristics.
125 AC_HEADER_STDBOOL
126 AC_C_CONST
127 AC_STRUCT_TM
128 AC_C_VOLATILE
129
130 # Checks for library functions.
131 AC_CHECK_FUNCS([floor localeconv memset modf pow setlocale sqrt strcasecmp strtoul])
132
133 # International support
134 ALL_LINGUAS="af ar ast be bg br ca cs cy da de el en_AU en_CA en_GB es et eu fa fi fr gl he hr hu id is it ja ko lt lv mr ms nb nds nl oc pl pt_BR pt pt_PT ro ru si sk sl sr sv tr uk vi zh_CN zh_TW"
135
136 AM_GLIB_GNU_GETTEXT
137
138 GETTEXT_PACKAGE=$PACKAGE
139 AC_SUBST(GETTEXT_PACKAGE)
140 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])
141
142 AC_CONFIG_FILES([
143 Makefile
144 src/Makefile
145 data/homebank.desktop.in
146 data/Makefile
147 data/datas/Makefile
148 images/Makefile
149 mime/Makefile
150 pixmaps/Makefile
151 themes/Makefile
152 themes/hicolor/Makefile
153 po/Makefile.in
154 doc/Makefile
155 doc/images/Makefile
156 plugins/Makefile
157 ])
158
159 AC_OUTPUT
160
161 # *************************************
162 # *************************************
163
164 echo
165 echo $PACKAGE $VERSION
166 echo
167 echo Compiler................ : $CC
168 echo Build with OFX support.. : $build_ofx
169 echo Build with perl support. : $build_perl
170 if test "x$noofx" = "xtrue" ; then
171 echo ........................ : **error** libofx header is missing, ofx feature will be disabled. Check your libofx installation
172 fi
173 eval eval echo Path to images.......... : $datadir/homebank/images
174 eval eval echo Path to locale.......... : $datadir/locale
175 eval eval echo Path to help............ : $datadir/homebank/help
176
177 echo
178 eval eval echo HomeBank will be installed in $bindir.
179 echo
180 echo configure complete, now type \'make\'
181 echo
182
This page took 0.03924 seconds and 4 git commands to generate.