build-sys: Fix running tests with latest versions of Automake
[geda-gaf.git] / configure.ac
blob1eed6883d9c035b9e60d3567b6ce616ca9860e5f
1 dnl                                                      -*-Autoconf-*-
2 dnl Process this file with autoconf to generate configure.
3 dnl
4 dnl The AX_* macros are defined in files in the top-level m4
5 dnl directory.
7 #####################################################################
8 # Set up configuration system
9 #####################################################################
11 AC_INIT([gEDA/gaf], [1.9.0], [https://bugs.launchpad.net/geda], [geda-gaf])
12 AC_PREREQ([2.60])
14 AC_CONFIG_SRCDIR([libgeda/src/libgeda.c])
15 AC_CONFIG_AUX_DIR([build-tools])
16 AC_CONFIG_MACRO_DIR([m4])
17 AC_CONFIG_HEADER([config.h])
19 # 'serial-tests' option disables support for parallel testsuites
20 # present in recent versions of Automake.
21 AM_INIT_AUTOMAKE([serial-tests])
22 AM_SILENT_RULES
24 AC_GNU_SOURCE # FIXME for some reason this is needed?
26 #####################################################################
27 # Do version number magic
28 #####################################################################
30 AX_GIT_VERSION([20121203])
32 # This is used for keeping the ChangeLog files up-to-date
33 AC_SUBST([CHANGELOG_BASE], [1.0-20070526])
35 #####################################################################
36 # Windows/MinGW/Cygwin support
37 #####################################################################
39 AX_WINDOWS_FLAGS
41 #####################################################################
42 # Check for compiling & linking tools
43 #####################################################################
45 AC_PROG_CC
46 AC_PROG_CPP
47 AM_PROG_AR
49 AC_LIBTOOL_WIN32_DLL
50 AC_DISABLE_STATIC
51 AC_PROG_LIBTOOL
53 AM_PROG_CC_C_O
54 AX_GCC_FLAGS([-Wall])
56 AC_PROG_MKDIR_P
57 AM_PROG_LEX
58 AX_PROG_AWK
59 AX_PROG_GROFF
60 AC_PATH_PROGS([M4], [gm4 m4], [m4])
62 #####################################################################
63 # Internationalisation
64 #####################################################################
66 AM_NLS
67 AM_GNU_GETTEXT
68 AM_GNU_GETTEXT_VERSION([0.16])
69 AX_DESKTOP_I18N
71 #####################################################################
72 # Check for libraries that use pkg-config
73 #####################################################################
75 PKG_PROG_PKG_CONFIG
77 AX_CHECK_GUILE([1.8.0])
79 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.20.0], ,
80   AC_MSG_ERROR([GLib 2.20.0 or later is required.]))
82 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.16.0], ,
83   AC_MSG_ERROR([GTK+ 2.16.0 or later is required.]))
85 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.16.0], ,
86   AC_MSG_ERROR([GDK 2.16.0 or later is required.]))
88 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.16.0], ,
89   AC_MSG_ERROR([GDK_PIXBUF 2.16.0 or later is required.]))
91 AX_CHECK_CAIRO
93 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 0.26], ,
94   AC_MSG_ERROR([PANGOCAIRO 0.26 or later is required.]))
96 PKG_CHECK_MODULES(PANGO, [pango >= 1.23.0], ,
97   AC_MSG_ERROR([PANGO 1.23.0 or later is required.]))
99 #####################################################################
100 # Header files & particular functions
101 #####################################################################
103 AC_HEADER_SYS_WAIT
105 # FIXME these checks are obsolete, because every plausible platform
106 # provides what they check for.
107 AC_HEADER_STDC
109 # FIXME these checks may be pointless for one of three reasons: every
110 # even vaguely sane libc implementation provides them; we don't use
111 # any of their functions in favour of GLib alternatives; or we don't
112 # provide an alternative, so the build will fail anyway.
113 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
115 # FIXME since we don't have a sensible alternative, if these headers
116 # are missing we should fail. Also need to remove HAVE_ERRNO_H tests
117 # in the C source code, since if we *don't* have it the build will
118 # fail anyway.
119 AC_CHECK_HEADERS([errno.h fcntl.h])
121 # FIXME On a system without locale.h, the user may have just disabled NLS
122 # to be able to build.  But are there known systems with working NLS but
123 # without a locale.h?  We do need to include locale.h on some systems
124 # to be able to build gschem/src/gschem.c
125 AC_CHECK_HEADERS([locale.h])
127 # Check for lrint in math library.
128 AC_CHECK_LIB([m], [lrint],
129              AC_DEFINE([HAVE_LRINT], 1,
130                        [If your math library has lrint in it, define this]))
132 AC_CHECK_LIB([m], [atan2])
134 AC_CHECK_FUNCS([chown getlogin])
136 # Check if the getopt header is present
137 AC_CHECK_HEADERS([getopt.h])
138 # Check for getopt_long
139 # On FreeBSD the 'gnugetopt' library is needed.
140 AC_SEARCH_LIBS([getopt_long], [gnugetopt],
141                AC_DEFINE([HAVE_GETOPT_LONG], 1,
142                          [Define to 1 if you have the `getopt_long' function.]))
144 # Check for misc features of awk
145 AX_AWK_FEATURES
147 #####################################################################
148 # Optional things
149 #####################################################################
151 # Assertions
152 AX_OPTION_ASSERT
153 # Viewing documentation
154 AX_OPTION_URI_VIEWER
155 # API documentation
156 AX_OPTION_DOXYGEN
157 # XDG desktop files
158 AX_OPTION_XDG_DATA
159 # KDE 3 desktop files
160 AX_OPTION_KDE3_DATA
161 # XDG database updates
162 AX_OPTION_XDG_DB
163 # libstroke support
164 AX_OPTION_STROKE
165 # gattrib
166 AX_OPTION_GATTRIB
168 #####################################################################
169 # Tool-specific setup
170 #####################################################################
172 # Where should data files be installed/searched for?
173 AX_DATA_DIRS
174 # Where should PCB footprints be searched for?
175 AX_PCB_DIRS
176 # Set up libgeda with the correct ld version number
177 AX_LIBGEDA([43:0:0])
178 # Set up libgedacairo with the correct ld version number
179 AX_LIBGEDACAIRO([1:0:0])
181 #####################################################################
182 # Generate output
183 #####################################################################
185 AC_CONFIG_FILES([Makefile
186                  intl/Makefile
188                  libgeda/Makefile
189                  libgeda/libgeda.pc
190                  libgeda/po/domain.mak
191                  libgeda/po/Makefile.in
192                  libgeda/data/Makefile
193                  libgeda/docs/Makefile
194                  libgeda/docs/images/Makefile
195                  libgeda/include/Makefile
196                  libgeda/lib/Makefile
197                  libgeda/scheme/Makefile
198                  libgeda/src/Makefile
200                  libgedacairo/Makefile
201                  libgedacairo/libgedacairo.pc
203                  gaf/Makefile
204                  gaf/po/Makefile.in
206                  gschem/Makefile
207                  gschem/po/Makefile.in
208                  gschem/docs/Makefile
209                  gschem/include/Makefile
210                  gschem/scripts/Makefile
211                  gschem/src/Makefile
212                  gschem/examples/Makefile
213                  gschem/lib/Makefile
214                  gschem/data/Makefile
215                  gschem/bitmap/Makefile
216                  gschem/tests/Makefile
217                  gschem/scheme/Makefile
219                  gattrib/Makefile
220                  gattrib/po/Makefile.in
221                  gattrib/design/Makefile
222                  gattrib/docs/Makefile
223                  gattrib/include/Makefile
224                  gattrib/lib/Makefile
225                  gattrib/lib/system-gattribrc
226                  gattrib/src/Makefile
227                  gattrib/data/Makefile
229                  gsymcheck/docs/Makefile
230                  gsymcheck/include/Makefile
231                  gsymcheck/lib/Makefile
232                  gsymcheck/lib/system-gsymcheckrc
233                  gsymcheck/po/Makefile.in
234                  gsymcheck/src/Makefile
235                  gsymcheck/tests/Makefile
236                  gsymcheck/Makefile
238                  gnetlist/Makefile
239                  gnetlist/po/Makefile.in
240                  gnetlist/src/Makefile
241                  gnetlist/include/Makefile
242                  gnetlist/scheme/Makefile
243                  gnetlist/examples/Makefile
244                  gnetlist/tests/Makefile
245                  gnetlist/tests/hierarchy/Makefile
246                  gnetlist/tests/hierarchy2/Makefile
247                  gnetlist/tests/drc2/Makefile
248                  gnetlist/tests/common/Makefile
249                  gnetlist/docs/Makefile
250                  gnetlist/docs/vams/Makefile
251                  gnetlist/examples/vams/Makefile
252                  gnetlist/examples/vams/vhdl/Makefile
253                  gnetlist/examples/vams/vhdl/basic-vhdl/Makefile
254                  gnetlist/examples/vams/vhdl/new-vhdl/Makefile
255                  gnetlist/examples/switcap/Makefile
256                  gnetlist/lib/Makefile
257                  gnetlist/utils/Makefile
258                  gnetlist/scripts/Makefile
259                  gnetlist/scripts/annotate.sh
260                  gnetlist/scripts/bom_xref.sh
261                  gnetlist/scripts/bompp.sh
262                  gnetlist/lib/system-gnetlistrc
264                  utils/Makefile
265                  utils/docs/Makefile
266                  utils/examples/Makefile
267                  utils/examples/gmk_sym/Makefile
268                  utils/examples/gsch2pcb/Makefile
269                  utils/examples/tragesym/Makefile
270                  utils/gschlas/Makefile
271                  utils/gxyrs/Makefile
272                  utils/include/Makefile
273                  utils/lib/Makefile
274                  utils/lib/system-gschlasrc
275                  utils/scripts/Makefile
276                  utils/scripts/sw2asc
277                  utils/src/Makefile
278                  utils/tests/Makefile
279                  utils/tests/gxyrs/Makefile
280                  utils/tests/gxyrs/inputs/Makefile
281                  utils/tests/gxyrs/outputs/Makefile
282                  utils/tests/refdes_renum/Makefile
283                  utils/tests/refdes_renum/inputs/Makefile
284                  utils/tests/refdes_renum/outputs/Makefile
286                  symbols/Makefile
287                  symbols/documentation/Makefile
289                  docs/Makefile
290                  docs/scheme-api/Makefile
291                  docs/toplevel/Makefile
292                  docs/toplevel/gedadocs.html
293                  docs/wiki/Makefile
295                  examples/Makefile
296                  examples/RF_Amp/Makefile
297                  examples/RF_Amp/model/Makefile
298                  examples/RF_Amp/sym/Makefile
299                  examples/TwoStageAmp/Makefile
300                  examples/gTAG/Makefile
301                  examples/lightning_detector/Makefile
303 AC_OUTPUT