1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 07_configure_in.dpatch by <Floris Bruynooghe <fb102@soton.ac.uk>>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Update configure.in.
8
diff -urNad plotutils-2.4.1/configure.in /tmp/dpep.73LAfS/plotutils-2.4.1/configure.in
9
--- plotutils-2.4.1/configure.in 2005-05-09 20:53:19.259115574 +0100
10
+++ /tmp/dpep.73LAfS/plotutils-2.4.1/configure.in 2005-05-09 20:53:32.092786951 +0100
12
dnl Copyright (C) 1989-2000 Free Software Foundation, Inc.
13
dnl Process this file with autoconf to produce a configure script.
15
-AC_INIT(graph/graph.c)
16
-AM_INIT_AUTOMAKE(plotutils, 2.4.1)
17
-AM_CONFIG_HEADER(config.h)
18
+AC_INIT([plotutils], [2.4.1])
19
+AC_CONFIG_SRCDIR([graph/graph.c])
20
+AM_INIT_AUTOMAKE([no-define])
21
+AC_CONFIG_HEADERS([config.h])
24
dnl Did installer set the CFLAGS and CXXFLAGS environ variables before
25
dnl running configure? Our default CFLAGS and CXXFLAGS differ from
28
dnl Compiler characteristics and typedefs.
29
AC_MSG_CHECKING(for void)
30
-AC_TRY_COMPILE(, [void *foo = 0;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)])
31
+AC_TRY_COMPILE(, [void *foo = 0;], [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID, 1, [Define to signal compiler support for void and void * types.])], [AC_MSG_RESULT(no)])
39
-[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)], [AC_MSG_RESULT(no); AC_DEFINE(DONT_HAVE_NULL_FLUSH)], [AC_MSG_RESULT(no); AC_DEFINE(DONT_HAVE_NULL_FLUSH)])
40
+[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH, 1, [Define to signal that fflush(NULL) works: it flushes all outstreams.])], [AC_MSG_RESULT(no); AC_DEFINE(DONT_HAVE_NULL_FLUSH, 1, [Redundant and unused: Define to signal that fflush(NULL) doesn't work.])], [AC_MSG_RESULT(no); AC_DEFINE(DONT_HAVE_NULL_FLUSH, 1, [Redundant and unused: Define to signal that fflush(NULL) doesn't work.])])
42
dnl Checks for header files: ANSI C, POSIX, and nonstandard Unix headers.
44
-AC_CHECK_HEADERS(string.h limits.h float.h)
45
-AC_CHECK_HEADERS(malloc.h pthread.h strings.h unistd.h values.h sys/select.h sys/stdtypes.h sys/time.h sys/types.h sys/wait.h)
47
+AC_CHECK_HEADERS([string.h limits.h float.h malloc.h pthread.h \
48
+ strings.h unistd.h values.h sys/select.h \
49
+ sys/stdtypes.h sys/time.h sys/types.h sys/wait.h])
52
dnl HP/UX needs a cpp definition for math.h to define matherr-related things
53
-AC_EGREP_HEADER(_HPUX_SOURCE, math.h, AC_EGREP_HEADER(matherr, math.h, AC_DEFINE(_HPUX_SOURCE)))
54
+AC_EGREP_HEADER(_HPUX_SOURCE, math.h, AC_EGREP_HEADER(matherr, math.h, AC_DEFINE(_HPUX_SOURCE, 1, [Define under HP/UX to get matherr-related things from math.h.])))
59
dnl that executables may be linked with a library that uses mutexes without
60
dnl also linking with -lpthread. (This is the case with glibc under
62
-AC_CHECK_LIB(c, pthread_mutex_init, AC_DEFINE(PTHREAD_SUPPORT))
63
+AH_TEMPLATE(PTHREAD_SUPPORT)
64
+AC_CHECK_LIB(c, pthread_mutex_init, [AC_DEFINE(PTHREAD_SUPPORT, 1, [Define to signal support in libc for the pthread threads library.])])
66
dnl Do we have the thread-safe library functions ctime_r(), localtime_r()?
67
AC_CHECK_FUNCS(ctime_r localtime_r)
69
dnl Other non-X library functions and auxiliary libraries.
71
dnl SGI's have matherr in libmx.a, not libm.a
72
-AC_CHECK_LIB(mx, matherr, LIBS="$LIBS -lmx", LIBS="$LIBS -lm")
73
+AC_SEARCH_LIBS(matherr, [mx m])
74
AC_CHECK_FUNCS(memcpy memmove strchr strcasecmp strerror matherr j0 erf)
76
dnl lgamma() and gamma() both compute the log of the gamma function. There
77
dnl are old systems out there which do not have lgamma (the name was
78
dnl introduced after BSD 4.2), but which do have gamma. Also some systems,
80
dnl pthread support in libc, but no thread support in libXt/libX11.
81
our_saved_LDFLAGS="$LDFLAGS"
82
LDFLAGS="$X_LIBS $LDFLAGS"
83
-AC_CHECK_LIB(Xt, XtToolkitThreadInitialize, AC_DEFINE(X_THREAD_SUPPORT), , $X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS)
84
+AC_CHECK_LIB(Xt, XtToolkitThreadInitialize, [AC_DEFINE(X_THREAD_SUPPORT, 1, [Define to signal support in libXt/libX11 for multithreading.])], , [$X_PRE_LIBS $X_BASIC_LIBS $X_EXTRA_LIBS])
85
LDFLAGS="$our_saved_LDFLAGS"
87
dnl Check in -lXext for double buffering extensions to X11, and check
89
dnl but not the other.)
90
our_saved_LDFLAGS="$LDFLAGS"
91
LDFLAGS="$X_LIBS $LDFLAGS"
92
-AC_CHECK_LIB(Xext, XdbeQueryExtension, AC_DEFINE(HAVE_DBE_SUPPORT), , -lX11 "$X_EXTRA_LIBS")
93
-AC_CHECK_LIB(Xext, XmbufQueryExtension, AC_DEFINE(HAVE_MBX_SUPPORT), , -lX11 "$X_EXTRA_LIBS")
94
+AC_CHECK_LIB(Xext, XdbeQueryExtension, [AC_DEFINE(HAVE_DBE_SUPPORT, 1, [Define to signal support in -lXext for the DBE X11 protocol extension.])], , [-lX11 "$X_EXTRA_LIBS"])
95
+AC_CHECK_LIB(Xext, XmbufQueryExtension, AC_DEFINE(HAVE_MBX_SUPPORT, 1, [Define to signal support in -lXext for the MBX X11 protocol extension.]), , -lX11 "$X_EXTRA_LIBS")
96
LDFLAGS="$our_saved_LDFLAGS"
98
our_saved_CPPFLAGS="$CPPFLAGS"
99
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
100
-AC_CHECK_HEADERS(X11/extensions/Xdbe.h X11/extensions/multibuf.h)
101
+AC_CHECK_HEADERS([X11/extensions/Xdbe.h X11/extensions/multibuf.h],
102
+ [], [], [#include <X11/Xlib.h>])
103
CPPFLAGS="$our_saved_CPPFLAGS"
105
dnl Allow installer to specify location of Athena widgets (i.e. location of
107
dnl option to the head of X_LIBS and an `-I DIR/include' option to the head
110
-AC_ARG_WITH(athena, [ --with-athena[=DIR] use Athena widgets: includes and libraries in DIR])
112
+ AC_HELP_STRING([--with-athena[[=DIR]]],
113
+ [use Athena widgets: includes and libraries in DIR]))
115
dnl If --with-motif is specified, then `-lXm' will be added to the head of
116
dnl X_TOOLKIT_LIBS, instead of `-lXaw -lXmu', and --with-athena will be
118
dnl will be added to the head of X_LIBS and an `-I DIR/include' option to
119
dnl the head of C_FLAGS.
121
-AC_ARG_WITH(motif, [ --with-motif[=DIR] use Motif widgets: includes and libraries in DIR])
123
+ AC_HELP_STRING([--with-motif[[=DIR]]],
124
+ [use Motif widgets: includes and libraries in DIR]))
126
dnl If --with-motif is specified, we always check for the Xpm image
127
dnl library, and if we find it, then we place it at the beginning of
129
dnl for Xpm. If DIR is specified as an argument to --with-xpm, DIR/include
130
dnl should contain xpm.h, and DIR/lib should contain the library libxpm.
132
-AC_ARG_WITH(xpm, [ --with-xpm[=DIR] use Xpm with Motif: include and library in DIR])
134
+ AC_HELP_STRING([--with-xpm[[=DIR]]],
135
+ [use Xpm with Motif: include and library in DIR]))
137
dnl NOTE: Motif 2.x also seems to require the extension library -lXp for
138
dnl printing, so if --with-motif is specified we always check for libXp.
139
@@ -213,27 +226,27 @@
140
our_saved_LDFLAGS="$LDFLAGS"
141
LDFLAGS="$LDFLAGS $X_LIBS"
144
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
147
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
149
+ AC_CHECK_LIB(Xpm, XpmReadFileToPixmap,
150
+ [X_BASIC_LIBS="-lXpm $X_BASIC_LIBS"], [],
155
LDFLAGS="$LDFLAGS -L$with_xpm/lib"
156
- AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, X_CFLAGS="$X_CFLAGS -I$with_xpm/include"; X_LIBS="$X_LIBS -L$with_xpm/lib"; X_BASIC_LIBS="-lXpm $X_BASIC_LIBS", , -lXext -lX11)
157
+ AC_CHECK_LIB(Xpm, XpmReadFileToPixmap,
158
+ [X_CFLAGS="$X_CFLAGS -I$with_xpm/include"; X_LIBS="$X_LIBS -L$with_xpm/lib"; X_BASIC_LIBS="-lXpm $X_BASIC_LIBS"], [],
162
- LDFLAGS="$our_saved_LDFLAGS"
164
- our_saved_LDFLAGS="$LDFLAGS"
165
- LDFLAGS="$LDFLAGS $X_LIBS"
166
- AC_CHECK_LIB(Xp, XpQueryExtension, X_BASIC_LIBS="-lXp $X_BASIC_LIBS", , -lXext -lX11)
167
- AC_CHECK_LIB(gen, regex, LIBS="$LIBS -lc -lgen", LIBS="$LIBS")
168
- AC_CHECK_LIB(PW, regex, LIBS="$LIBS -lc -lPW", LIBS="$LIBS")
169
+ AC_CHECK_LIB(Xp, XpQueryExtension,
170
+ [X_BASIC_LIBS="-lXp $X_BASIC_LIBS"], [],
172
+ AC_SEARCH_LIBS(regex, [gen PW])
173
LDFLAGS="$our_saved_LDFLAGS"
175
- AC_DEFINE(USE_MOTIF)
176
+ AC_DEFINE(USE_MOTIF, 1, [Define to signal that Motif should be used, if X11 is used.])
180
@@ -253,50 +266,70 @@
181
dnl ALSO NOTE: the test for libpng automatically checks for zlib, since it
182
dnl supplies the `-lz' argument to the linker.
184
-AC_CHECK_HEADERS(png.h, png_support="yes", png_support="no")
185
-AC_CHECK_LIB(png, png_set_tRNS, AC_DEFINE(HAVE_LIBPNG), png_support="no", -lz -lm)
186
-AC_ARG_WITH(libpng, [ --without-libpng omit PNG support even if libpng and zlib are present], if test "x${with_libpng}" = "xno"; then png_support="no"; fi)
187
-if test "x${png_support}" = "xyes"; then AC_DEFINE(INCLUDE_PNG_SUPPORT) fi
188
-AM_CONDITIONAL(NO_PNG, test "x${png_support}" = "xno")
190
+ AC_HELP_STRING([--without-libpng],
191
+ [omit PNG support even if libpng and zlib are present]))
193
+if test "${with_libpng:=yes}" = yes; then
194
+ AC_CHECK_HEADERS(png.h,
195
+ [AC_CHECK_LIB(png, png_set_tRNS,
196
+ [], [png_support="no"], [-lz -lm])],
197
+ [png_support="no"])
199
+if test "${png_support:=yes}" = "yes"; then
200
+ AC_DEFINE(INCLUDE_PNG_SUPPORT, 1, [Define to request PNG support (requires both HAVE_PNG_H and HAVE_LIBPNG).])
202
+AM_CONDITIONAL(NO_PNG, test "${png_support}" = no)
204
dnl Font options. The ps_fonts_in_pcl variable is used by test/plot2hpgl.test.
205
+AH_TEMPLATE(USE_PS_FONTS_IN_PCL)
206
AC_ARG_ENABLE(ps-fonts-in-pcl,
207
-[ --enable-ps-fonts-in-pcl enable use of PS fonts in PCL and HP-GL/2 output],
208
-[if test "x$enableval" = "xyes"; then
209
- echo enabling support for the 35 PS fonts in PCL 5 and HP-GL/2 output
210
+ AC_HELP_STRING([--enable-ps-fonts-in-pcl],
211
+ [enable use of PS fonts in PCL and HP-GL/2 output]),
214
- AC_DEFINE(USE_PS_FONTS_IN_PCL)
219
+ AC_DEFINE(USE_PS_FONTS_IN_PCL, 1, [Whether to use PS fonts in pcl output])
221
+ [ps_fonts_in_pcl=0])
222
AC_SUBST(ps_fonts_in_pcl)
224
+AH_TEMPLATE(USE_LJ_FONTS_IN_PS)
225
AC_ARG_ENABLE(lj-fonts-in-ps,
226
-[ --enable-lj-fonts-in-ps enable use of LaserJet fonts in PS output],
227
-[if test "x$enableval" = "xyes"; then
228
- echo enabling support for the 45 LaserJet fonts in PS output
229
- AC_DEFINE(USE_LJ_FONTS_IN_PS)
231
+ AC_HELP_STRING([--enable-lj-fonts-in-ps],
232
+ [enable use of LaserJet fonts in PS output]),
233
+ [AC_DEFINE(USE_LJ_FONTS_IN_PS, 1, [Whether to use LaserJet fonts in PS output])])
235
+AH_TEMPLATE(USE_LJ_FONTS_IN_X)
236
AC_ARG_ENABLE(lj-fonts-in-x,
237
-[ --enable-lj-fonts-in-x enable use of LaserJet fonts on X displays],
238
-[if test "x$enableval" = "xyes"; then
239
- echo enabling support for the 45 LaserJet fonts on X displays
240
- AC_DEFINE(USE_LJ_FONTS_IN_X)
242
+ AC_HELP_STRING([--enable-lj-fonts-in-x],
243
+ [enable use of LaserJet fonts on X displays]),
244
+ [AC_DEFINE(USE_LJ_FONTS_IN_X, 1, [Wheterh to use LaserJet fonts in X output])])
246
dnl Do we build libplotter, the C++ library, and other C++ software?
248
-AC_ARG_ENABLE(libplotter, [ --enable-libplotter build the C++ Plotter class library and C++ software], echo enabling construction of the C++ class library; [AC_PROG_CXX] no_libplotter="no"; AC_MSG_CHECKING(whether ${CXX-g++} supports bool); [AC_LANG_CPLUSPLUS] AC_TRY_COMPILE(, [bool foo = true;], AC_MSG_RESULT(yes); AC_DEFINE(HAVE_BOOL), AC_MSG_RESULT(no)), no_libplotter="yes"; extralib="")
250
-AM_CONDITIONAL(NO_LIBPLOTTER, test "x$no_libplotter" = "xyes")
251
+AC_ARG_ENABLE(libplotter,
252
+ AC_HELP_STRING([--enable-libplotter],
253
+ [build the C++ Plotter class library and C++ software]))
257
+AC_MSG_CHECKING(whether ${CXX-g++} supports bool)
258
+AH_TEMPLATE(HAVE_BOOL)
259
+AC_TRY_COMPILE(, [bool foo = true;],
262
+ AC_DEFINE(HAVE_BOOL, 1, [Define (if compiling as C++) to signal compiler support for bool type.])
266
+AM_CONDITIONAL(ENABLE_LIBPLOTTER, [test "${enable_libplotter+set}" = set])
268
dnl Do we build and install a standalone version of the libxmi
269
dnl scan-conversion library? (Not done by default because it's separately
271
-AC_ARG_ENABLE(libxmi, [ --enable-libxmi build the libxmi scan-conversion library], echo enabling construction of the libxmi scan-conversion library; no_libxmi="no", no_libxmi="yes")
272
-AM_CONDITIONAL(NO_LIBXMI, test "x$no_libxmi" = "xyes")
273
+AC_ARG_ENABLE(libxmi,
274
+ AC_HELP_STRING([--enable-libxmi],
275
+ [build the libxmi scan-conversion library]))
276
+AM_CONDITIONAL(ENABLE_LIBXMI, [test "${enable_libxmi+set}" = set])
278
dnl Override default autoconf value "-g -O2" or "-g" for CFLAGS and
279
dnl CXXFLAGS, set by AC_PROG_CC and AC_PROG_CXX. Provided, that is,
280
@@ -313,43 +346,28 @@
281
dnl variable CFLAGS to "-O -belf" or "-O2 -belf".
283
if test "x$CFLAGS_NOT_SET_BY_INSTALLER" = "xyes"; then
284
-if test "x$GCC" = "xyes"; then
289
+ if test "x$GCC" = "xyes"; then
296
if test "x$CXXFLAGS_NOT_SET_BY_INSTALLER" = "xyes"; then
297
-if test "x$GXX" = "xyes"; then
304
-dnl Check for gcc strength-reduce bug (taken from WINE config). Could do
305
-dnl the same for g++, but we'll assume anyone doing any C++ compiling has
306
-dnl installed a modern compiler.
307
-if test "x${GCC}" = "xyes"; then
308
- AC_CACHE_CHECK("for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
312
- static int Array[[3]];
313
- unsigned int B = 3;
315
- for (i=0; i < B; i++)
316
- Array[[i]] = i - 3;
317
- exit (Array[[1]] != -2);
319
- ac_cv_c_gcc_strength_bug="no",
320
- ac_cv_c_gcc_strength_bug="yes",
321
- ac_cv_c_gcc_strength_bug="yes") )
322
- if test "$ac_cv_c_gcc_strength_bug" = "yes"
324
- CFLAGS="$CFLAGS -fno-strength-reduce"
325
+ if test "x$GXX" = "xyes"; then
332
-AC_OUTPUT(Makefile double/Makefile graph/Makefile pic2plot/Makefile pic2plot/doc/Makefile pic2plot/libgroff/Makefile pic2plot/include/Makefile info/Makefile lib/Makefile libplot/Makefile libplotter/Makefile libxmi/Makefile libxmi/info/Makefile plot/Makefile tek2plot/Makefile tek2plot/teksamples/Makefile plotfont/Makefile spline/Makefile ode/Makefile ode-examples/Makefile include/Makefile doc/Makefile fonts/Makefile fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile test/Makefile)
333
+AC_OUTPUT([Makefile double/Makefile graph/Makefile pic2plot/Makefile
334
+ pic2plot/doc/Makefile pic2plot/libgroff/Makefile
335
+ pic2plot/include/Makefile info/Makefile lib/Makefile
336
+ libplot/Makefile libplotter/Makefile libxmi/Makefile
337
+ libxmi/info/Makefile plot/Makefile tek2plot/Makefile
338
+ tek2plot/teksamples/Makefile plotfont/Makefile
339
+ spline/Makefile ode/Makefile ode-examples/Makefile
340
+ include/Makefile doc/Makefile fonts/Makefile
341
+ fonts/bdf/Makefile fonts/pcf/Makefile fonts/pfb/Makefile