2 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT([pcb], [1.99w])
5 AC_CONFIG_SRCDIR([src/draw.c])
7 AM_INIT_AUTOMAKE([1.9])
9 AM_CONFIG_HEADER([config.h])
13 dnl determine host type
15 AC_MSG_CHECKING(for windows)
16 PCB_PATH_DELIMETER=":"
17 PCB_DIR_SEPARATOR_S="/"
18 PCB_DIR_SEPARATOR_C='/'
21 CFLAGS="$CFLAGS ${CYGWIN_CFLAGS}"
22 CPPFLAGS="$CPPFLAGS ${CYGWIN_CPPFLAGS}"
27 CFLAGS="$CFLAGS ${MINGW_CFLAGS:--mms-bitfields -mwindows}"
28 CPPFLAGS="$CPPFLAGS ${MINGW_CPPFLAGS:--mms-bitfields -mwindows}"
38 AM_CONDITIONAL(WIN32, test x$WIN32 = xyes)
39 if test "x$WIN32" = "xyes" ; then
40 PCB_PATH_DELIMETER=";"
41 PCB_DIR_SEPARATOR_S="\\\\"
42 PCB_DIR_SEPARATOR_C='\\'
45 AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_C,'$PCB_DIR_SEPARATOR_C',[Directory separator char])
46 AC_DEFINE_UNQUOTED(PCB_DIR_SEPARATOR_S,"$PCB_DIR_SEPARATOR_S",[Directory separator string])
47 AC_DEFINE_UNQUOTED(PCB_PATH_DELIMETER,"$PCB_PATH_DELIMETER",[Search path separator string])
50 dnl Checks for programs.
54 GETTEXT_PACKAGE=$PACKAGE
55 AC_SUBST(GETTEXT_PACKAGE)
57 AM_GNU_GETTEXT_VERSION([0.14])
59 IT_PROG_INTLTOOL([0.35.0])
68 AC_PATH_PROG(LEX_PATH, $LEX, [notfound])
69 if test "$LEX_PATH" = "notfound" ; then
70 AC_MSG_ERROR([Couldn't find a usable lex program.
71 Please install flex which is available from
72 ftp://ftp.gnu.org/pub/non-gnu/flex/
78 AC_PATH_PROG(YACC_PATH, $YACC, [notfound])
79 if test "$YACC_PATH" = "notfound" ; then
80 AC_MSG_ERROR([Couldn't find a usable yacc program.
81 Please install bison which is available from
82 ftp://ftp.gnu.org/pub/gnu/bison/
90 # Used for building the win32 icons.
92 AC_PATH_PROG(TGIF, tgif, notfound)
93 AM_CONDITIONAL(MISSING_TGIF, test x$TGIF = xnotfound)
94 AC_PATH_PROG(XPMTOPPM, xpmtoppm, notfound)
95 AC_PATH_PROG(PPMTOWINICON, ppmtowinicon, notfound)
96 AM_CONDITIONAL(MISSING_XPMTOPPM, test x$PPMTOWINICON = xnotfound -o x$XPMTOPPM = xnotfound)
97 AC_PATH_PROG(CONVERT, convert, notfound)
98 AM_CONDITIONAL(MISSING_CONVERT, test x$CONVERT = xnotfound)
102 AC_MSG_CHECKING([if the documentation should be built])
104 [ --enable-doc Build and install the documentation [[default=yes]]],
106 if test "X$enable_doc" = "Xno" ; then
123 if test "X$docs_yesno" = "Xyes" -a "X$USE_MAINTAINER_MODE" = "Xyes" ; then
124 AC_CHECK_PROGS(MKINFO, makeinfo, no)
125 if test "X$MKINFO" != "Xno"; then
126 AC_MSG_CHECKING([for GNU makeinfo version >= 4.6])
127 v=`$MKINFO --version | grep "GNU texinfo"`
128 if test $? -ne 0; then
129 AC_MSG_RESULT([non-GNU])
133 if test "X$MKINFO" != "Xno"; then
134 vmajor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\1/'`
135 vminor=`echo "$v" | sed 's/.* \([[0-9]]*\)\.\([[0-9]]*\)$/\2/'`
136 AC_MSG_RESULT([$vmajor.$vminor])
137 if test "$vmajor" -lt 4 \
138 || (test "$vmajor" -eq 4 && test "$vminor" -lt 6); then
142 if test "X$MKINFO" = "Xno"; then
143 AC_MSG_ERROR([You have requested a maintainer-mode build and a build
144 of the documentation. For this to work, you must have version 4.6 or newer of
145 the GNU texinfo package. You seem to have
152 AC_CHECK_PROGS(TEXI2DVI, texi2dvi, no)
153 if test "X$TEXI2DVI" = "Xno"; then
154 AC_MSG_ERROR([You have requested a maintainer-mode build and a build
155 of the documentation. For this to work, you must have the texi2dvi program
160 AC_PATH_PROG(PERL, perl, notfound)
161 if test "X$PERL" = "Xnotfound"; then
162 AC_MSG_ERROR([You have requested a maintainer-mode build and a build
163 of the documentation. For this to work, you must have perl installed.
168 # FIXME: for now, only try to add -rdynamic if we're using gcc. We really
169 # need to figure out what the correct test is here. In the mean time, this
170 # should let things build with SunPRO again.
171 if test "x$GCC" = "xyes"; then
172 AC_MSG_CHECKING([If the compiler accepts -rdynamic])
173 old_LDFLAGS="$LDFLAGS"
174 LDFLAGS="$LDFLAGS -rdynamic"
175 AC_LINK_IFELSE([int main(){}],
176 [AC_MSG_RESULT([yes])],
177 [LDFLAGS="$old_LDFLAGS"
182 # ------------- HID config -------------------
189 for hid in `cd $srcdir/src/hid; echo *`; do
190 F=$srcdir/src/hid/$hid/hid.conf
196 gui ) hid_guis="$hid_guis $hid" ;;
197 printer ) hid_printers="$hid_printers $hid" ;;
198 export ) hid_exporters="$hid_exporters $hid" ;;
199 always ) hid_always="$hid_always $hid" ;;
204 AC_MSG_CHECKING([for which gui to use])
206 [ --with-gui= Specify the GUI to use: batch gtk lesstif [[default=gtk]]],
210 AC_MSG_RESULT([$with_gui])
211 case " $hid_guis no none " in
212 *\ $with_gui\ * ) HIDLIST="$with_gui" ;;
213 * ) AC_MSG_ERROR([$with_gui is not a valid gui]) ;;
216 if test x"$with_gui" = x"none" -o x"$with_gui" = x"no"
221 AC_MSG_CHECKING([for whether to use DBUS])
222 AC_ARG_ENABLE([dbus],
223 [ --enable-dbus Enable DBUS IPC],
226 AC_MSG_RESULT([$enable_dbus])
227 AM_CONDITIONAL(WITH_DBUS, test x$enable_dbus = xyes)
229 if test "x$enable_dbus" = "xyes"; then
230 case " $with_gui " in
233 * ) AC_MSG_ERROR([DBUS enabled but only works with a mainloop capable GUI HID.
234 Either do not use --enable-dbus or enable the gtk or lesstif GUI HID.])
237 # Check for pkg-config
238 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
239 if test "$PKG_CONFIG" = "no"; then
240 AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
243 PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.61,
245 LIBS="$LIBS $DBUS_LIBS"
246 AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
247 LIBS="$saved_LIBS" ],
248 [AC_MSG_ERROR([Cannot find dbus-1 >= 0.61, install it and rerun ./configure
249 Please review the following errors:
252 DBUS_VERSION=`$PKG_CONFIG dbus-1 --modversion`
254 AC_DEFINE([HAVE_DBUS], 1,
255 [Define to 1 if DBUS IPC is to be compiled in])
259 AC_MSG_CHECKING([for which printer to use])
260 AC_ARG_WITH([printer],
261 [ --with-printer= Specify the printer: lpr [[default=lpr]]],
262 [],[with_printer=lpr])
263 AC_MSG_RESULT([$with_printer])
264 case " $hid_printers " in
265 *\ $with_printer\ * )
266 HIDLIST="$HIDLIST $with_printer"
268 * ) AC_MSG_ERROR([$with_printer is not a valid printer]) ;;
271 AC_MSG_CHECKING([for which exporters to use])
272 AC_ARG_WITH([exporters],
273 [ --with-exporters= Enable export devices: bom gerber nelma png ps [[default=bom gerber nelma png ps]]],
274 [],[with_exporters=$hid_exporters])
275 AC_MSG_RESULT([$with_exporters])
276 for e in `echo $with_exporters | sed 's/,/ /g'`; do
277 case " $hid_exporters " in
279 HIDLIST="$HIDLIST $e"
281 * ) AC_MSG_ERROR([$e is not a valid exporter]) ;;
285 if test "X$enable_jpeg" = "Xno" -a "X$enable_gif" = "Xno" -a "X$enable_png" = "Xno" ; then
286 case " ${HIDLIST} " in
288 AC_MSG_ERROR([you have requested the png HID but turned off all output
289 formats! If you do not want gif/jpeg/png output, use --with-exporters to list
290 which exporters you want and do not list png there.])
298 for e in $HIDLIST; do
299 HIDLIBS="$HIDLIBS lib$e.a"
305 # ------------- end HID config -------------------
307 ######################################################################
309 # desktop integration
312 # Change default location for XDG files (MIME and Icons)
313 AC_ARG_WITH(xdgdatadir, [ --with-xdgdatadir=path Change where the theme icons
314 and mime registrations are installed [[DATADIR]]], [opt_xdgdatadir=$withval])
316 # Change default location for KDE data files (KDE MIME registrations)
317 AC_ARG_WITH(kdedatadir, [ --with-kdedatadir=path Change where the KDE mime reg
318 istrations are installed [[DATADIR]]], [opt_kdedatadir=$withval])
320 if test x$opt_xdgdatadir = x; then
321 # path was not specified with --with-xdgdatadir
322 XDGDATADIR='${datadir}'
324 # path WAS specified with --with-xdgdatadir
325 XDGDATADIR="$opt_xdgdatadir"
329 if test x$opt_kdedatadir = x; then
330 # path was not specified with --with-kdedatadir
331 KDEDATADIR='${datadir}'
333 # path WAS specified with --with-kdedatadir
334 KDEDATADIR="$opt_kdedatadir"
338 AC_ARG_ENABLE(update-desktop-database,
339 AC_HELP_STRING([--disable-update-desktop-database],
340 [do not update desktop database after installation]),,
341 enable_update_desktop_database=yes)
343 AM_CONDITIONAL(ENABLE_UPDATE_DESKTOP_DATABASE, test x$enable_update_desktop_database = xyes)
345 if test x$enable_update_desktop_database = xyes ; then
346 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, [update-desktop-database], no)
347 if test $UPDATE_DESKTOP_DATABASE = no; then
348 AC_MSG_ERROR([Cannot find update-desktop-database, make sure it is installed and in your PATH, or configure with --disable-update-desktop-database])
352 AC_ARG_ENABLE(update-mime-database,
353 AC_HELP_STRING([--disable-update-mime-database],
354 [do not update mime database after installation]),,
355 enable_update_mime_database=yes)
357 AM_CONDITIONAL(ENABLE_UPDATE_MIME_DATABASE, test x$enable_update_mime_database = xyes)
359 if test x$enable_update_mime_database = xyes ; then
360 AC_PATH_PROG(UPDATE_MIME_DATABASE, [update-mime-database], no)
361 if test $UPDATE_MIME_DATABASE = no; then
362 AC_MSG_ERROR([Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database])
367 ######################################################################
369 AC_PATH_PROGS(M4, gm4 m4, [none])
370 if test "X$M4" = "Xnone" ; then
371 AC_MSG_ERROR([Did not find a m4 executible. You need to make sure
372 that m4 is installed on your system and that m4 is in your path])
374 AC_MSG_CHECKING([if $M4 has the division involving negative numbers bug])
375 pcb_m4_r=`echo "eval(-2/2)" | $M4`
376 if test "$pcb_m4_r" != "-1" ; then
378 AC_MSG_ERROR([It appears that $M4 has a bug involving division
379 with negative numbers. In particular it just returned the result that
380 -2/2 = $pcb_m4_r instead of -1. This is a known bug in GNU m4-1.4.9. Please
381 install a non-broken m4.])
387 AC_PATH_PROGS(WISH, wish wish83 wish8.3 wish80 wish8.0 cygwish83 cygwish80,[none])
388 if test "X$WISH" = "Xnone" ; then
389 AC_MSG_ERROR([Did not find the wish executible. You need to make sure
390 that tcl is installed on your system and that wish is in your path])
393 AC_DEFINE_UNQUOTED(M4,$M4,[m4 executible])
396 AC_DEFINE_UNQUOTED(GNUM4,"$M4",[m4 program used by pcb])
398 AC_CHECK_PROGS(LATEX, latex, notfound)
399 AM_CONDITIONAL(MISSING_LATEX, test x$LATEX = xnotfound)
401 AC_CHECK_PROGS(PDFLATEX, pdflatex, notfound)
402 AM_CONDITIONAL(MISSING_PDFLATEX, test x$PDFLATEX = xnotfound)
404 AC_CHECK_PROGS(DVIPS, dvips, notfound)
405 AM_CONDITIONAL(MISSING_DVIPS, test x$DVIPS = xnotfound)
407 AC_CHECK_PROGS(PS2PDF, ps2pdf, notfound)
408 AM_CONDITIONAL(MISSING_PS2PDF, test x$PS2PDF = xnotfound)
410 dnl Checks for libraries.
411 AC_CHECK_LIB(m, sqrt)
412 AC_CHECK_LIB(dl, dlopen)
413 AC_CHECK_LIB(xnet, gethostbyname)
414 AC_CHECK_LIB(fl, yywrap)
415 AC_CHECK_FUNCS(strerror)
416 AC_CHECK_FUNCS(regcomp re_comp)
417 AC_CHECK_FUNCS(logf expf rint)
418 AC_CHECK_FUNCS(vsnprintf)
419 AC_CHECK_FUNCS(getpwuid gethostname getcwd)
420 AC_CHECK_FUNCS(random)
423 # normally used for all file i/o
424 AC_CHECK_FUNCS(popen)
427 AC_CHECK_FUNCS(realpath canonicalize_file_name)
428 libiberty_NEED_DECLARATION(canonicalize_file_name)
431 AC_CHECK_HEADERS(limits.h string.h sys/types.h regex.h pwd.h)
432 AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h sys/param.h sys/times.h)
433 AC_CHECK_HEADERS(dlfcn.h)
435 if test "x${WIN32}" = "xyes" ; then
436 AC_CHECK_HEADERS(windows.h)
439 for e in $HIDLIST; do
443 CPPFLAGS="$CFLAGS $X_CFLAGS"
444 AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
445 AC_CHECK_LIB(ICE, main, , , $X_LIBS)
446 AC_CHECK_LIB(SM, main, , , $X_LIBS)
447 AC_CHECK_LIB(Xext, main, , , $X_LIBS)
448 AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS)
449 AC_CHECK_LIB(Xmu, main, , , $X_LIBS)
450 AC_CHECK_LIB(Xpm, main, , , $X_LIBS)
451 AC_CHECK_LIB(Xm, XmCreateMainWindow, , , $X_LIBS)
452 case $ac_cv_lib_Xm_XmCreateMainWindow in
454 AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.])
458 AC_CHECK_HEADERS(Xm/Xm.h)
459 case $ac_cv_header_Xm_Xm_h in
461 AC_MSG_ERROR([You don't seem to have the Lesstif development environment installed.])
468 # Check for pkg-config
469 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
470 if test "$PKG_CONFIG" = "no"; then
471 AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
474 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0, ,
475 [AC_MSG_ERROR([Cannot find gtk+ >= 2.4.0, install it and rerun ./configure
476 Please review the following errors:
479 GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
481 # if we are building for gtk >= 2.8.0, we can use gdk_display_warp_pointer()
482 # otherwise we need XWarpPointer and we'll pull in the required headers with
483 # gdk/gdkx.h and we'll need to link with X11
484 if ! $PKG_CONFIG gtk+-2.0 --atleast-version=2.8.0 ; then
485 CPPFLAGS="$CFLAGS $GTK_CFLAGS"
486 AC_CHECK_HEADERS([gdk/gdkx.h])
490 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.4.0, ,
491 [AC_MSG_ERROR([Cannot find glib >= 2.4.0, install it and rerun ./configure.
492 Please review the following errors:
495 GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion`
499 # Check for gdlib-config for gd (www.boutell.com/gd)
500 AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no)
501 if test "$GDLIB_CONFIG" = "no"; then
502 AC_MSG_RESULT([Cannot find gdlib-config.
503 Make sure it is installed and in your PATH.
504 gdlib-config is part of the GD library available from www.boutell.com/gd.
505 This is needed for the png HID. I will look for libgd anyway and maybe
508 if test "$WIN32" != "yes" ; then
509 AC_CHECK_LIB(gd,main,,
510 AC_MSG_ERROR([You have requested the nelma and/or png HID but -lgd could not be found]))
512 AC_CHECK_LIB(bgd,main,,
513 AC_MSG_ERROR([You have requested the nelma and/or png HID but -lbgd could not be found]))
516 if test "$WIN32" = "yes" ; then
521 AC_MSG_CHECKING([for libgd cflags])
522 GD_CFLAGS="`$GDLIB_CONFIG --cflags`"
523 AC_MSG_RESULT([$GD_CFLAGS])
524 AC_MSG_CHECKING([for libgd libs])
525 GD_LIBS="`$GDLIB_CONFIG --ldflags` `$GDLIB_CONFIG --libs` -l${GD}"
526 AC_MSG_RESULT([$GD_LIBS])
529 # since some linux systems evidently install gdlib-config but fail to
530 # install the headers (nice), check for the header too and fail if it
532 CFLAGS="$CFLAGS $GD_CFLAGS"
533 CPPFLAGS="$CPPFLAGS $GD_CFLAGS"
534 AC_CHECK_HEADERS(gd.h)
535 case $ac_cv_header_gd_h in
538 You evidentally do not have a complete installation of the GD library available from www.boutell.com/gd.
539 This is needed for the nelma and/or png HID.
545 # Some versions of gd (prior to the expiration of the
546 # patent related to gif compression) do not support
547 # gif output. Check for that here.
549 LIBS="$save_LIBS $GD_LIBS $X_LIBS"
551 AC_MSG_CHECKING([if GIF output from the png HID is desired])
553 [ --disable-gif Disable support for gif output when the png HID is used [[default=include gif support]]],
555 if test "X$enable_gif" != "Xno" ; then
567 if test "X$with_gif" = "Xyes" ; then
568 AC_CHECK_FUNCS(gdImageGif)
569 if test "$ac_cv_func_gdImageGif" != "yes"; then
570 AC_MSG_ERROR([Your gd installation does not appear to include gif support.
571 You may need to update your installation of gd or disable
572 gif export with --disable-gif])
576 AC_MSG_CHECKING([if JPEG output from the png HID is desired])
577 AC_ARG_ENABLE([jpeg],
578 [ --disable-jpeg Disable support for JPEG output when the png HID is used [[default=include JPEG support]]],
580 if test "X$enable_jpeg" != "Xno" ; then
592 if test "X$with_jpeg" = "Xyes" ; then
593 AC_CHECK_FUNCS(gdImageJpeg)
594 if test "$ac_cv_func_gdImageJpeg" != "yes"; then
595 AC_MSG_ERROR([Your gd installation does not appear to include JPEG support.
596 You may need to update your installation of gd or disable
597 JPEG export with --disable-jpeg])
602 AC_MSG_CHECKING([if PNG output from the png HID is desired])
604 [ --disable-png Disable support for PNG output when the png HID is used [[default=include PNG support]]],
606 if test "X$enable_png" != "Xno" ; then
618 if test "X$with_png" = "Xyes" ; then
619 AC_CHECK_FUNCS(gdImagePng)
620 if test "$ac_cv_func_gdImagePng" != "yes"; then
621 AC_MSG_ERROR([Your gd installation does not appear to include PNG support.
622 You may need to update your installation of gd or disable
623 PNG export with --disable-png])
633 AM_CONDITIONAL(PNG, test x$with_png = xyes)
634 AM_CONDITIONAL(GIF, test x$with_gif = xyes)
637 # ------------- Xrender -------------------
639 AC_CHECK_LIB(Xrender,XRenderQueryExtension,have_xrender=yes,have_xrender=no,$X_LIBS)
641 AC_ARG_ENABLE([xrender],
642 [ --disable-xrender Compile and link with Xrender [default=yes]])
643 case "$have_xrender:$enable_xrender" in
647 X_LIBS="-lXrender $X_LIBS"
648 AC_DEFINE([HAVE_XRENDER], 1,
649 [Define to 1 if Xrender is available])
653 # ------------- dmalloc -------------------
656 AC_MSG_CHECKING([if dmalloc debugging should be enabled])
657 AC_ARG_ENABLE([dmalloc],
658 [ --enable-dmalloc Compile and link with dmalloc for malloc debugging [default=no]],
660 if test "X$enable_dmalloc" != "Xno" ; then
662 AC_CHECK_HEADER(dmalloc.h,,
663 AC_MSG_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found]))
664 AC_CHECK_LIB(dmalloc,main,,
665 AC_MSG_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found]))
666 DMALLOC_LIBS="-ldmalloc"
678 # ------------- ElectricFence -------------------
679 dnl ElectricFence checks
681 AC_MSG_CHECKING([if ElectricFence debugging should be enabled])
682 AC_ARG_ENABLE([efence],
683 [ --enable-efence Link with ElectricFence for malloc debugging [default=no]],
685 if test "X$enable_efence" != "Xno" ; then
687 AC_CHECK_LIB(efence,main,,
688 AC_MSG_ERROR([You have requested ElectricFence debugging but -lefence could not be found]))
698 CFLAGS="$CFLAGS $X_CFLAGS $DBUS_CFLAGS $GTK_CFLAGS"
699 LIBS="$LIBS $XM_LIBS $DBUS_LIBS $X_LIBS $GTK_LIBS $DMALLOC_LIBS $GD_LIBS"
702 # if we have gcc then add -Wall
703 if test "x$GCC" = "xyes"; then
704 if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
705 CFLAGS="$CFLAGS -Wall"
711 FONTFILENAME=${FONTFILENAME:-"default_font"}
712 AC_SUBST(FONTFILENAME)
713 AC_DEFINE_UNQUOTED(FONTFILENAME,"$FONTFILENAME",[File for default font])
715 # standard autoconf variables
716 CPPFLAGS="$CPPFLAGS -DPREFIXDIR=\\\"\${prefix}\\\""
717 CPPFLAGS="$CPPFLAGS -DBINDIR=\\\"\${bindir}\\\""
718 CPPFLAGS="$CPPFLAGS -DHOST=\\\"\${host}\\\""
720 # directory for old-style library and for fonts
721 PCBLIBDIR=${datadir}/pcb
723 #AC_DEFINE_UNQUOTED(PCBLIBDIR,"$PCBLIBDIR",[Library directory])
724 CPPFLAGS="$CPPFLAGS -DPCBLIBDIR=\\\"$PCBLIBDIR\\\""
726 # name for old-style library
727 LIBRARYFILENAME=pcblib
728 AC_SUBST(LIBRARYFILENAME)
729 AC_DEFINE_UNQUOTED(LIBRARYFILENAME,"$LIBRARYFILENAME",[library file name])
732 # directory for new library
733 PCBTREEDIR=${datadir}/pcb/newlib
734 PCBTREEPATH=${PCBTREEDIR}:${PCBLIBDIR}/pcblib-newlib
735 PCBTREEDIR=${PCBTREEDIR:-"$PCBTREEDIR"}
737 AC_SUBST(PCBTREEPATH)
738 #AC_DEFINE_UNQUOTED(PCBTREEDIR,"$PCBLIB",[top directory for new style pcb library])
739 CPPFLAGS="$CPPFLAGS -DPCBTREEDIR=\\\"$PCBTREEDIR\\\""
740 CPPFLAGS="$CPPFLAGS -DPCBTREEPATH=\\\"$PCBTREEPATH\\\""
742 # Figure out relative paths
743 AC_MSG_CHECKING([for the bindir to pcblibdir relative path])
744 adl_COMPUTE_RELATIVE_PATHS([bindir:PCBLIBDIR:bindir_to_pcblibdir])
745 adl_NORMALIZE_PATH([bindir_to_pcblibdir], [$PCB_DIR_SEPARATOR_S])
746 AC_MSG_RESULT([$bindir_to_pcblibdir])
747 AC_DEFINE_UNQUOTED(BINDIR_TO_PCBLIBDIR, "$bindir_to_pcblibdir", [Relative path from bindir to pcblibdir])
749 AC_MSG_CHECKING([for the bindir to pcbtreedir relative path])
750 adl_COMPUTE_RELATIVE_PATHS([bindir:PCBTREEDIR:bindir_to_pcbtreedir])
751 adl_NORMALIZE_PATH([bindir_to_pcbtreedir], [$PCB_DIR_SEPARATOR_S])
752 AC_MSG_RESULT([$bindir_to_pcbtreedir])
753 AC_DEFINE_UNQUOTED(BINDIR_TO_PCBTREEDIR, "$bindir_to_pcbtreedir", [Relative path from bindir to pcbtreedir])
756 AC_MSG_CHECKING([for the bindir to exec_prefix relative path])
757 adl_COMPUTE_RELATIVE_PATHS([bindir:exec_prefix:bindir_to_execprefix])
758 adl_NORMALIZE_PATH([bindir_to_execprefix], [$PCB_DIR_SEPARATOR_S])
759 AC_MSG_RESULT([$bindir_to_execprefix])
760 AC_DEFINE_UNQUOTED(BINDIR_TO_EXECPREFIX, "$bindir_to_execprefix", [Relative path from bindir to exec_prefix])
763 BTNMOD=${BTNMOD:-"Mod1"}
767 for dir in src lib newlib doc example tools tutorial README_FILES
769 test -d $dir/. && TOPDIRS="$TOPDIRS $dir"
773 AC_CONFIG_FILES(Makefile data/Makefile intl/Makefile po/Makefile.in)
775 if test -d $srcdir/README_FILES; then
776 AC_CONFIG_FILES(README_FILES/Makefile)
778 if test -d $srcdir/doc; then
779 AC_CONFIG_FILES(doc/Makefile)
781 if test -d $srcdir/example; then
782 AC_CONFIG_FILES(example/Makefile)
783 AC_CONFIG_FILES(example/libraries/Makefile)
785 if test -d $srcdir/lib; then
786 AC_CONFIG_FILES(lib/CreateLibraryContents.sh)
787 AC_CONFIG_FILES(lib/CreateLibrary.sh)
788 AC_CONFIG_FILES(lib/ListLibraryContents.sh)
789 AC_CONFIG_FILES(lib/Makefile)
790 AC_CONFIG_FILES(lib/QueryLibrary.sh)
791 AC_CONFIG_FILES(lib/m4lib_to_newlib.sh)
792 AC_CONFIG_FILES(lib/qfp-ui)
794 if test -d $srcdir/newlib; then
795 AC_CONFIG_FILES(newlib/2_pin_thru-hole_packages/Makefile)
796 AC_CONFIG_FILES(newlib/Makefile)
797 AC_CONFIG_FILES(newlib/analog-devices/Makefile)
798 AC_CONFIG_FILES(newlib/burr-brown/Makefile)
799 AC_CONFIG_FILES(newlib/connectors/Makefile)
800 AC_CONFIG_FILES(newlib/crystal/Makefile)
801 AC_CONFIG_FILES(newlib/electro-optics/Makefile)
802 AC_CONFIG_FILES(newlib/headers/Makefile)
803 AC_CONFIG_FILES(newlib/keystone/Makefile)
804 AC_CONFIG_FILES(newlib/msp430/Makefile)
805 AC_CONFIG_FILES(newlib/not_vetted_ingo/Makefile)
806 AC_CONFIG_FILES(newlib/sockets/Makefile)
807 AC_CONFIG_FILES(newlib/tests/Makefile)
809 AC_CONFIG_FILES(src/Makefile)
810 AC_CONFIG_FILES(src/icons/Makefile)
811 if test -d $srcdir/tools; then
812 AC_CONFIG_FILES(tools/Makefile)
814 if test -d $srcdir/tutorial; then
815 AC_CONFIG_FILES(tutorial/Makefile)
818 AC_CONFIG_FILES(win32/Makefile)
822 with_gui=`echo $with_gui`
823 with_printer=`echo $with_printer`
824 with_exporters=`echo $with_exporters | sed 's/,/ /g'`
826 expandedXDGDATADIR=`eval "echo $XDGDATADIR"`
827 expandedKDEDATADIR=`eval "echo $KDEDATADIR"`
830 ** Configuration summary for $PACKAGE $VERSION:
833 Printer: $with_printer
834 Exporters: $with_exporters
835 Build documentation: $docs_yesno
836 xdg data directory: $expandedXDGDATADIR
837 KDE data directory: $expandedKDEDATADIR
838 dmalloc debugging: $with_dmalloc
839 ElectricFence debugging: $with_efence