1
dnl $Id: configure.ac,v 1.23.2.1 2005/01/27 11:26:38 danmc Exp $
2
dnl Process this file with autoconf to produce a configure script.
5
AM_INIT_AUTOMAKE(pcb, 20050127)
6
AM_CONFIG_HEADER(config.h)
10
dnl Checks for programs.
16
AC_CHECK_PROGS(M4, gm4 m4)
18
AC_PATH_PROGS(WISH, wish wish83 wish8.3 wish80 wish8.0 cygwish83 cygwish80,[none])
19
if test "X$WISH" = "Xnone" ; then
20
AC_ERROR([Did not find the wish executible. You need to make sure
21
that tcl is installed on your system and that wish is in your path])
24
AC_DEFINE_UNQUOTED(M4,$M4,[m4 executible])
27
AC_DEFINE_UNQUOTED(GNUM4,"$M4",[m4 program used by pcb])
28
AC_CHECK_PROGS(LATEX, latex)
29
AC_CHECK_PROGS(DVIPS, dvips)
30
AC_CHECK_PROGS(TGIF, tgif, true)
31
AC_CHECK_PROGS(PS2PDF, ps2pdf)
33
dnl Checks for libraries.
35
AC_CHECK_LIB(xnet, gethostbyname)
36
AC_CHECK_LIB(fl, yywrap)
37
AC_CHECK_FUNCS(strerror)
38
AC_CHECK_FUNCS(regcomp re_comp)
39
AC_CHECK_FUNCS(logf expf rint)
41
AC_ARG_WITH([libstroke],
42
[ --without-libstroke disable libstroke support (default: enabled)],
43
AC_CHECK_LIB(stroke, main, , AC_ERROR([libstroke not found. Please specify its location or configure --without-libstroke]))
45
AC_CHECK_LIB(X11, XOpenDisplay, , , $X_LIBS)
46
AC_CHECK_LIB(ICE, main, , , $X_LIBS)
47
AC_CHECK_LIB(SM, main, , , $X_LIBS)
48
AC_CHECK_LIB(Xext, main, , , $X_LIBS)
49
AC_CHECK_LIB(Xt, XtOpenDisplay, , , $X_LIBS)
50
AC_CHECK_LIB(Xmu, main, , , $X_LIBS)
51
AC_CHECK_LIB(Xpm, main, , , $X_LIBS)
54
[ --with-xaw=Xaw Use the specified Athena Widgets type.
55
For example, Xaw, or Xaw3d.
58
if test "X$with_xaw" = "Xno" ; then
59
AC_ERROR([--without-xaw is not allowed])
66
AC_CHECK_LIB($with_xaw, XawInitializeWidgetSet, ,
67
AC_ERROR([You must have some version of Xaw installed on your system]), $X_LIBS)
71
dnl Determine the Xfuncproto control definitions:
72
FC_CHECK_X_PROTO_DEFINE(FUNCPROTO)
73
if test -n "$fc_x_proto_value"; then
74
AC_DEFINE_UNQUOTED(FUNCPROTO, $fc_x_proto_value, [FUNCPROTO used by Xaw])
76
FC_CHECK_X_PROTO_DEFINE(NARROWPROTO)
77
if test -n "$fc_x_proto_value"; then
78
AC_DEFINE_UNQUOTED(NARROWPROTO, $fc_x_proto_value, [NARROWPROTO used by Xaw])
82
AC_MSG_CHECKING([if hardcoding of the X11 runtime library path is desired])
83
AC_ARG_ENABLE([rpath],
84
[ --disable-rpath Disable hardcoding the X11 runtime library path [default=enabled]],
86
if test "X$enable_rpath" = "Xno" ; then
99
if test "X$_use_rpath" = "Xyes" ; then
100
dnl Try to figure out if we need -Rpath for finding X11 libs
101
dnl at runtime. Why autoconf doesn't already do this, I don't
104
for p in $X_LIBS ; do
107
xlib_path="$xlib_path $p"
112
xlib_rpath=`echo $xlib_path | sed 's/-L/-R/g'`
117
for fl in "-Wl,-rpath " "-Wl,--rpath " "-rpath " "--rpath " "-Wl,-R" "-R" "-R " ; do
118
xlib_rpath=`echo $xlib_path | sed "s/-L/$fl/g"`
119
LIBS="$pcb_save_LIBS $X_LIBS $xlib_rpath"
120
AC_MSG_CHECKING([if the compiler accepts ${fl}path for runtime libraries])
121
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
125
test -n "$rpath" && break
127
if test -n "$rpath"; then
128
X_LIBS="$X_LIBS $xlib_rpath"
133
dnl Checks for header files.
135
AC_CHECK_HEADERS(string.h)
136
AC_CHECK_HEADERS(regex.h)
138
dnl Checks for typedefs, structures, and compiler characteristics.
140
dnl Checks for data types
142
dnl Checks for library functions.
144
# ------------- dmalloc -------------------
146
AC_MSG_CHECKING([if dmalloc debugging should be enabled])
147
AC_ARG_ENABLE([dmalloc],
148
[ --enable-dmalloc Compile and link with dmalloc for malloc debugging [default=no]],
150
if test "X$enable_dmalloc" != "Xno" ; then
152
AC_CHECK_HEADER(dmalloc.h,,
153
AC_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found]))
154
AC_CHECK_LIB(dmalloc,main,,
155
AC_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found]), $X_LIBS)
156
DMALLOC_LIBS="-ldmalloc"
167
# ------------- ElectricFence -------------------
168
dnl ElectricFence checks
169
AC_MSG_CHECKING([if ElectricFence debugging should be enabled])
170
AC_ARG_ENABLE([efence],
171
[ --enable-efence Link with ElectricFence for malloc debugging [default=no]],
173
if test "X$enable_efence" != "Xno" ; then
175
AC_CHECK_LIB(efence,main,,
176
AC_ERROR([You have requested ElectricFence debugging but -lefence could not be found]), $X_LIBS)
186
#if [ test "x$prefix" = xNONE ]; then
187
# datadir=$ac_default_prefix/share
189
# datadir=$prefix/share
193
FONTFILENAME=${FONTFILENAME:-"default_font"}
194
AC_SUBST(FONTFILENAME)
195
AC_DEFINE_UNQUOTED(FONTFILENAME,"$FONTFILENAME",[File for default font])
197
# directory for old-style library and for fonts
198
PCBLIBDIR=${datadir}/pcb
200
#AC_DEFINE_UNQUOTED(PCBLIBDIR,"$PCBLIBDIR",[Library directory])
201
CPPFLAGS="$CPPFLAGS -DPCBLIBDIR=\\\"$PCBLIBDIR\\\""
203
# name for old-style library
204
LIBRARYFILENAME=pcblib
205
AC_SUBST(LIBRARYFILENAME)
206
AC_DEFINE_UNQUOTED(LIBRARYFILENAME,"$LIBRARYFILENAME",[library file name])
209
# directory for new library
210
PCBTREEDIR=${datadir}/pcb/newlib
211
PCBTREEDIR=${PCBTREEDIR:-"$PCBTREEDIR"}
213
#AC_DEFINE_UNQUOTED(PCBTREEDIR,"$PCBLIB",[top directory for new style pcb library])
214
CPPFLAGS="$CPPFLAGS -DPCBTREEDIR=\\\"$PCBTREEDIR\\\""
216
# if we have gcc then add -Wall
217
if test "x$GCC" = "xyes"; then
218
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
219
CFLAGS="$CFLAGS -Wall"
223
CFLAGS="$CFLAGS $X_CFLAGS"
224
LIBS="$LIBS $X_LIBS $DMALLOC_LIBS"
226
BTNMOD=${BTNMOD:-"Mod1"}
231
README_FILES/Makefile
234
example/libraries/Makefile
235
lib/CreateLibraryContents.sh
240
newlib/2_pin_thru-hole_packages/Makefile
242
newlib/analog-devices/Makefile
243
newlib/burr-brown/Makefile
244
newlib/connectors/Makefile
245
newlib/crystal/Makefile
246
newlib/cypress/Makefile
247
newlib/electro-optics/Makefile
248
newlib/generic_SMD_packages/Makefile
249
newlib/headers/Makefile
250
newlib/msp430/Makefile
251
newlib/not_vetted_ingo/Makefile
252
newlib/sockets/Makefile
253
newlib/tests/Makefile