gsch2pcb: run_gnetlist now uses build_and_run_command
[geda-gaf/whiteaudio.git] / m4 / pcb-data-dirs.m4
blobac7aa44429dc4779b0acb0411be371ffd52c22f5
1 # pcb-data-dirs.m4                                      -*-Autoconf-*-
2 # serial 1.0
4 dnl PCB prefix and m4 library directory (needed by gnetlist)
5 dnl Copyright (C) 2009  Peter Brett <peter@peter-b.co.uk>
6 dnl
7 dnl This program is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation; either version 2 of the License, or
10 dnl (at your option) any later version.
11 dnl
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 dnl GNU General Public License for more details.
16 dnl
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with this program; if not, write to the Free Software
19 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 # Check where to look for PCB footprints.
22 # FIXME All of this should be done at runtime.
23 AC_DEFUN([AX_PCB_DIRS],
25   AC_PREREQ([2.60])dnl
27   # Check what prefix to use for PCB footprint libraries
28   AC_MSG_CHECKING([where to look for PCB footprints])
29   PCBDATADIR="${datarootdir}/pcb"
30   AC_ARG_WITH([pcb-datadir],
31     AS_HELP_STRING([--with-pcb-datadir=DIR],
32       [search for PCB libraries in DIR [[DATAROOTDIR/pcb]]]),
33     [ if (test "X$with_pcb_datadir" != "Xno" &&
34           test "X$with_pcb_datadir" != "Xyes"); then
35         PCBDATADIR="$with_pcb_datadir"
36       fi ], [])
37   AC_MSG_RESULT([$PCBDATADIR])
38   AC_SUBST([PCBDATADIR])
40   # m4 libraries
41   AC_MSG_CHECKING([where to look for PCB m4 footprints])
42   PCBM4DIR="${PCBDATADIR}/m4"
43   AC_ARG_WITH([pcb-m4dir],
44     AS_HELP_STRING([--with-pcb-m4dir=DIR],
45       [search for PCB m4 libraries in DIR [[PCBDATADIR/m4]]]),
46     [ if (test "X$with_pcb_m4dir" != "Xno" &&
47           test "X$with_pcb_m4dir" != "Xyes"); then
48         PCBM4DIR="$with_pcb_m4dir"
49       fi ], [])
50   AC_MSG_RESULT([$PCBM4DIR])
51   AC_SUBST([PCBM4DIR])
53   # newlib search path
54   AC_MSG_CHECKING([search path for PCB newlib footprints])
55   PCBLIBPATH="${PCBDATADIR}/pcblib-newlib:$PCBDATADIR/newlib"
56   AC_ARG_WITH([pcb-lib-path],
57     AS_HELP_STRING([--with-pcb-lib-path=PATH],
58       [search path for PCB newlib footprint libraries]),
59     [ if (test "X$with_pcb_lib_path" != "Xno" &&
60           test "X$with_pcb_lib_path" != "Xyes"); then
61         PCBLIBPATH="$with_pcb_lib_path"
62       fi ], [])
63   AC_MSG_RESULT([$PCBLIBPATH])
64   AC_SUBST([PCBLIBPATH])
66   # PCB configuration files
67   AC_MSG_CHECKING([where to look for PCB configuration])
68   PCBCONFDIR="${sysconfdir}/pcb"
69   AC_ARG_WITH([pcb-confdir],
70     AS_HELP_STRING([--with-pcb-confdir=DIR],
71       [directory where PCB site configuration files are installed [[SYSCONFDIR/pcb]]]),
72    [ if (test "X$with_pcb_confdir" != "Xno" &&
73           test "X$with_pcb_confdir" != "Xyes"); then
74         PCBCONFDIR="$with_pcb_m4dir"
75      fi ], [])
76   AC_MSG_RESULT([$PCBCONFDIR])
77   AC_SUBST([PCBCONFDIR])
78 ])dnl AX_PCB_DIRS