refdes_renum: warn of possible number clash with non-conforming values
[geda-gaf/whiteaudio.git] / m4 / pcb-data-dirs.m4
blobcaee1e0f593b11e01c6a6b527a0df9b4bf8d5447
1 # pcb-data-dirs.m4                                      -*-Autoconf-*-
2 # serial 2
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 Copyright (C) 2011  Peter Clifton <pcjc2@cam.ac.uk>
7 dnl
8 dnl This program is free software; you can redistribute it and/or modify
9 dnl it under the terms of the GNU General Public License as published by
10 dnl the Free Software Foundation; either version 2 of the License, or
11 dnl (at your option) any later version.
12 dnl
13 dnl This program is distributed in the hope that it will be useful,
14 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 dnl GNU General Public License for more details.
17 dnl
18 dnl You should have received a copy of the GNU General Public License
19 dnl along with this program; if not, write to the Free Software
20 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 # Check where to look for PCB footprints.
23 # FIXME All of this should be done at runtime.
24 AC_DEFUN([AX_PCB_DIRS],
26   AC_PREREQ([2.60])dnl
28   # Check what prefix to use for PCB footprint libraries
29   AC_MSG_CHECKING([where to look for PCB footprints])
30   PCBDATADIR="${datarootdir}/pcb"
31   AC_ARG_WITH([pcb-datadir],
32     AS_HELP_STRING([--with-pcb-datadir=DIR],
33       [search for PCB libraries in DIR [[DATAROOTDIR/pcb]]]),
34     [ if (test "X$with_pcb_datadir" != "Xno" &&
35           test "X$with_pcb_datadir" != "Xyes"); then
36         PCBDATADIR="$with_pcb_datadir"
37       fi ], [])
38   AC_MSG_RESULT([$PCBDATADIR])
39   AC_SUBST([PCBDATADIR])
41   # m4 libraries
42   AC_MSG_CHECKING([where to look for PCB m4 footprints])
43   PCBM4DIR="${PCBDATADIR}/m4"
44   AC_ARG_WITH([pcb-m4dir],
45     AS_HELP_STRING([--with-pcb-m4dir=DIR],
46       [search for PCB m4 libraries in DIR [[PCBDATADIR/m4]]]),
47     [ if (test "X$with_pcb_m4dir" != "Xno" &&
48           test "X$with_pcb_m4dir" != "Xyes"); then
49         PCBM4DIR="$with_pcb_m4dir"
50       fi ], [])
51   AC_MSG_RESULT([$PCBM4DIR])
52   AC_SUBST([PCBM4DIR])
54   # newlib search path
55   AC_MSG_CHECKING([search path for PCB newlib footprints])
56   PCBLIBPATH="${PCBDATADIR}/pcblib-newlib:$PCBDATADIR/newlib"
57   AC_ARG_WITH([pcb-lib-path],
58     AS_HELP_STRING([--with-pcb-lib-path=PATH],
59       [search path for PCB newlib footprint libraries]),
60     [ if (test "X$with_pcb_lib_path" != "Xno" &&
61           test "X$with_pcb_lib_path" != "Xyes"); then
62         PCBLIBPATH="$with_pcb_lib_path"
63       fi ], [])
64   AC_MSG_RESULT([$PCBLIBPATH])
65   AC_SUBST([PCBLIBPATH])
66 ])dnl AX_PCB_DIRS