2 dnl Process this file with autoconf to generate configure.
4 dnl The AX_* macros are defined in files in the top-level m4
7 #####################################################################
8 # Set up configuration system
9 #####################################################################
11 AC_INIT([gEDA/gaf], [1.10.0], [https://bugs.launchpad.net/geda], [geda-gaf])
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 AM_INIT_AUTOMAKE([parallel-tests color-tests tar-ustar])
22 AC_GNU_SOURCE # FIXME for some reason this is needed?
24 #####################################################################
25 # Do version number magic
26 #####################################################################
28 AX_GIT_VERSION([20191008])
30 # This is used for keeping the ChangeLog files up-to-date
31 AC_SUBST([CHANGELOG_BASE], [1.0-20070526])
33 #####################################################################
34 # Windows/MinGW/Cygwin support
35 #####################################################################
39 #####################################################################
40 # Check for compiling & linking tools
41 #####################################################################
45 m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.11
48 if test "X$ac_cv_prog_cc_stdc" = "Xno"; then
49 AC_MSG_ERROR([C compiler cannot compile ISO Standard C])
58 AX_PROG_CC_WARNING([maybe_uninitialized], [maybe-uninitialized])
59 AX_PROG_CC_WARNING([misleading_indentation], [misleading-indentation])
61 AX_GCC_FLAGS([-Wall $Werror_maybe_uninitialized_IF_SUPPORTED])
67 AC_PATH_PROGS([M4], [gm4 m4], [m4])
69 #####################################################################
70 # Internationalisation
71 #####################################################################
74 AM_GNU_GETTEXT([external])
75 AM_GNU_GETTEXT_VERSION([0.18])
78 #####################################################################
79 # Check for libraries that use pkg-config
80 #####################################################################
84 AX_CHECK_GUILE([2.2.4])
86 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.41.1], ,
87 AC_MSG_ERROR([GLib 2.20.0 or later is required.]))
89 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.20.0], ,
90 AC_MSG_ERROR([GIO 2.20.0 or later is required.]))
92 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], ,
93 AC_MSG_ERROR([GTK+ 2.18.0 or later is required.]))
94 GTK_CFLAGS=`echo "$GTK_CFLAGS" | sed "s/-I\\(@<:@^ @:>@*gtk\\)/-isystem\\1/g"`
96 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.18.0], ,
97 AC_MSG_ERROR([GDK 2.18.0 or later is required.]))
98 GDK_CFLAGS=`echo "$GDK_CFLAGS" | sed "s/-I\\(@<:@^ @:>@*gtk\\)/-isystem\\1/g"`
100 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.18.0], ,
101 AC_MSG_ERROR([GDK_PIXBUF 2.18.0 or later is required.]))
105 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 0.26], ,
106 AC_MSG_ERROR([PANGOCAIRO 0.26 or later is required.]))
108 PKG_CHECK_MODULES(PANGO, [pango >= 1.23.0], ,
109 AC_MSG_ERROR([PANGO 1.23.0 or later is required.]))
111 #####################################################################
112 # Header files & particular functions
113 #####################################################################
117 # FIXME these checks are obsolete, because every plausible platform
118 # provides what they check for.
121 # FIXME these checks may be pointless for one of three reasons: every
122 # even vaguely sane libc implementation provides them; we don't use
123 # any of their functions in favour of GLib alternatives; or we don't
124 # provide an alternative, so the build will fail anyway.
125 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
127 # FIXME since we don't have a sensible alternative, if these headers
128 # are missing we should fail. Also need to remove HAVE_ERRNO_H tests
129 # in the C source code, since if we *don't* have it the build will
131 AC_CHECK_HEADERS([errno.h fcntl.h])
133 # FIXME On a system without locale.h, the user may have just disabled NLS
134 # to be able to build. But are there known systems with working NLS but
135 # without a locale.h? We do need to include locale.h on some systems
136 # to be able to build gschem/src/gschem.c
137 AC_CHECK_HEADERS([locale.h])
139 # Check for lrint in math library.
140 AC_CHECK_LIB([m], [lrint],
141 AC_DEFINE([HAVE_LRINT], 1,
142 [If your math library has lrint in it, define this]))
144 AC_CHECK_LIB([m], [atan2])
146 AC_CHECK_FUNCS([chown getlogin])
148 # Check if the getopt header is present
149 AC_CHECK_HEADERS([getopt.h])
150 # Check for getopt_long
151 # On FreeBSD the 'gnugetopt' library is needed.
152 AC_SEARCH_LIBS([getopt_long], [gnugetopt],
153 AC_DEFINE([HAVE_GETOPT_LONG], 1,
154 [Define to 1 if you have the `getopt_long' function.]))
156 # Check for misc features of awk
159 #####################################################################
161 #####################################################################
165 # Viewing documentation
171 # KDE 3 desktop files
173 # XDG database updates
180 #####################################################################
181 # Tool-specific setup
182 #####################################################################
184 # Where should data files be installed/searched for?
186 # Where should PCB footprints be searched for?
188 # Set up libgeda with the correct ld version number
190 # Set up libgedacairo with the correct ld version number
191 AX_LIBGEDACAIRO([1:2:0])
193 #####################################################################
194 # Recurse into Xorn configuration
195 #####################################################################
200 AC_CONFIG_SUBDIRS([xorn])
202 #####################################################################
204 #####################################################################
206 AC_CONFIG_FILES([Makefile
210 libgeda/po/domain.mak
211 libgeda/po/Makefile.in
212 libgeda/data/Makefile
213 libgeda/docs/Makefile
214 libgeda/docs/images/Makefile
215 libgeda/include/Makefile
217 libgeda/scheme/Makefile
220 libgedacairo/Makefile
221 libgedacairo/libgedacairo.pc
227 gschem/po/Makefile.in
229 gschem/include/Makefile
230 gschem/scripts/Makefile
232 gschem/examples/Makefile
235 gschem/bitmap/Makefile
236 gschem/tests/Makefile
237 gschem/scheme/Makefile
240 gattrib/po/Makefile.in
241 gattrib/design/Makefile
242 gattrib/docs/Makefile
243 gattrib/include/Makefile
245 gattrib/lib/system-gattribrc
247 gattrib/data/Makefile
249 gsymcheck/docs/Makefile
250 gsymcheck/include/Makefile
251 gsymcheck/lib/Makefile
252 gsymcheck/lib/system-gsymcheckrc
253 gsymcheck/po/Makefile.in
254 gsymcheck/src/Makefile
255 gsymcheck/tests/Makefile
258 gnetlist-legacy/Makefile
259 gnetlist-legacy/po/Makefile.in
260 gnetlist-legacy/src/Makefile
261 gnetlist-legacy/include/Makefile
262 gnetlist-legacy/scheme/Makefile
263 gnetlist-legacy/examples/Makefile
264 gnetlist-legacy/tests/Makefile
265 gnetlist-legacy/docs/Makefile
266 gnetlist-legacy/docs/vams/Makefile
267 gnetlist-legacy/examples/vams/Makefile
268 gnetlist-legacy/examples/vams/vhdl/Makefile
269 gnetlist-legacy/examples/vams/vhdl/basic-vhdl/Makefile
270 gnetlist-legacy/examples/vams/vhdl/new-vhdl/Makefile
271 gnetlist-legacy/examples/switcap/Makefile
272 gnetlist-legacy/lib/Makefile
273 gnetlist-legacy/utils/Makefile
274 gnetlist-legacy/scripts/Makefile
275 gnetlist-legacy/scripts/annotate.sh
276 gnetlist-legacy/scripts/bom_xref.sh
277 gnetlist-legacy/scripts/bompp.sh
278 gnetlist-legacy/lib/system-gnetlistrc
282 utils/examples/Makefile
283 utils/examples/gmk_sym/Makefile
284 utils/examples/gsch2pcb/Makefile
285 utils/examples/tragesym/Makefile
286 utils/gschlas/Makefile
288 utils/include/Makefile
290 utils/lib/system-gschlasrc
291 utils/scripts/Makefile
293 utils/tests/gxyrs/Makefile
294 utils/tests/refdes_renum/Makefile
297 symbols/documentation/Makefile
300 docs/scheme-api/Makefile
301 docs/toplevel/Makefile
302 docs/toplevel/gedadocs.html
306 examples/RF_Amp/Makefile
307 examples/RF_Amp/model/Makefile
308 examples/RF_Amp/sym/Makefile
309 examples/TwoStageAmp/Makefile
310 examples/gTAG/Makefile
311 examples/lightning_detector/Makefile
314 contrib/smash_megafile/Makefile
315 contrib/olib/Makefile
316 contrib/gmk_sym/Makefile
317 contrib/sarlacc_schem/Makefile
318 contrib/scripts/Makefile
319 contrib/scripts/sw2asc