import homebank-5.1.7
[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.7])
6 #AC_INIT([homebank], [x.x-rc])
7
8 AM_CONFIG_HEADER(config.h)
9
10 AM_INIT_AUTOMAKE([1.9 foreign])
11
12 # If the source code has changed at all, increment REVISION
13 # If any interfaces have been added, removed, or changed, increment CURRENT, and set REVISION to 0.
14 # If any interfaces have been added since the last public release, then increment AGE.
15 # If any interfaces have been removed since the last public release, then set AGE to 0.
16 # Reference: http://www.gnu.org/software/libtool/manual.html#Versioning
17
18 # Checks for programs.
19 AC_PROG_CC
20 AC_PROG_LN_S
21 AC_PROG_INSTALL
22 AC_PROG_INTLTOOL
23
24 # Checks for libraries.
25 PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.16 glib-2.0 >= 2.39)
26 AC_SUBST(DEPS_CFLAGS)
27 AC_SUBST(DEPS_LIBS)
28 AC_CHECK_LIB(m, pow)
29
30 PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])
31 AC_SUBST(LIBSOUP_CFLAGS)
32 AC_SUBST(LIBSOUP_LIBS)
33
34 # general usage flags
35 CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes"
36
37 # disable deprecated warnings
38 CFLAGS="${CFLAGS} -Wno-deprecated-declarations"
39
40 # extended flags
41 #CFLAGS="${CFLAGS} -Wextra -Wno-unused-parameter"
42
43 # profiling valgrind/gprof flags
44 #CFLAGS="${CFLAGS} -g -O0 -pg"
45
46 # pre-relase # 2 - error as warning for
47 #CFLAGS="${CFLAGS} -Werror"
48
49 # gtk3 migration
50 #CFLAGS="${CFLAGS} -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE"
51
52 # GLib/Gtk deprecated flags
53 #CFLAGS="${CFLAGS} -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
54
55
56 # Check for libofx
57 AC_CHECK_HEADER(libofx/libofx.h,,noofx=true)
58 AC_ARG_WITH(ofx,
59 [ --without-ofx build without ofx support [default=with]],
60 [build_ofx=$withval],
61 [build_ofx=yes]
62 )
63 if test x$build_ofx != xno
64 then
65 if test x$noofx != xtrue
66 then
67 AC_CHECK_LIB(ofx, ofx_set_status_cb, OFX_0_7="-DOFX_ENABLE")
68 DEPS_LIBS="-lofx ${DEPS_LIBS}"
69 CFLAGS="${CFLAGS} $OFX_0_7"
70 else
71 noofx=true
72 AC_MSG_RESULT([Libofx header missing. Check your libofx installation])
73 CFLAGS="${CFLAGS} -DNOOFX"
74 fi
75 else
76 noofx=true
77 CFLAGS="${CFLAGS} -DNOOFX"
78 fi
79 AM_CONDITIONAL(NOOFX, test x$noofx = xtrue)
80
81 # Checks for header files.
82 AC_HEADER_STDC
83 AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h])
84
85 # Checks for typedefs, structures, and compiler characteristics.
86 AC_HEADER_STDBOOL
87 AC_C_CONST
88 AC_STRUCT_TM
89 AC_C_VOLATILE
90
91 # Checks for library functions.
92 AC_CHECK_FUNCS([floor localeconv memset modf pow setlocale sqrt strcasecmp strtoul])
93
94 # International support
95 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"
96
97 AM_GLIB_GNU_GETTEXT
98
99 GETTEXT_PACKAGE=$PACKAGE
100 AC_SUBST(GETTEXT_PACKAGE)
101 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])
102
103 AC_CONFIG_FILES([
104 Makefile
105 src/Makefile
106 data/homebank.desktop.in
107 data/Makefile
108 data/datas/Makefile
109 images/Makefile
110 mime/Makefile
111 pixmaps/Makefile
112 themes/Makefile
113 themes/hicolor/Makefile
114 po/Makefile.in
115 doc/Makefile
116 doc/images/Makefile
117 ])
118
119 AC_OUTPUT
120
121 # *************************************
122 # *************************************
123
124 echo
125 echo $PACKAGE $VERSION
126 echo
127 echo Compiler................ : $CC
128 echo Build with OFX support.. : $build_ofx
129 if test "x$noofx" = "xtrue" ; then
130 echo ........................ : **error** libofx header is missing, ofx feature will be disabled. Check your libofx installation
131 fi
132 eval eval echo Path to images.......... : $datadir/homebank/images
133 eval eval echo Path to locale.......... : $datadir/locale
134 eval eval echo Path to help............ : $datadir/homebank/help
135
136 echo
137 eval eval echo HomeBank will be installed in $bindir.
138 echo
139 echo configure complete, now type \'make\'
140 echo
141
This page took 0.045387 seconds and 4 git commands to generate.