Fix o_net_consolidate_segments() to consolidate with all joined lines
[geda-gaf/pcjc2.git] / configure.ac
blob109a047d159c27eaf0704191b2cfa4a6d8ccd67e
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 AM_INIT_AUTOMAKE
21 AC_GNU_SOURCE # FIXME for some reason this is needed?
23 #####################################################################
24 # Do version number magic
25 #####################################################################
27 AX_GIT_VERSION([20121203])
29 # This is used for keeping the ChangeLog files up-to-date
30 AC_SUBST([CHANGELOG_BASE], [1.0-20070526])
32 #####################################################################
33 # Windows/MinGW/Cygwin support
34 #####################################################################
36 AX_WINDOWS_FLAGS
38 #####################################################################
39 # Check for compiling & linking tools
40 #####################################################################
42 AC_PROG_CC
43 AC_PROG_CPP
45 AC_LIBTOOL_WIN32_DLL
46 AC_DISABLE_STATIC
47 AC_PROG_LIBTOOL
49 AM_PROG_CC_C_O
50 AX_GCC_FLAGS([-Wall])
52 AC_PROG_MKDIR_P
53 AM_PROG_LEX
54 AX_PROG_AWK
55 AX_PROG_GROFF
56 AC_PATH_PROGS([M4], [gm4 m4], [m4])
58 #####################################################################
59 # Internationalisation
60 #####################################################################
62 AM_NLS
63 AM_GNU_GETTEXT
64 AM_GNU_GETTEXT_VERSION([0.16])
65 AX_DESKTOP_I18N
67 #####################################################################
68 # Check for libraries that use pkg-config
69 #####################################################################
71 PKG_PROG_PKG_CONFIG
73 AX_CHECK_GUILE([1.8.0])
75 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.20.0], ,
76   AC_MSG_ERROR([GLib 2.20.0 or later is required.]))
78 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.16.0], ,
79   AC_MSG_ERROR([GTK+ 2.16.0 or later is required.]))
81 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.16.0], ,
82   AC_MSG_ERROR([GDK 2.16.0 or later is required.]))
84 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.16.0], ,
85   AC_MSG_ERROR([GDK_PIXBUF 2.16.0 or later is required.]))
87 AX_CHECK_CAIRO
89 PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 0.26], ,
90   AC_MSG_ERROR([PANGOCAIRO 0.26 or later is required.]))
92 PKG_CHECK_MODULES(PANGO, [pango >= 1.23.0], ,
93   AC_MSG_ERROR([PANGO 1.23.0 or later is required.]))
95 #####################################################################
96 # Header files & particular functions
97 #####################################################################
99 AC_HEADER_SYS_WAIT
101 # FIXME these checks are obsolete, because every plausible platform
102 # provides what they check for.
103 AC_HEADER_STDC
105 # FIXME these checks may be pointless for one of three reasons: every
106 # even vaguely sane libc implementation provides them; we don't use
107 # any of their functions in favour of GLib alternatives; or we don't
108 # provide an alternative, so the build will fail anyway.
109 AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
111 # FIXME since we don't have a sensible alternative, if these headers
112 # are missing we should fail. Also need to remove HAVE_ERRNO_H tests
113 # in the C source code, since if we *don't* have it the build will
114 # fail anyway.
115 AC_CHECK_HEADERS([errno.h fcntl.h])
117 # FIXME On a system without locale.h, the user may have just disabled NLS
118 # to be able to build.  But are there known systems with working NLS but
119 # without a locale.h?  We do need to include locale.h on some systems
120 # to be able to build gschem/src/gschem.c
121 AC_CHECK_HEADERS([locale.h])
123 # Check for lrint in math library.
124 AC_CHECK_LIB([m], [lrint],
125              AC_DEFINE([HAVE_LRINT], 1,
126                        [If your math library has lrint in it, define this]))
128 AC_CHECK_LIB([m], [atan2])
130 AC_CHECK_FUNCS([chown getlogin])
132 # Check if the getopt header is present
133 AC_CHECK_HEADERS([getopt.h])
134 # Check for getopt_long
135 # On FreeBSD the 'gnugetopt' library is needed.
136 AC_SEARCH_LIBS([getopt_long], [gnugetopt],
137                AC_DEFINE([HAVE_GETOPT_LONG], 1,
138                          [Define to 1 if you have the `getopt_long' function.]))
140 # Check for misc features of awk
141 AX_AWK_FEATURES
143 #####################################################################
144 # Optional things
145 #####################################################################
147 # Assertions
148 AX_OPTION_ASSERT
149 # Viewing documentation
150 AX_OPTION_URI_VIEWER
151 # API documentation
152 AX_OPTION_DOXYGEN
153 # XDG desktop files
154 AX_OPTION_XDG_DATA
155 # KDE 3 desktop files
156 AX_OPTION_KDE3_DATA
157 # XDG database updates
158 AX_OPTION_XDG_DB
159 # libstroke support
160 AX_OPTION_STROKE
161 # gattrib
162 AX_OPTION_GATTRIB
164 #####################################################################
165 # Tool-specific setup
166 #####################################################################
168 # Where should data files be installed/searched for?
169 AX_DATA_DIRS
170 # Where should PCB footprints be searched for?
171 AX_PCB_DIRS
172 # Set up libgeda with the correct ld version number
173 AX_LIBGEDA([43:0:0])
174 # Set up libgedacairo with the correct ld version number
175 AX_LIBGEDACAIRO([1:0:0])
177 #####################################################################
178 # Generate output
179 #####################################################################
181 AC_CONFIG_FILES([Makefile
182                  intl/Makefile
184                  libgeda/Makefile
185                  libgeda/libgeda.pc
186                  libgeda/po/domain.mak
187                  libgeda/po/Makefile.in
188                  libgeda/data/Makefile
189                  libgeda/docs/Makefile
190                  libgeda/docs/images/Makefile
191                  libgeda/include/Makefile
192                  libgeda/lib/Makefile
193                  libgeda/scheme/Makefile
194                  libgeda/src/Makefile
196                  libgedacairo/Makefile
197                  libgedacairo/libgedacairo.pc
199                  gaf/Makefile
200                  gaf/po/Makefile.in
202                  gschem/Makefile
203                  gschem/po/Makefile.in
204                  gschem/docs/Makefile
205                  gschem/include/Makefile
206                  gschem/scripts/Makefile
207                  gschem/src/Makefile
208                  gschem/examples/Makefile
209                  gschem/lib/Makefile
210                  gschem/data/Makefile
211                  gschem/bitmap/Makefile
212                  gschem/tests/Makefile
213                  gschem/scheme/Makefile
215                  gattrib/Makefile
216                  gattrib/po/Makefile.in
217                  gattrib/design/Makefile
218                  gattrib/docs/Makefile
219                  gattrib/include/Makefile
220                  gattrib/lib/Makefile
221                  gattrib/lib/system-gattribrc
222                  gattrib/src/Makefile
223                  gattrib/data/Makefile
225                  gsymcheck/docs/Makefile
226                  gsymcheck/include/Makefile
227                  gsymcheck/lib/Makefile
228                  gsymcheck/lib/system-gsymcheckrc
229                  gsymcheck/po/Makefile.in
230                  gsymcheck/src/Makefile
231                  gsymcheck/tests/Makefile
232                  gsymcheck/Makefile
234                  gnetlist/Makefile
235                  gnetlist/po/Makefile.in
236                  gnetlist/src/Makefile
237                  gnetlist/include/Makefile
238                  gnetlist/scheme/Makefile
239                  gnetlist/examples/Makefile
240                  gnetlist/tests/Makefile
241                  gnetlist/tests/hierarchy/Makefile
242                  gnetlist/tests/hierarchy2/Makefile
243                  gnetlist/tests/drc2/Makefile
244                  gnetlist/tests/common/Makefile
245                  gnetlist/docs/Makefile
246                  gnetlist/docs/vams/Makefile
247                  gnetlist/examples/vams/Makefile
248                  gnetlist/examples/vams/vhdl/Makefile
249                  gnetlist/examples/vams/vhdl/basic-vhdl/Makefile
250                  gnetlist/examples/vams/vhdl/new-vhdl/Makefile
251                  gnetlist/examples/switcap/Makefile
252                  gnetlist/lib/Makefile
253                  gnetlist/utils/Makefile
254                  gnetlist/scripts/Makefile
255                  gnetlist/scripts/annotate.sh
256                  gnetlist/scripts/bom_xref.sh
257                  gnetlist/scripts/bompp.sh
258                  gnetlist/lib/system-gnetlistrc
260                  utils/Makefile
261                  utils/docs/Makefile
262                  utils/examples/Makefile
263                  utils/examples/gmk_sym/Makefile
264                  utils/examples/gsch2pcb/Makefile
265                  utils/examples/tragesym/Makefile
266                  utils/gschlas/Makefile
267                  utils/gxyrs/Makefile
268                  utils/include/Makefile
269                  utils/lib/Makefile
270                  utils/lib/system-gschlasrc
271                  utils/scripts/Makefile
272                  utils/scripts/sw2asc
273                  utils/src/Makefile
274                  utils/tests/Makefile
275                  utils/tests/gxyrs/Makefile
276                  utils/tests/gxyrs/inputs/Makefile
277                  utils/tests/gxyrs/outputs/Makefile
278                  utils/tests/refdes_renum/Makefile
279                  utils/tests/refdes_renum/inputs/Makefile
280                  utils/tests/refdes_renum/outputs/Makefile
282                  symbols/Makefile
283                  symbols/documentation/Makefile
285                  docs/Makefile
286                  docs/scheme-api/Makefile
287                  docs/toplevel/Makefile
288                  docs/toplevel/gedadocs.html
289                  docs/wiki/Makefile
291                  examples/Makefile
292                  examples/RF_Amp/Makefile
293                  examples/RF_Amp/model/Makefile
294                  examples/RF_Amp/sym/Makefile
295                  examples/TwoStageAmp/Makefile
296                  examples/gTAG/Makefile
297                  examples/lightning_detector/Makefile
299 AC_OUTPUT