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