action.c: Change macro ARG, to return NULL instead of 0
[geda-pcb/leaky.git] / configure.ac
blobabdd8a14f0f7abe4186fb0ce9a2255cba3586cbf
1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([pcb], [1.99z])
4 AC_CONFIG_SRCDIR([src/draw.c])
5 AC_PREREQ([2.60])
6 AM_INIT_AUTOMAKE([1.9])
7 AC_GNU_SOURCE
8 AM_CONFIG_HEADER([config.h])
10 ##########################################################################
12 # Try to figure out if we are building from git sources.
13 # If we are then unless building of the documentation has
14 # been disabled then just require the user have all the right
15 # tools.  Users building from a tarball won't need latex, makeinfo,
16 # etc. but if you're already downloading development sources, then
17 # it is not unreasonable to require development tools.  What motivated
18 # this is that using maintainer mode proved to cause regular confusion.
20 pcb_sources="tarball"
21 AC_MSG_CHECKING([if you are building from a git checkout])
22 pcb_git_version=no
23 if test -f $srcdir/.gitignore ; then
24         pcb_git_version=yes
25         AC_MSG_RESULT([yes])
26         pcb_sources="GIT"
27 else
28         AC_MSG_RESULT([no])
30 AM_CONDITIONAL(GIT_VERSION, test x$pcb_git_version = xyes)
32 AC_MSG_CHECKING([if you are building from a anoncvs checkout])
33 pcb_cvs_version=no
34 if test -f $srcdir/CVS/Root ; then
35         pcb_cvs_version=yes
36         AC_MSG_RESULT([yes])
37         pcb_sources="CVS"
38 else
39         AC_MSG_RESULT([no])
41 AM_CONDITIONAL(CVS_VERSION, test x$pcb_cvs_version = xyes)
42 AM_CONDITIONAL(GIT_OR_CVS_VERSION, test x$pcb_git_version = xyes -o x$pcb_cvs_version = xyes)
45 ##########################################################################
47 # See if we are supposed to build the docs
50 docs_yesno=yes
51 AC_MSG_CHECKING([if the documentation should be built])
52 AC_ARG_ENABLE([doc],
53 [  --enable-doc            Build and install the documentation [[default=yes]]],
55 if test "X$enable_doc" = "Xno" ; then
56         DOC=""
57         AC_MSG_RESULT([no])
58         docs_yesno=no
59 else
60         DOC=doc
61         AC_MSG_RESULT([yes])
62         docs_yesno=yes
66 DOC=doc
67 AC_MSG_RESULT([yes])
68 docs_yesno=yes
70 AC_SUBST(DOC)
73 AC_MSG_CHECKING([if maintainer mode is required])
74 if test "$docs_yesno" = "yes" -a "$pcb_git_version" = "yes" ; then
75         AC_MSG_RESULT([yes -- the documentation build is enabled and your sources are from git])
76         enable_maintainer_mode=yes
77 else
78         AC_MSG_RESULT([no])
81 AM_MAINTAINER_MODE
84 dnl determine host type
85 AC_CANONICAL_HOST
86 AC_MSG_CHECKING(for windows)
87 PCB_PATH_DELIMETER=":"
88 PCB_DIR_SEPARATOR_S="/"
89 PCB_DIR_SEPARATOR_C='/'
90 case $host in
91         *-*-cygwin* )
92                 CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}"
93                 CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}"
94                 ;;
96         *-*-mingw* )
97                 WIN32=yes
98                 CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}"
99                 CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}"
100                 ;;
102         * )
103                 WIN32=no
104                 ;;
105 esac
107 AC_MSG_RESULT($WIN32)
108 AC_SUBST(WIN32)
109 AM_CONDITIONAL(WIN32, test x$WIN32 = xyes)
110 if test "x$WIN32" = "xyes" ; then
111         PCB_PATH_DELIMETER=";"
112         PCB_DIR_SEPARATOR_S="\\\\"
113         PCB_DIR_SEPARATOR_C='\\'
116 AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_C,'$PCB_DIR_SEPARATOR_C',[Directory separator char])
117 AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_S,"$PCB_DIR_SEPARATOR_S",[Directory separator string])
118 AC_DEFINE_UNQUOTED(PCB_PATH_DELIMETER,"$PCB_PATH_DELIMETER",[Search path separator string])
121 dnl Checks for programs.
122 AC_PROG_CC
124 if test "x$WIN32" = "xyes" ; then
125         AC_CHECK_TOOL(WINDRES, windres, [no])
126         if test "$WINDRES" = "no" ; then
127                 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
128         fi
131 # i18n
132 GETTEXT_PACKAGE=$PACKAGE
133 AH_TEMPLATE([GETTEXT_PACKAGE], [Name of this program's gettext domain])
134 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"])
135 AC_SUBST(GETTEXT_PACKAGE)
137 AM_GNU_GETTEXT_VERSION([0.14])
138 AM_GNU_GETTEXT
139 IT_PROG_INTLTOOL([0.35.0])
141 AC_C_INLINE
142 AC_PROG_CC_STDC
143 AM_PROG_CC_C_O
144 AC_PROG_CPP
145 AC_PROG_AWK
146 AC_PROG_MKDIR_P
148 AM_PROG_LEX
149 AC_PATH_PROG(LEX_PATH, $LEX, [notfound])
150 if test "$LEX_PATH" = "notfound" ; then
151         AC_MSG_ERROR([Couldn't find a usable lex program.
152 Please install flex which is available from
153 ftp://ftp.gnu.org/pub/non-gnu/flex/
158 AC_PROG_YACC
159 AC_PATH_PROG(YACC_PATH, $YACC, [notfound])
160 if test "$YACC_PATH" = "notfound" ; then
161         AC_MSG_ERROR([Couldn't find a usable yacc program.
162 Please install bison which is available from
163 ftp://ftp.gnu.org/pub/gnu/bison/
167 AC_PROG_INSTALL
168 AC_PROG_RANLIB
171 # Used for building the icons
173 AC_PATH_PROG(XPMTOPPM, xpmtoppm, notfound)
174 AC_PATH_PROG(PPMTOWINICON, ppmtowinicon, notfound)
175 AC_PATH_PROG(CONVERT, convert, notfound)
177 ##########################################################################
180 if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then
181    AC_PATH_PROG(MKINFO, makeinfo, no)
182    if test "X$MKINFO" != "Xno"; then
183       AC_MSG_CHECKING([for GNU makeinfo version >= 4.6])
184       v=`$MKINFO --version | grep "GNU texinfo"`
185       if test $? -ne 0; then
186          AC_MSG_RESULT([non-GNU])
187          MKINFO="no"
188       fi
189    fi
190    if test "X$MKINFO" != "Xno"; then
191       vmajor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\1/'`
192       vminor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\2/'`
193       AC_MSG_RESULT([$vmajor.$vminor])
194       if test "$vmajor" -lt 4 \
195               || (test "$vmajor" -eq 4 && test "$vminor" -lt 6); then
196          MKINFO=no
197       fi
198    fi
199    if test "X$MKINFO" = "Xno"; then
200       AC_MSG_ERROR([You have requested a build
201 of the documentation.  For this to work, you must have version 4.6 or newer of
202 the GNU texinfo package.  You seem to have
206 Please update to a newer version of texinfo or disable building of
207 the documentation with --disable-doc
209    fi
211    AC_PATH_PROG(TEXI2DVI, texi2dvi, no)
212    if test "X$TEXI2DVI" = "Xno"; then
213       AC_MSG_ERROR([You have requested a build
214 of the documentation.  For this to work, you must have the texi2dvi program
215 installed.  Alternatively, you can disable building the documentation with
216 --disable-doc.])
217    fi
220         AC_PATH_PROG(PERL, perl, notfound)
221         if test "X$PERL" = "Xnotfound"; then
222                         AC_MSG_ERROR([You have requested a build
223 of the documentation.  For this to work, you must have perl installed.
224 Alternatively, you can disable building the documentation with
225 --disable-doc.
227         fi
230    AC_PATH_PROG([KPSEWHICH], [kpsewhich], [no])
231    if test "X$KPSEWHICH" = "Xno"; then
232       AC_MSG_ERROR([You have requested a build
233 of the documentation.  For this to work, you must have a functional install of
234 TeX and LaTeX.  kpsewhich is part of TeX.
235 Alternatively, you can disable building the documentation with
236 --disable-doc.])
237    fi
239    AC_MSG_CHECKING([If your TeX installation contains epsf.tex])
240    f=`$KPSEWHICH epsf.tex`
241    if test $? -eq 0 ; then
242         AC_MSG_RESULT([yes ($f)])
243    else
244         AC_MSG_RESULT([no])
245         AC_MSG_ERROR([You have requested a build
246 of the documentation.  For this to work, you must have a functional install of
247 TeX and LaTeX that includes epsf.tex.  On some linux distributions this is
248 part of the texlive-generic-recommended package.
249 Alternatively, you can disable building the documentation with
250 --disable-doc.])
251    fi
255 ##########################################################################
259 # FIXME:  for now, only try to add -rdynamic if we're using gcc.  We really
260 # need to figure out what the correct test is here.  In the mean time, this
261 # should let things build with SunPRO again.
262 if test "x$GCC" = "xyes"; then
263 AC_MSG_CHECKING([If the compiler accepts -rdynamic])
264 old_LDFLAGS="$LDFLAGS"
265 LDFLAGS="$LDFLAGS -rdynamic"
266 AC_LINK_IFELSE([int main(){}],
267         [AC_MSG_RESULT([yes])],
268         [LDFLAGS="$old_LDFLAGS"
269         AC_MSG_RESULT([no])
270         ])
273 # ------------- HID config -------------------
275 hid_guis=""
276 hid_printers=""
277 hid_exporters=""
278 hid_always=""
280 for hid in `cd $srcdir/src/hid; echo *`; do
281     F=$srcdir/src/hid/$hid/hid.conf
282     if test -f $F 
283     then
284     echo checking $F
285         . $F
286         case $type in
287           gui ) hid_guis="$hid_guis $hid" ;;
288           printer ) hid_printers="$hid_printers $hid" ;;
289           export ) hid_exporters="$hid_exporters $hid" ;;
290           always ) hid_always="$hid_always $hid" ;;
291         esac
292     fi
293 done
295 AC_MSG_CHECKING([for which gui to use])
296 AC_ARG_WITH([gui],
297 [  --with-gui=            Specify the GUI to use: batch gtk lesstif [[default=gtk]]],
299 [with_gui=gtk]
301 AC_MSG_RESULT([$with_gui])
302 case " $hid_guis no none " in
303      *\ $with_gui\ * ) HIDLIST="$with_gui" ;;
304      * ) AC_MSG_ERROR([$with_gui is not a valid gui]) ;;
305 esac
307 if test x"$with_gui" = x"none" -o x"$with_gui" = x"no"
308 then
309     HIDLIST=
312 AC_MSG_CHECKING([whether to enable toporouter])
313 AC_ARG_ENABLE([toporouter],
314  [AS_HELP_STRING([--enable-toporouter], [build toporouter [default=yes]]) ]
316 AS_CASE(["x$enable_toporouter"],[xyes | xno],,
317  [enable_toporouter=yes
320 AC_MSG_RESULT([$enable_toporouter])
321 AM_CONDITIONAL([WITH_TOPOROUTER], test $enable_toporouter != no)
323 AC_MSG_CHECKING([whether to enable toporouter output])
324 AC_ARG_ENABLE([toporouter-output],
325  [AS_HELP_STRING([--enable-toporouter-output], [enable toporouter graphical output [default=no]]) ]
327 AS_CASE(["z$enable_toporouter_output"],[zyes | zno],,
328  [enable_toporouter_output=no]
330 AC_MSG_RESULT([$enable_toporouter_output])
331 AS_CASE([$enable_toporouter_output],[yes],
333   topo_output_enabled=1
334  ],
336   topo_output_enabled=0
339 AC_DEFINE_UNQUOTED([TOPO_OUTPUT_ENABLED], [$topo_output_enabled],
340  [Define to 1 to enable toporouter graphical output]
343 PKG_PROG_PKG_CONFIG()
345 if test "x$enable_toporouter_output" = "xyes"; then
346    PKG_CHECK_MODULES(CAIRO, cairo,,
347                      [AC_MSG_ERROR([Cannot find cairo, needed by the toporouter
348 Please review the following errors:
349 $CAIRO_PKG_ERRORS])]
350    )
353 AC_MSG_CHECKING([for whether to use DBUS])
354 AC_ARG_ENABLE([dbus],
355 [  --enable-dbus           Enable DBUS IPC],
356 [],[
357         case " $with_gui " in
358                 *\ gtk\ *)     enable_dbus=yes ;;
359                 *\ lesstif\ *) enable_dbus=yes ;;
360                 * )            enable_dbus=no ;;
361         esac
364 AC_MSG_RESULT([$enable_dbus])
365 AM_CONDITIONAL(WITH_DBUS, test x$enable_dbus = xyes)
367 if test "x$enable_dbus" = "xyes"; then
368         case " $with_gui " in
369                 *\ gtk\ *) ;;
370                 *\ lesstif\ *) ;;
371                 * ) AC_MSG_ERROR([DBUS enabled but only works with a mainloop capable GUI HID.
372 Either do not use --enable-dbus or enable the gtk or lesstif GUI HID.])
373         esac
374         
375         PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.61,
376                 [saved_LIBS="$LIBS"
377                  LIBS="$LIBS $DBUS_LIBS"
378                  AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
379                  LIBS="$saved_LIBS" ],
380                 [AC_MSG_ERROR([Cannot find dbus-1 >= 0.61, install it and rerun ./configure
381 Please review the following errors:
382 $DBUS_PKG_ERRORS])]
383         )
384         DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
385         
386         AC_DEFINE([HAVE_DBUS], 1,
387                 [Define to 1 if DBUS IPC is to be compiled in])
391 AC_MSG_CHECKING([for which printer to use])
392 AC_ARG_WITH([printer],
393 [  --with-printer=        Specify the printer: lpr [[default=lpr]]],
394 [],[with_printer=lpr])
395 AC_MSG_RESULT([$with_printer])
396 case " $hid_printers " in
397      *\ $with_printer\ * )
398          HIDLIST="$HIDLIST $with_printer"
399          ;;
400      * ) AC_MSG_ERROR([$with_printer is not a valid printer]) ;;
401 esac
403 AC_MSG_CHECKING([for which exporters to use])
404 AC_ARG_WITH([exporters],
405 [  --with-exporters=       Enable export devices: bom gerber gcode nelma png ps [[default=bom gerber gcode nelma png ps]]],
406 [],[with_exporters=$hid_exporters])
407 AC_MSG_RESULT([$with_exporters])
408 for e in `echo $with_exporters | sed 's/,/ /g'`; do
409     case " $hid_exporters " in
410       *\ $e\ * )
411          HIDLIST="$HIDLIST $e"
412          ;;
413       * ) AC_MSG_ERROR([$e is not a valid exporter]) ;;
414     esac
415 done
417 if test "X$enable_jpeg" = "Xno" -a "X$enable_gif" = "Xno" -a "X$enable_png" = "Xno" ; then
418         case " ${HIDLIST} " in
419                 *\ png\ *)
420                         AC_MSG_ERROR([you have requested the png HID but turned off all output
421 formats!  If you do not want gif/jpeg/png output, use --with-exporters to list
422 which exporters you want and do not list png there.])
423                         ;;
425                 *)
426                         ;;
427         esac
430 for hid in $HIDLIST; do
431     F=$srcdir/src/hid/$hid/hid.conf
432     if test -f $F ; then
433         echo checking $hid depedencies
434         deps=
435         . $F
436         for dep in $deps; do
437             if test "X`echo $HIDLIST | grep $dep`" = "X"; then
438                 AC_MSG_ERROR([you have requested the $hid HID but not the $dep HID, which it depends on])
439             fi
440         done
441    fi
442 done
444 for e in $HIDLIST; do
445     HIDLIBS="$HIDLIBS lib$e.a"
446 done
448 AC_SUBST(HIDLIST)
449 AC_SUBST(HIDLIBS)
451 # ------------- end HID config -------------------
453 ######################################################################
455 # desktop integration
458 AC_PATH_PROG(SETENV, env, [])
459 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE_BIN, gtk-update-icon-path, [true])
461 # Change default location for XDG files (MIME and Icons)
462 AC_ARG_WITH(xdgdatadir, [  --with-xdgdatadir=path  Change where the theme icons 
463 and mime registrations are installed [[DATADIR]]], [opt_xdgdatadir=$withval])
465 # Change default location for KDE data files (KDE MIME registrations)
466 AC_ARG_WITH(kdedatadir, [  --with-kdedatadir=path  Change where the KDE mime reg
467 istrations are installed [[DATADIR]]], [opt_kdedatadir=$withval])
469 if test x$opt_xdgdatadir = x; then
470         # path was not specified with --with-xdgdatadir
471         XDGDATADIR='${datadir}'
472 else
473         # path WAS specified with --with-xdgdatadir
474         XDGDATADIR="$opt_xdgdatadir"
476 AC_SUBST(XDGDATADIR)
478 if test x$opt_kdedatadir = x; then
479         # path was not specified with --with-kdedatadir
480         KDEDATADIR='${datadir}'
481 else
482         # path WAS specified with --with-kdedatadir
483         KDEDATADIR="$opt_kdedatadir"
485 AC_SUBST(KDEDATADIR)
487 AC_ARG_ENABLE(update-desktop-database,
488         AC_HELP_STRING([--disable-update-desktop-database],
489         [do not update desktop database after installation]),,
490         enable_update_desktop_database=yes)
492 AM_CONDITIONAL(ENABLE_UPDATE_DESKTOP_DATABASE, test x$enable_update_desktop_database = xyes)
494 if test x$enable_update_desktop_database = xyes ; then
495         AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, [update-desktop-database], no)
496         if test $UPDATE_DESKTOP_DATABASE = no; then
497         AC_MSG_ERROR([Cannot find update-desktop-database, make sure it is installed and in your PATH, or configure with --disable-update-desktop-database])
498         fi
501 AC_ARG_ENABLE(update-mime-database,
502         AC_HELP_STRING([--disable-update-mime-database],
503         [do not update mime database after installation]),,
504         enable_update_mime_database=yes)
506 AM_CONDITIONAL(ENABLE_UPDATE_MIME_DATABASE, test x$enable_update_mime_database = xyes)
508 if test x$enable_update_mime_database = xyes ; then
509         AC_PATH_PROG(UPDATE_MIME_DATABASE, [update-mime-database], no)
510         if test $UPDATE_MIME_DATABASE = no; then
511         AC_MSG_ERROR([Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database])
512         fi
516 ######################################################################
518 AC_PATH_PROGS(M4, gm4 m4, [none])
519 if test "X$M4" = "Xnone" ; then
520         AC_MSG_ERROR([Did not find a m4 executible.  You need to make sure
521         that m4 is installed on your system and that m4 is in your path])
523 AC_MSG_CHECKING([if $M4 has the division involving negative numbers bug])
524 pcb_m4_r=`echo "eval(-2/2)" | $M4`
525 if test "$pcb_m4_r" != "-1" ; then
526         AC_MSG_RESULT([yes])
527         AC_MSG_ERROR([It appears that $M4 has a bug involving division
528 with negative numbers.  In particular it just returned the result that
529 -2/2 = $pcb_m4_r instead of -1.  This is a known bug in GNU m4-1.4.9.  Please
530 install a non-broken m4.])
531 else
532         AC_MSG_RESULT([no])
536 AC_PATH_PROGS(WISH, wish wish83 wish8.3 wish80 wish8.0 cygwish83 cygwish80,[none])
537 if test "X$WISH" = "Xnone" ; then
538         AC_MSG_ERROR([Did not find the wish executible.  You need to make sure
539         that tcl is installed on your system and that wish is in your path])
542 AC_DEFINE_UNQUOTED(M4,$M4,[m4 executible])
543 GNUM4=$M4
544 AC_SUBST(GNUM4)
545 AC_DEFINE_UNQUOTED(GNUM4,"$M4",[m4 program used by pcb])
547 AC_PATH_PROG(LATEX, latex, notfound)
548 AM_CONDITIONAL(MISSING_LATEX, test x$LATEX = xnotfound)
550 AC_PATH_PROG(PDFLATEX, pdflatex, notfound)
551 AM_CONDITIONAL(MISSING_PDFLATEX, test x$PDFLATEX = xnotfound)
553 AC_PATH_PROG(DVIPS, dvips, notfound)
554 AM_CONDITIONAL(MISSING_DVIPS, test x$DVIPS = xnotfound)
556 AC_PATH_PROG(TEXI2DVI, texi2dvi, notfound)
557 AM_CONDITIONAL(MISSING_TEXI2DVI, test x$TEXI2DVI = xnotfound)
559 AC_PATH_PROG(PS2PDF, ps2pdf, notfound)
560 AM_CONDITIONAL(MISSING_PS2PDF, test x$PS2PDF = xnotfound)
562 # used to build some of the getting started guide
563 AC_PATH_PROG(GSCHEM, gschem, notfound)
564 AM_CONDITIONAL(MISSING_GSCHEM, test x$GSCHEM = xnotfound)
566 if test "X$docs_yesno" = "Xyes" -a "X$pcb_git_version" = "Xyes" ; then
567         if test "$LATEX" = "notfound" -o "$PDFLATEX" = "notfound" -o "$DVIPS" = "notfound" -o "$TEXI2DVI" = "notfound" -o "$PS2PDF" = "notfound" ; then
568                 AC_MSG_ERROR([It appears that you are building from a source tree obtained
569 via git but you do not have the required tools installed to build the documentation.  Here
570 is a list of tools and the detected values:
571 LATEX:  $LATEX
572 PDFLATEX:  $PDFLATEX
573 DVIPS:     $DVIPS
574 TEXI2DVI:  $TEXI2DVI
575 PS2PDF:    $PS2PDF
576 GSCHEM:    $GSCHEM
578 Either make sure these tools are installed or disable building and installing the documentation
579 by using the --disable-doc configure option.
581         fi
584 ############################################################################
586 # These checks are for tools used by the testsuite.  It will not be fatal
587 # if these are missing because this is primarily for developer use.  It is
588 # possible that we might add some --enable flag in the future that forces
589 # full tools for development work.
591 # Check for ImageMagick tools used by the testsuite
592 AC_PATH_PROG(IM_ANIMATE, animate, notfound)
593 AC_PATH_PROG(IM_COMPARE, compare, notfound)
594 AC_PATH_PROG(IM_COMPOSITE, composite, notfound)
595 AC_PATH_PROG(IM_CONVERT, convert, notfound)
596 AC_PATH_PROG(IM_DISPLAY, display, notfound)
597 AC_PATH_PROG(IM_MONTAGE, montage, notfound)
598 missing_magick=""
599 test "${IM_ANIMATE}" != "notfound" || missing_magick="${missing_magick} animate"
600 test "${IM_COMPARE}" != "notfound" || missing_magick="${missing_magick} compare"
601 test "${IM_COMPOSITE}" != "notfound" || missing_magick="${missing_magick} composite"
602 test "${IM_CONVERT}" != "notfound" || missing_magick="${missing_magick} convert"
603 test "${IM_DISPLAY}" != "notfound" || missing_magick="${missing_magick} display"
604 test "${IM_MONTAGE}" != "notfound" || missing_magick="${missing_magick} montage"
606 AC_MSG_CHECKING([if all ImageMagick tools needed for the testsuite were found])
607 if test "X${missing_magick}" != "X" ; then
608     AC_MSG_RESULT([no.  The testsuite will be disabled because the following
609 tools from the ImageMagick suite were not found:
610 ${missing_magick}
611 No loss in pcb functionality should be experienced, you just will not
612 be able to run the full regression testsuite.
614     have_magick=no
615 else
616     AC_MSG_RESULT([yes])
617     have_magick=yes
620 have_test_tools=yes
622 test $have_magick = yes || have_test_tools=no
624 # the RS274-X export HID is partially checked by looking at the result with
625 # gerbv
626 AC_PATH_PROG(GERBV, gerbv, notfound)
627 test $GERBV != notfound || have_test_tools=no
630 AM_CONDITIONAL(HAVE_TEST_TOOLS, test x$have_test_tools = xyes)
631 AC_MSG_CHECKING([if all the requried testsuite tools were found])
632 if test x$have_test_tools = xyes ; then
633         AC_MSG_RESULT([yes])
634 else
635         AC_MSG_RESULT([no -- the testsuite will be disabled])
640 ############################################################################
643 dnl Checks for libraries.
644 AC_CHECK_LIB(m, sqrt)
645 AC_CHECK_LIB(dl, dlopen)
646 AC_CHECK_LIB(xnet, gethostbyname)
647 AC_CHECK_LIB(fl, yywrap)
648 AC_CHECK_FUNCS(strerror)
649 AC_CHECK_FUNCS(regcomp re_comp)
650 AC_CHECK_FUNCS(logf expf rint)
651 AC_CHECK_FUNCS(vsnprintf)
652 AC_CHECK_FUNCS(getpwuid gethostname getcwd)
653 AC_CHECK_FUNCS(random)
654 AC_CHECK_FUNCS(stat)
656 AC_CHECK_FUNCS(mkdtemp)
658 # normally used for all file i/o
659 AC_CHECK_FUNCS(popen)
661 # for lrealpath.c
662 AC_CHECK_FUNCS(realpath canonicalize_file_name)
663 libiberty_NEED_DECLARATION(canonicalize_file_name)
665 # for pcb_spawnvp in action.c on Windows
666 AC_CHECK_FUNCS(_spawnvp)
668 AC_HEADER_STDC
669 AC_CHECK_HEADERS(limits.h locale.h string.h sys/types.h regex.h pwd.h)
670 AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h sys/param.h sys/times.h sys/wait.h)
671 AC_CHECK_HEADERS(dlfcn.h)
673 if test "x${WIN32}" = "xyes" ; then
674         AC_CHECK_HEADERS(windows.h)
676 # Search for glib
677 PKG_CHECK_MODULES(GLIB, glib-2.0, ,
678                 [AC_MSG_RESULT([Note: cannot find glib-2.0.
679 You may want to review the following errors:
680 $GLIB_PKG_ERRORS])]
683 for e in $HIDLIST; do
684     case $e in
685       lesstif )
686         AC_PATH_XTRA
687         CPPFLAGS="$CFLAGS $X_CFLAGS"
688         AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
689         AC_CHECK_LIB(ICE, main, , , $X_LIBS)
690         AC_CHECK_LIB(SM, main, , , $X_LIBS)
691         AC_CHECK_LIB(Xext, main, , , $X_LIBS)
692         AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS)
693         AC_CHECK_LIB(Xmu, main, , , $X_LIBS)
694         AC_CHECK_LIB(Xpm, main, , , $X_LIBS)
695         AC_CHECK_LIB(Xm, XmCreateMainWindow, , , $X_LIBS)
696         case $ac_cv_lib_Xm_XmCreateMainWindow in
697           no )
698             AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.])
699             ;;
700           * ) ;;
701         esac
702         AC_CHECK_HEADERS(Xm/Xm.h)
703         case $ac_cv_header_Xm_Xm_h in
704           no )
705             AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.])
706             ;;
707           * ) ;;
708         esac
709         ;;
711       gtk )
712         # Check for pkg-config
713         AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
714         if test "$PKG_CONFIG" = "no"; then
715                 AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
716         fi
718         PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0, , 
719                 [AC_MSG_ERROR([Cannot find gtk+ >= 2.4.0, install it and rerun ./configure
720 Please review the following errors:
721 $GTK_PKG_ERRORS])]
722         )
723         GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
724         
725         # if we are building for gtk >= 2.8.0, we can use gdk_display_warp_pointer()
726         # otherwise we need XWarpPointer and we'll pull in the required headers with
727         # gdk/gdkx.h and we'll need to link with X11
728         if ! $PKG_CONFIG gtk+-2.0 --atleast-version=2.8.0 ; then
729                 CPPFLAGS="$CFLAGS $GTK_CFLAGS"
730                 AC_CHECK_HEADERS([gdk/gdkx.h])
731         fi
733         GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion`
734         ;;
736       gcode|nelma|png )
737         # Check for gdlib-config for gd (www.boutell.com/gd)
738         AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no)
739         if test "$GDLIB_CONFIG" = "no"; then
740                 AC_MSG_RESULT([Cannot find gdlib-config.
741 Make sure it is installed and in your PATH.
742 gdlib-config is part of the GD library available from www.boutell.com/gd.
743 This is needed for the png HID.  I will look for libgd anyway and maybe
744 you will get lucky.
746                 if test "$WIN32" != "yes" ; then
747                         AC_CHECK_LIB(gd,main,,
748                         AC_MSG_ERROR([[You have requested gcode, nelma, or png HIDs  but -lgd could not be found]]))
749                 else 
750                         AC_CHECK_LIB(bgd,main,,
751                         AC_MSG_ERROR([[You have requested gcode, nelma, or png HIDs  but -lbgd could not be found]]))
752                 fi
753         else
754                 if test "$WIN32" = "yes" ; then
755                         GD=bgd
756                 else
757                         GD=gd
758                 fi
759                 AC_MSG_CHECKING([for libgd cflags])
760                 GD_CFLAGS="`$GDLIB_CONFIG --cflags`"
761                 AC_MSG_RESULT([$GD_CFLAGS])
762                 AC_MSG_CHECKING([for libgd libs])
763                 GD_LIBS="`$GDLIB_CONFIG --ldflags` `$GDLIB_CONFIG --libs` -l${GD}"
764                 AC_MSG_RESULT([$GD_LIBS])
765         fi
766    
767         # since some linux systems evidently install gdlib-config but fail to
768         # install the headers (nice), check for the header too and fail if it
769         # is not there.
770         CFLAGS="$CFLAGS $GD_CFLAGS"
771         CPPFLAGS="$CPPFLAGS $GD_CFLAGS"
772         AC_CHECK_HEADERS(gd.h)
773         case $ac_cv_header_gd_h in
774              no )
775                 AC_MSG_ERROR([
776 You evidentally do not have a complete installation of the GD library available from www.boutell.com/gd.
777 This is needed for the nelma and/or png HID.
779                 ;;
780              * ) ;;
781         esac
782         
783         # Some versions of gd (prior to the expiration of the
784         # patent related to gif compression) do not support
785         # gif output.  Check for that here.
786         save_LIBS="$LIBS"
787         LIBS="$save_LIBS $GD_LIBS $X_LIBS"
789         AC_MSG_CHECKING([if GIF output from the png HID is desired])
790         AC_ARG_ENABLE([gif],
791                 [  --disable-gif           Disable support for gif output when the png HID is used [[default=include gif support]]],
792                 [
793                 if test "X$enable_gif" != "Xno" ; then
794                         AC_MSG_RESULT([yes])
795                         with_gif=yes
796                 else
797                         AC_MSG_RESULT([no])
798                         with_gif=no
799                 fi
800                 ],
801                 [
802                 AC_MSG_RESULT([yes])
803                 with_gif=yes
804                 ])
805         if test "X$with_gif" = "Xyes" ; then
806                 AC_CHECK_FUNCS(gdImageGif)
807                 if test "$ac_cv_func_gdImageGif" != "yes"; then
808                         AC_MSG_ERROR([Your gd installation does not appear to include gif support.
809 You may need to update your installation of gd or disable
810 gif export with --disable-gif])
811                 fi
812         fi
814         AC_MSG_CHECKING([if JPEG output from the png HID is desired])
815         AC_ARG_ENABLE([jpeg],
816                 [  --disable-jpeg          Disable support for JPEG output when the png HID is used [[default=include JPEG support]]],
817                 [
818                 if test "X$enable_jpeg" != "Xno" ; then
819                         AC_MSG_RESULT([yes])
820                         with_jpeg=yes
821                 else
822                         AC_MSG_RESULT([no])
823                         with_jpeg=no
824                 fi
825                 ],
826                 [
827                 AC_MSG_RESULT([yes])
828                 with_jpeg=yes
829                 ])
830         if test "X$with_jpeg" = "Xyes" ; then
831                 AC_CHECK_FUNCS(gdImageJpeg)
832                 if test "$ac_cv_func_gdImageJpeg" != "yes"; then
833                         AC_MSG_ERROR([Your gd installation does not appear to include JPEG support.
834 You may need to update your installation of gd or disable
835 JPEG export with --disable-jpeg])
836                 fi
837         fi
840         AC_MSG_CHECKING([if PNG output from the png HID is desired])
841         AC_ARG_ENABLE([png],
842                 [  --disable-png           Disable support for PNG output when the png HID is used [[default=include PNG support]]],
843                 [
844                 if test "X$enable_png" != "Xno" ; then
845                         AC_MSG_RESULT([yes])
846                         with_png=yes
847                 else
848                         AC_MSG_RESULT([no])
849                         with_png=no
850                 fi
851                 ],
852                 [
853                 AC_MSG_RESULT([yes])
854                 with_png=yes
855                 ])
856         if test "X$with_png" = "Xyes" ; then
857                 AC_CHECK_FUNCS(gdImagePng)
858                 if test "$ac_cv_func_gdImagePng" != "yes"; then
859                         AC_MSG_ERROR([Your gd installation does not appear to include PNG support.
860 You may need to update your installation of gd or disable
861 PNG export with --disable-png])
862                 fi
863         fi
864         LIBS="$save_LIBS"
865         ;;
867     esac
868 done
871 AM_CONDITIONAL(PNG, test x$with_png = xyes)
872 AM_CONDITIONAL(GIF, test x$with_gif = xyes)
874 # ------------- check if png previews should be built for pcblib-newlib
875 AC_MSG_CHECKING([if the m4lib to newlib export should create png previews])
876 AC_ARG_ENABLE(
877         [m4lib-png],
878         [  --enable-m4lib-png      Enable creating png previews for the m4 library],
879         [],[enable_m4lib_png=no])
880 AC_MSG_RESULT([$enable_m4lib_png])
881 AM_CONDITIONAL(PNG_PREVIEW, test x$enable_m4lib_png = xyes)
884 # Run away.... more ugly stuff here.  By default we don't actually build
885 # pcblib-newlib from pcblib unless we are building from cvs or git sources.
886 # The reason is it takes a while and requires the png HID.  The problem is,
887 # what if someone wants to use --enable-m4lib-png but the tarball was built
888 # without the previews.  Or, what if someone does not want the PNG previews
889 # but the person building the tarball included them.  Ugh!  So what the following
890 # code attempts to do is detect that mismatch situation.  Note that we only
891 # want to kick this code in when *not* building from git or cvs sources.
892 build_pcblib_newlib=no
893 if test "$pcb_sources" = "tarball" ; then
894         AC_MSG_CHECKING([If pcblib-newlib was built with png previews])
895         stamp=$srcdir/lib/pcblib-newlib.stamp
896         if test ! -f ${stamp} ; then
897                 AC_MSG_RESULT([unknown, missing ${stamp}])
898                 build_pcblib_newlib=yes
899         else
900                 if test "`cat ${stamp}`" = "png-preview=yes" ; then
901                         AC_MSG_RESULT([yes])
902                         # lib exists and built with preview.
903                         # if we don't want the preview, than rebuild
904                         if test x$enable_m4lib_png != xyes ; then
905                                 build_pcblib_newlib=yes
906                         fi
907                 else
908                         AC_MSG_RESULT([no])
909                         # lib exists and built without preview.
910                         # if we want the preview, than rebuild
911                         if test x$enable_m4lib_png = xyes ; then
912                                 build_pcblib_newlib=yes
913                         fi
914                 fi
915         fi
916 else
917         build_pcblib_newlib=yes
919 AC_MSG_CHECKING([If pcblib-newlib needs to be rebuilt])
920 AC_MSG_RESULT([$build_pcblib_newlib])
921 AM_CONDITIONAL(BUILD_PCBLIB_NEWLIB, test x$build_pcblib_newlib = xyes)
923 if test "X$cross_compiling" = "Xyes" ; then
924         # we are cross compiling so we will need a build host binary for pcb
925         AC_PATH_PROG(PCB, [pcb], [notfound])
926 else
927         PCB="\${top_builddir}/src/pcb"
929 AC_SUBST(PCB)
931 # now make see how essential it was that we have a pcb executable for the build
932 # host
933 if test "X$pcb_git_version" = "Xyes" ; then
934         if test "X$docs_yesno" = "Xyes" -o "X$enable_m4lib_png" = "Xyes" ; then
935                 if test "$PCB" = "notfound" ; then
936                         AC_MSG_ERROR([You have selected a build with m4lib png
937 previews enabled and/or with building the documentation enabled but you also
938 appear to be cross-compiling.  For this to work, you must have a pcb installed that
939 can run on this machine (the build machine) because it is needed for generating
940 library footprint png previews as well as some of the figures in the documentation.
941 If you wish to skip building the documentation and the footprint previews then add
942 --disable-doc --disable-m4lib-png
943 This will allow your cross build to work.])
944                 fi
945         fi
948 # ------------- Xrender -------------------
949 have_xrender=no
950 AC_CHECK_LIB(Xrender,XRenderQueryExtension,have_xrender=yes,have_xrender=no,$X_LIBS)
952 AC_ARG_ENABLE([xrender],
953 [  --disable-xrender       Compile and link with Xrender [default=yes]])
954 case "$have_xrender:$enable_xrender" in
955    no:* ) ;;
956    *:no ) ;;
957    * )
958      X_LIBS="-lXrender $X_LIBS"
959      AC_DEFINE([HAVE_XRENDER], 1,
960                 [Define to 1 if Xrender is available])
961      ;;
962 esac
964 # ------------- dmalloc -------------------
965 dnl dmalloc checks
966 with_dmalloc=no
967 AC_MSG_CHECKING([if dmalloc debugging should be enabled])
968 AC_ARG_ENABLE([dmalloc],
969 [  --enable-dmalloc        Compile and link with dmalloc for malloc debugging [default=no]],
971 if test "X$enable_dmalloc" != "Xno" ; then
972         AC_MSG_RESULT([yes])
973         AC_CHECK_HEADER(dmalloc.h,,
974                 AC_MSG_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found]))
975         AC_CHECK_LIB(dmalloc,main,,
976                 AC_MSG_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found]))
977         DMALLOC_LIBS="-ldmalloc"
978         with_dmalloc=yes
979 else
980         AC_MSG_RESULT([no])
981         DMALLOC_LIBS=""
985         AC_MSG_RESULT([no])
986         DMALLOC_LIBS=""
989 # ------------- ElectricFence -------------------
990 dnl ElectricFence checks
991 with_efence=no
992 AC_MSG_CHECKING([if ElectricFence debugging should be enabled])
993 AC_ARG_ENABLE([efence],
994 [  --enable-efence         Link with ElectricFence for malloc debugging [default=no]],
996 if test "X$enable_efence" != "Xno" ; then
997         AC_MSG_RESULT([yes])
998         AC_CHECK_LIB(efence,main,,
999                 AC_MSG_ERROR([You have requested ElectricFence debugging but -lefence could not be found]))
1000         with_efence=yes
1001 else
1002         AC_MSG_RESULT([no])
1006 AC_MSG_RESULT([no])
1009 # ------------- Enable Debug code -------------------
1010 AC_MSG_CHECKING([for whether to enable debugging code])
1011 AC_ARG_ENABLE([debug],
1012 [  --enable-debug          Enable debugging code],
1013 [],[enable_debug=no])
1015 AC_MSG_RESULT([$enable_debug])
1016 AM_CONDITIONAL(DEBUG_BUILD, test x$enable_debug = xyes)
1019 # ------------- Complete set of CFLAGS and LIBS -------------------
1021 CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GLIB_CFLAGS $GTK_CFLAGS $CAIRO_CFLAGS"
1022 LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GLIB_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS $INTLLIBS $CAIRO_LIBS"
1025 # if we have gcc then add -Wall
1026 if test "x$GCC" = "xyes"; then
1027         # see about adding some extra checks if the compiler takes them
1028         for flag in -Wall -Wdeclaration-after-statement ; do
1029                 case " ${CFLAGS} " in
1030                         *\ ${flag}\ *)
1031                                 # flag is already present
1032                                 ;;
1033                         *)
1034                                 AC_MSG_CHECKING([if the compiler accepts ${flag}])
1035                                 ac_save_CFLAGS="$CFLAGS"
1036                                 CFLAGS="$CFLAGS ${flag}"
1037                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
1038                                         [AC_MSG_RESULT([yes])],
1039                                         [AC_MSG_RESULT([no])
1040                                          CFLAGS="$ac_save_CFLAGS"
1041                                         ]
1042                                 )
1043                                 ;;
1044                 esac
1045         done
1048 # font filename
1049 FONTFILENAME=${FONTFILENAME:-"default_font"}
1050 AC_SUBST(FONTFILENAME)
1051 AC_DEFINE_UNQUOTED(FONTFILENAME,"$FONTFILENAME",[File for default font])
1053 # standard autoconf variables
1054 CPPFLAGS="$CPPFLAGS -DPREFIXDIR=\\\"\${prefix}\\\""
1055 CPPFLAGS="$CPPFLAGS -DBINDIR=\\\"\${bindir}\\\""
1056 CPPFLAGS="$CPPFLAGS -DHOST=\\\"\${host}\\\""
1058 # directory for old-style library and for fonts
1059 PCBLIBDIR=${datadir}/pcb
1060 AC_SUBST(PCBLIBDIR)
1061 #AC_DEFINE_UNQUOTED(PCBLIBDIR,"$PCBLIBDIR",[Library directory])
1062 CPPFLAGS="$CPPFLAGS -DPCBLIBDIR=\\\"$PCBLIBDIR\\\""
1064 # name for old-style library
1065 LIBRARYFILENAME=pcblib
1066 AC_SUBST(LIBRARYFILENAME)
1067 AC_DEFINE_UNQUOTED(LIBRARYFILENAME,"$LIBRARYFILENAME",[library file name])
1070 # directory for new library
1071 PCBTREEDIR=${datadir}/pcb/newlib
1072 PCBTREEPATH=${PCBTREEDIR}:${PCBLIBDIR}/pcblib-newlib
1073 PCBTREEDIR=${PCBTREEDIR:-"$PCBTREEDIR"}
1074 AC_SUBST(PCBTREEDIR)
1075 AC_SUBST(PCBTREEPATH)
1076 #AC_DEFINE_UNQUOTED(PCBTREEDIR,"$PCBLIB",[top directory for new style pcb library])
1077 CPPFLAGS="$CPPFLAGS -DPCBTREEDIR=\\\"$PCBTREEDIR\\\""
1078 CPPFLAGS="$CPPFLAGS -DPCBTREEPATH=\\\"$PCBTREEPATH\\\""
1080 # Figure out relative paths
1081 AC_MSG_CHECKING([for the bindir to pcblibdir relative path])
1082 adl_COMPUTE_RELATIVE_PATHS([bindir:PCBLIBDIR:bindir_to_pcblibdir])
1083 adl_NORMALIZE_PATH([bindir_to_pcblibdir], [$PCB_DIR_SEPARATOR_S])
1084 AC_MSG_RESULT([$bindir_to_pcblibdir])
1085 AC_DEFINE_UNQUOTED(BINDIR_TO_PCBLIBDIR, "$bindir_to_pcblibdir", [Relative path from bindir to pcblibdir])
1087 AC_MSG_CHECKING([for the bindir to pcbtreedir relative path])
1088 adl_COMPUTE_RELATIVE_PATHS([bindir:PCBTREEDIR:bindir_to_pcbtreedir])
1089 adl_NORMALIZE_PATH([bindir_to_pcbtreedir], [$PCB_DIR_SEPARATOR_S])
1090 AC_MSG_RESULT([$bindir_to_pcbtreedir])
1091 AC_DEFINE_UNQUOTED(BINDIR_TO_PCBTREEDIR, "$bindir_to_pcbtreedir", [Relative path from bindir to pcbtreedir])
1094 AC_MSG_CHECKING([for the bindir to exec_prefix relative path])
1095 adl_COMPUTE_RELATIVE_PATHS([bindir:exec_prefix:bindir_to_execprefix])
1096 adl_NORMALIZE_PATH([bindir_to_execprefix], [$PCB_DIR_SEPARATOR_S])
1097 AC_MSG_RESULT([$bindir_to_execprefix])
1098 AC_DEFINE_UNQUOTED(BINDIR_TO_EXECPREFIX, "$bindir_to_execprefix", [Relative path from bindir to exec_prefix])
1101 BTNMOD=${BTNMOD:-"Mod1"}
1102 AC_SUBST(BTNMOD)
1104 TOPDIRS=
1105 for dir in src lib newlib doc example tools tutorial README_FILES
1107    test -d $dir/. && TOPDIRS="$TOPDIRS $dir"
1108 done
1109 AC_SUBST(TOPDIRS)
1111 AC_CONFIG_FILES(Makefile data/Makefile intl/Makefile po/Makefile.in)
1113 if test -d $srcdir/README_FILES; then
1114    AC_CONFIG_FILES(README_FILES/Makefile)
1116 if test -d $srcdir/doc; then
1117    AC_CONFIG_FILES(doc/Makefile)
1119 if test -d $srcdir/doc/gs; then
1120    AC_CONFIG_FILES(doc/gs/Makefile)
1121    AC_CONFIG_FILES(doc/gs/gafrc)
1122    AC_CONFIG_FILES(doc/gs/gschemrc)
1124 if test -d $srcdir/example; then
1125    AC_CONFIG_FILES(example/Makefile)
1126    AC_CONFIG_FILES(example/libraries/Makefile)
1128 if test -d $srcdir/lib; then
1129    AC_CONFIG_FILES(lib/CreateLibraryContents.sh)
1130    AC_CONFIG_FILES(lib/CreateLibrary.sh)
1131    AC_CONFIG_FILES(lib/ListLibraryContents.sh)
1132    AC_CONFIG_FILES(lib/Makefile)
1133    AC_CONFIG_FILES(lib/QueryLibrary.sh)
1134    AC_CONFIG_FILES(lib/qfp-ui)
1136 if test -d $srcdir/newlib; then
1137    AC_CONFIG_FILES(newlib/2_pin_thru-hole_packages/Makefile)
1138    AC_CONFIG_FILES(newlib/Makefile)
1139    AC_CONFIG_FILES(newlib/connectors/Makefile)
1140    AC_CONFIG_FILES(newlib/crystal/Makefile)
1141    AC_CONFIG_FILES(newlib/electro-optics/Makefile)
1142    AC_CONFIG_FILES(newlib/headers/Makefile)
1143    AC_CONFIG_FILES(newlib/keystone/Makefile)
1144    AC_CONFIG_FILES(newlib/msp430/Makefile)
1145    AC_CONFIG_FILES(newlib/not_vetted_ingo/Makefile)
1146    AC_CONFIG_FILES(newlib/sockets/Makefile)
1147    AC_CONFIG_FILES(newlib/tests/Makefile)
1149 AC_CONFIG_FILES(src/Makefile)
1150 AC_CONFIG_FILES(src/icons/Makefile)
1151 if test -d $srcdir/tools; then
1152    AC_CONFIG_FILES(tools/Makefile)
1154 if test -d $srcdir/tutorial; then
1155    AC_CONFIG_FILES(tutorial/Makefile)
1158 dnl testsuite
1159 AC_CONFIG_FILES(tests/inputs/Makefile)
1160 AC_CONFIG_FILES(tests/golden/Makefile)
1161 AC_CONFIG_FILES(tests/golden/hid_bom1/Makefile)
1162 AC_CONFIG_FILES(tests/golden/hid_bom2/Makefile)
1163 AC_CONFIG_FILES(tests/golden/hid_bom3/Makefile)
1164 AC_CONFIG_FILES(tests/golden/hid_bom4/Makefile)
1165 AC_CONFIG_FILES(tests/golden/hid_gcode1/Makefile)
1166 AC_CONFIG_FILES(tests/golden/hid_gcode2/Makefile)
1167 AC_CONFIG_FILES(tests/golden/hid_gcode3/Makefile)
1168 AC_CONFIG_FILES(tests/golden/hid_gcode4/Makefile)
1169 AC_CONFIG_FILES(tests/golden/hid_gcode5/Makefile)
1170 AC_CONFIG_FILES(tests/golden/hid_gcode6/Makefile)
1171 AC_CONFIG_FILES(tests/golden/hid_gcode7/Makefile)
1172 AC_CONFIG_FILES(tests/golden/hid_gcode8/Makefile)
1173 AC_CONFIG_FILES(tests/golden/hid_gcode9/Makefile)
1174 AC_CONFIG_FILES(tests/golden/hid_gcode10/Makefile)
1175 AC_CONFIG_FILES(tests/golden/hid_gcode11/Makefile)
1176 AC_CONFIG_FILES(tests/golden/hid_gerber1/Makefile)
1177 AC_CONFIG_FILES(tests/golden/hid_gerber2/Makefile)
1178 AC_CONFIG_FILES(tests/golden/hid_png1/Makefile)
1179 AC_CONFIG_FILES(tests/golden/hid_png2/Makefile)
1180 AC_CONFIG_FILES(tests/golden/hid_png3/Makefile)
1181 AC_CONFIG_FILES(tests/Makefile)
1183 dnl win32 build scripts
1184 AC_CONFIG_FILES(win32/Makefile)
1186 AC_OUTPUT
1188 with_gui=`echo $with_gui`
1189 with_printer=`echo $with_printer`
1190 with_exporters=`echo $with_exporters | sed 's/,/ /g'`
1192 expandedXDGDATADIR=`eval "echo $XDGDATADIR"`
1193 expandedKDEDATADIR=`eval "echo $KDEDATADIR"`
1195 AC_MSG_RESULT([
1196 ** Configuration summary for $PACKAGE $VERSION:
1198    GUI:                      $with_gui
1199    Printer:                  $with_printer
1200    Exporters:                $with_exporters
1201    Source tree distribution: $pcb_sources
1202    Build documentation:      $docs_yesno
1203    Build toporouter:         $enable_toporouter
1204    Enable toporouter output: $enable_toporouter_output
1205    xdg data directory:       $expandedXDGDATADIR
1206    KDE data directory:       $expandedKDEDATADIR
1207    dmalloc debugging:        $with_dmalloc
1208    ElectricFence debugging:  $with_efence
1210    Cross Compiling:          $cross_compiling
1211    CC:                       $CC
1212    CPPFLAGS:                 $CPPFLAGS
1213    CFLAGS:                   $CFLAGS
1214    LIBS:                     $LIBS
1215    PCB:                      $PCB