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 tar-ustar])
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
53 AX_PROG_CC_WARNING([maybe_uninitialized], [maybe-uninitialized])
54 AX_PROG_CC_WARNING([misleading_indentation], [misleading-indentation])
56 AX_GCC_FLAGS([-Wall $Werror_maybe_uninitialized_IF_SUPPORTED])
62 AC_PATH_PROGS([M4], [gm4 m4], [m4])
64 #####################################################################
65 # Internationalisation
66 #####################################################################
69 AM_GNU_GETTEXT([external])
70 AM_GNU_GETTEXT_VERSION([0.18])
73 #####################################################################
74 # Check for libraries that use pkg-config
75 #####################################################################
79 AX_CHECK_GUILE([2.0.0])
81 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.20.0], ,
82 AC_MSG_ERROR([GLib 2.20.0 or later is required.]))
84 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.20.0], ,
85 AC_MSG_ERROR([GIO 2.20.0 or later is required.]))
87 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0], ,
88 AC_MSG_ERROR([GTK+ 2.18.0 or later is required.]))
90 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.18.0], ,
91 AC_MSG_ERROR([GDK 2.18.0 or later is required.]))
93 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.18.0], ,
94 AC_MSG_ERROR([GDK_PIXBUF 2.18.0 or later is required.]))
98 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 0.26], ,
99 AC_MSG_ERROR([PANGOCAIRO 0.26 or later is required.]))
101 PKG_CHECK_MODULES(PANGO, [pango >= 1.23.0], ,
102 AC_MSG_ERROR([PANGO 1.23.0 or later is required.]))
104 #####################################################################
105 # Header files & particular functions
106 #####################################################################
110 # FIXME these checks are obsolete, because every plausible platform
111 # provides what they check for.
114 # FIXME these checks may be pointless for one of three reasons: every
115 # even vaguely sane libc implementation provides them; we don't use
116 # any of their functions in favour of GLib alternatives; or we don't
117 # provide an alternative, so the build will fail anyway.
118 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
120 # FIXME since we don't have a sensible alternative, if these headers
121 # are missing we should fail. Also need to remove HAVE_ERRNO_H tests
122 # in the C source code, since if we *don't* have it the build will
124 AC_CHECK_HEADERS([errno.h fcntl.h])
126 # FIXME On a system without locale.h, the user may have just disabled NLS
127 # to be able to build. But are there known systems with working NLS but
128 # without a locale.h? We do need to include locale.h on some systems
129 # to be able to build gschem/src/gschem.c
130 AC_CHECK_HEADERS([locale.h])
132 # Check for lrint in math library.
133 AC_CHECK_LIB([m], [lrint],
134 AC_DEFINE([HAVE_LRINT], 1,
135 [If your math library has lrint in it, define this]))
137 AC_CHECK_LIB([m], [atan2])
139 AC_CHECK_FUNCS([chown getlogin])
141 # Check if the getopt header is present
142 AC_CHECK_HEADERS([getopt.h])
143 # Check for getopt_long
144 # On FreeBSD the 'gnugetopt' library is needed.
145 AC_SEARCH_LIBS([getopt_long], [gnugetopt],
146 AC_DEFINE([HAVE_GETOPT_LONG], 1,
147 [Define to 1 if you have the `getopt_long' function.]))
149 # Check for misc features of awk
152 #####################################################################
154 #####################################################################
158 # Viewing documentation
164 # KDE 3 desktop files
166 # XDG database updates
173 #####################################################################
174 # Tool-specific setup
175 #####################################################################
177 # Where should data files be installed/searched for?
179 # Where should PCB footprints be searched for?
181 # Set up libgeda with the correct ld version number
183 # Set up libgedacairo with the correct ld version number
184 AX_LIBGEDACAIRO([1:1:0])
186 #####################################################################
187 # Recurse into Xorn configuration
188 #####################################################################
193 AC_CONFIG_SUBDIRS([xorn])
195 #####################################################################
197 #####################################################################
199 AC_CONFIG_FILES([Makefile
203 libgeda/po/domain.mak
204 libgeda/po/Makefile.in
205 libgeda/data/Makefile
206 libgeda/docs/Makefile
207 libgeda/docs/images/Makefile
208 libgeda/include/Makefile
210 libgeda/scheme/Makefile
213 libgedacairo/Makefile
214 libgedacairo/libgedacairo.pc
220 gschem/po/Makefile.in
222 gschem/include/Makefile
223 gschem/scripts/Makefile
225 gschem/examples/Makefile
228 gschem/bitmap/Makefile
229 gschem/tests/Makefile
230 gschem/scheme/Makefile
233 gattrib/po/Makefile.in
234 gattrib/design/Makefile
235 gattrib/docs/Makefile
236 gattrib/include/Makefile
238 gattrib/lib/system-gattribrc
240 gattrib/data/Makefile
242 gsymcheck/docs/Makefile
243 gsymcheck/include/Makefile
244 gsymcheck/lib/Makefile
245 gsymcheck/lib/system-gsymcheckrc
246 gsymcheck/po/Makefile.in
247 gsymcheck/src/Makefile
248 gsymcheck/tests/Makefile
251 gnetlist-legacy/Makefile
252 gnetlist-legacy/po/Makefile.in
253 gnetlist-legacy/src/Makefile
254 gnetlist-legacy/include/Makefile
255 gnetlist-legacy/scheme/Makefile
256 gnetlist-legacy/examples/Makefile
257 gnetlist-legacy/tests/Makefile
258 gnetlist-legacy/docs/Makefile
259 gnetlist-legacy/docs/vams/Makefile
260 gnetlist-legacy/examples/vams/Makefile
261 gnetlist-legacy/examples/vams/vhdl/Makefile
262 gnetlist-legacy/examples/vams/vhdl/basic-vhdl/Makefile
263 gnetlist-legacy/examples/vams/vhdl/new-vhdl/Makefile
264 gnetlist-legacy/examples/switcap/Makefile
265 gnetlist-legacy/lib/Makefile
266 gnetlist-legacy/utils/Makefile
267 gnetlist-legacy/scripts/Makefile
268 gnetlist-legacy/scripts/annotate.sh
269 gnetlist-legacy/scripts/bom_xref.sh
270 gnetlist-legacy/scripts/bompp.sh
271 gnetlist-legacy/lib/system-gnetlistrc
275 utils/examples/Makefile
276 utils/examples/gmk_sym/Makefile
277 utils/examples/gsch2pcb/Makefile
278 utils/examples/tragesym/Makefile
279 utils/gschlas/Makefile
281 utils/include/Makefile
283 utils/lib/system-gschlasrc
284 utils/scripts/Makefile
286 utils/tests/gxyrs/Makefile
287 utils/tests/refdes_renum/Makefile
290 symbols/documentation/Makefile
293 docs/scheme-api/Makefile
294 docs/toplevel/Makefile
295 docs/toplevel/gedadocs.html
299 examples/RF_Amp/Makefile
300 examples/RF_Amp/model/Makefile
301 examples/RF_Amp/sym/Makefile
302 examples/TwoStageAmp/Makefile
303 examples/gTAG/Makefile
304 examples/lightning_detector/Makefile
307 contrib/smash_megafile/Makefile
308 contrib/olib/Makefile
309 contrib/gmk_sym/Makefile
310 contrib/sarlacc_schem/Makefile
311 contrib/scripts/Makefile
312 contrib/scripts/sw2asc