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.9.2], [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])
22 AC_GNU_SOURCE # FIXME for some reason this is needed?
24 #####################################################################
25 # Do version number magic
26 #####################################################################
28 AX_GIT_VERSION([20150930])
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
52 AX_GCC_FLAGS([-Wall -Werror=maybe-uninitialized -std=gnu99])
58 AC_PATH_PROGS([M4], [gm4 m4], [m4])
60 #####################################################################
61 # Internationalisation
62 #####################################################################
65 AM_GNU_GETTEXT([external])
66 AM_GNU_GETTEXT_VERSION([0.18])
69 #####################################################################
70 # Check for libraries that use pkg-config
71 #####################################################################
75 AX_CHECK_GUILE([2.0.0])
77 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.20.0], ,
78 AC_MSG_ERROR([GLib 2.20.0 or later is required.]))
80 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.20.0], ,
81 AC_MSG_ERROR([GIO 2.20.0 or later is required.]))
83 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], ,
84 AC_MSG_ERROR([GTK+ 2.18.0 or later is required.]))
86 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.18.0], ,
87 AC_MSG_ERROR([GDK 2.18.0 or later is required.]))
89 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.18.0], ,
90 AC_MSG_ERROR([GDK_PIXBUF 2.18.0 or later is required.]))
94 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 0.26], ,
95 AC_MSG_ERROR([PANGOCAIRO 0.26 or later is required.]))
97 PKG_CHECK_MODULES(PANGO, [pango >= 1.23.0], ,
98 AC_MSG_ERROR([PANGO 1.23.0 or later is required.]))
100 #####################################################################
101 # Header files & particular functions
102 #####################################################################
106 # FIXME these checks are obsolete, because every plausible platform
107 # provides what they check for.
110 # FIXME these checks may be pointless for one of three reasons: every
111 # even vaguely sane libc implementation provides them; we don't use
112 # any of their functions in favour of GLib alternatives; or we don't
113 # provide an alternative, so the build will fail anyway.
114 AC_CHECK_HEADERS([math.h stdlib.h string.h unistd.h])
116 # FIXME since we don't have a sensible alternative, if these headers
117 # are missing we should fail. Also need to remove HAVE_ERRNO_H tests
118 # in the C source code, since if we *don't* have it the build will
120 AC_CHECK_HEADERS([errno.h fcntl.h])
122 # FIXME On a system without locale.h, the user may have just disabled NLS
123 # to be able to build. But are there known systems with working NLS but
124 # without a locale.h? We do need to include locale.h on some systems
125 # to be able to build gschem/src/gschem.c
126 AC_CHECK_HEADERS([locale.h])
128 # Check for lrint in math library.
129 AC_CHECK_LIB([m], [lrint],
130 AC_DEFINE([HAVE_LRINT], 1,
131 [If your math library has lrint in it, define this]))
133 AC_CHECK_LIB([m], [atan2])
135 AC_CHECK_FUNCS([chown getlogin])
137 # Check if the getopt header is present
138 AC_CHECK_HEADERS([getopt.h])
139 # Check for getopt_long
140 # On FreeBSD the 'gnugetopt' library is needed.
141 AC_SEARCH_LIBS([getopt_long], [gnugetopt],
142 AC_DEFINE([HAVE_GETOPT_LONG], 1,
143 [Define to 1 if you have the `getopt_long' function.]))
145 # Check for misc features of awk
148 #####################################################################
150 #####################################################################
154 # Deprecated features
156 # Viewing documentation
162 # KDE 3 desktop files
164 # XDG database updates
171 #####################################################################
172 # Tool-specific setup
173 #####################################################################
175 # Where should data files be installed/searched for?
177 # Where should PCB footprints be searched for?
179 # Set up libgeda with the correct ld version number
181 # Set up libgedacairo with the correct ld version number
182 AX_LIBGEDACAIRO([1:1:0])
184 #####################################################################
185 # Recurse into Xorn configuration
186 #####################################################################
188 AC_ARG_ENABLE([xorn],
189 [AS_HELP_STRING([--disable-xorn],
190 [don't build and install Xorn])],
191 [], [export enable_xorn; enable_xorn=yes])
193 case "${enable_xorn}" in
194 yes) AC_DEFINE([HAVE_XORN], 1, [Define to 1 if using Xorn.]) ;;
196 *) AC_MSG_ERROR([bad value ${enable_xorn} for --enable-xorn]) ;;
199 AM_CONDITIONAL([XORN], [test x$enable_xorn = xyes])
204 AC_CONFIG_SUBDIRS([xorn])
206 #####################################################################
208 #####################################################################
210 AC_CONFIG_FILES([Makefile
214 libgeda/po/domain.mak
215 libgeda/po/Makefile.in
216 libgeda/data/Makefile
217 libgeda/docs/Makefile
218 libgeda/docs/images/Makefile
219 libgeda/include/Makefile
221 libgeda/scheme/Makefile
223 libgeda/tests/Makefile
225 libgedacairo/Makefile
226 libgedacairo/libgedacairo.pc
232 gschem/po/Makefile.in
234 gschem/include/Makefile
235 gschem/scripts/Makefile
237 gschem/examples/Makefile
240 gschem/bitmap/Makefile
241 gschem/tests/Makefile
242 gschem/scheme/Makefile
245 gattrib/po/Makefile.in
246 gattrib/design/Makefile
247 gattrib/docs/Makefile
248 gattrib/include/Makefile
250 gattrib/lib/system-gattribrc
252 gattrib/data/Makefile
254 gsymcheck/docs/Makefile
255 gsymcheck/include/Makefile
256 gsymcheck/lib/Makefile
257 gsymcheck/lib/system-gsymcheckrc
258 gsymcheck/po/Makefile.in
259 gsymcheck/src/Makefile
260 gsymcheck/tests/Makefile
264 gnetlist/po/Makefile.in
265 gnetlist/src/Makefile
266 gnetlist/include/Makefile
267 gnetlist/scheme/Makefile
268 gnetlist/examples/Makefile
269 gnetlist/tests/Makefile
270 gnetlist/docs/Makefile
271 gnetlist/docs/vams/Makefile
272 gnetlist/examples/vams/Makefile
273 gnetlist/examples/vams/vhdl/Makefile
274 gnetlist/examples/vams/vhdl/basic-vhdl/Makefile
275 gnetlist/examples/vams/vhdl/new-vhdl/Makefile
276 gnetlist/examples/switcap/Makefile
277 gnetlist/lib/Makefile
278 gnetlist/utils/Makefile
279 gnetlist/scripts/Makefile
280 gnetlist/scripts/annotate.sh
281 gnetlist/scripts/bom_xref.sh
282 gnetlist/scripts/bompp.sh
283 gnetlist/lib/system-gnetlistrc
287 utils/examples/Makefile
288 utils/examples/gmk_sym/Makefile
289 utils/examples/gsch2pcb/Makefile
290 utils/examples/tragesym/Makefile
291 utils/gschlas/Makefile
293 utils/include/Makefile
295 utils/lib/system-gschlasrc
296 utils/scripts/Makefile
299 utils/tests/gxyrs/Makefile
300 utils/tests/gxyrs/inputs/Makefile
301 utils/tests/gxyrs/outputs/Makefile
302 utils/tests/refdes_renum/Makefile
303 utils/tests/refdes_renum/inputs/Makefile
304 utils/tests/refdes_renum/outputs/Makefile
307 symbols/documentation/Makefile
310 docs/scheme-api/Makefile
311 docs/toplevel/Makefile
312 docs/toplevel/gedadocs.html
316 examples/RF_Amp/Makefile
317 examples/RF_Amp/model/Makefile
318 examples/RF_Amp/sym/Makefile
319 examples/TwoStageAmp/Makefile
320 examples/gTAG/Makefile
321 examples/lightning_detector/Makefile
324 contrib/smash_megafile/Makefile
325 contrib/olib/Makefile
326 contrib/gmk_sym/Makefile
327 contrib/sarlacc_schem/Makefile
328 contrib/scripts/Makefile
329 contrib/scripts/sw2asc
333 if test "x${enable_xorn}" != "xyes"
336 ########################################################################
338 ## You chose to disable Xorn during configuration. This means ##
339 ## core functionality will not be available. Most notably, you ##
340 ## won't be able to use the new gnetlist frontend. ##
342 ########################################################################