Annotation of OpenXM_contrib/gnuplot/aclocal.m4, Revision 1.1.1.1
1.1 maekawa 1: dnl aclocal.m4 generated automatically by aclocal 1.3d
2:
3: dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4: dnl This file is free software; the Free Software Foundation
5: dnl gives unlimited permission to copy and/or distribute it,
6: dnl with or without modifications, as long as this notice is preserved.
7:
8: dnl This program is distributed in the hope that it will be useful,
9: dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10: dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11: dnl PARTICULAR PURPOSE.
12:
13: # Do all the work for Automake. This macro actually does too much --
14: # some checks are only needed if your package does certain things.
15: # But this isn't really a big deal.
16:
17: # serial 1
18:
19: dnl Usage:
20: dnl AM_INIT_AUTOMAKE(package,version, [no-define])
21:
22: AC_DEFUN(AM_INIT_AUTOMAKE,
23: [AC_REQUIRE([AC_PROG_INSTALL])
24: PACKAGE=[$1]
25: AC_SUBST(PACKAGE)
26: VERSION=[$2]
27: AC_SUBST(VERSION)
28: dnl test to see if srcdir already configured
29: if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
30: AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
31: fi
32: ifelse([$3],,
33: AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
34: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
35: AC_REQUIRE([AM_SANITY_CHECK])
36: AC_REQUIRE([AC_ARG_PROGRAM])
37: dnl FIXME This is truly gross.
38: missing_dir=`cd $ac_aux_dir && pwd`
39: AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
40: AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
41: AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
42: AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
43: AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
44: AC_REQUIRE([AC_PROG_MAKE_SET])])
45:
46: #
47: # Check to make sure that the build environment is sane.
48: #
49:
50: AC_DEFUN(AM_SANITY_CHECK,
51: [AC_MSG_CHECKING([whether build environment is sane])
52: # Just in case
53: sleep 1
54: echo timestamp > conftestfile
55: # Do `set' in a subshell so we don't clobber the current shell's
56: # arguments. Must try -L first in case configure is actually a
57: # symlink; some systems play weird games with the mod time of symlinks
58: # (eg FreeBSD returns the mod time of the symlink's containing
59: # directory).
60: if (
61: set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62: if test "[$]*" = "X"; then
63: # -L didn't work.
64: set X `ls -t $srcdir/configure conftestfile`
65: fi
66: if test "[$]*" != "X $srcdir/configure conftestfile" \
67: && test "[$]*" != "X conftestfile $srcdir/configure"; then
68:
69: # If neither matched, then we have a broken ls. This can happen
70: # if, for instance, CONFIG_SHELL is bash and it inherits a
71: # broken ls alias from the environment. This has actually
72: # happened. Such a system could not be considered "sane".
73: AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
74: alias in your environment])
75: fi
76:
77: test "[$]2" = conftestfile
78: )
79: then
80: # Ok.
81: :
82: else
83: AC_MSG_ERROR([newly created file is older than distributed files!
84: Check your system clock])
85: fi
86: rm -f conftest*
87: AC_MSG_RESULT(yes)])
88:
89: dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
90: dnl The program must properly implement --version.
91: AC_DEFUN(AM_MISSING_PROG,
92: [AC_MSG_CHECKING(for working $2)
93: # Run test in a subshell; some versions of sh will print an error if
94: # an executable is not found, even if stderr is redirected.
95: # Redirect stdin to placate older versions of autoconf. Sigh.
96: if ($2 --version) < /dev/null > /dev/null 2>&1; then
97: $1=$2
98: AC_MSG_RESULT(found)
99: else
100: $1="$3/missing $2"
101: AC_MSG_RESULT(missing)
102: fi
103: AC_SUBST($1)])
104:
105:
106: # serial 1
107:
108: AC_DEFUN(AM_C_PROTOTYPES,
109: [AC_REQUIRE([AM_PROG_CC_STDC])
110: AC_REQUIRE([AC_PROG_CPP])
111: AC_MSG_CHECKING([for function prototypes])
112: if test "$am_cv_prog_cc_stdc" != no; then
113: AC_MSG_RESULT(yes)
114: AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
115: U= ANSI2KNR=
116: else
117: AC_MSG_RESULT(no)
118: U=_ ANSI2KNR=./ansi2knr
119: # Ensure some checks needed by ansi2knr itself.
120: AC_HEADER_STDC
121: AC_CHECK_HEADERS(string.h)
122: fi
123: AC_SUBST(U)dnl
124: AC_SUBST(ANSI2KNR)dnl
125: ])
126:
127:
128: # serial 1
129:
130: # @defmac AC_PROG_CC_STDC
131: # @maindex PROG_CC_STDC
132: # @ovindex CC
133: # If the C compiler in not in ANSI C mode by default, try to add an option
134: # to output variable @code{CC} to make it so. This macro tries various
135: # options that select ANSI C on some system or another. It considers the
136: # compiler to be in ANSI C mode if it handles function prototypes correctly.
137: #
138: # If you use this macro, you should check after calling it whether the C
139: # compiler has been set to accept ANSI C; if not, the shell variable
140: # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
141: # code in ANSI C, you can make an un-ANSIfied copy of it by using the
142: # program @code{ansi2knr}, which comes with Ghostscript.
143: # @end defmac
144:
145: AC_DEFUN(AM_PROG_CC_STDC,
146: [AC_REQUIRE([AC_PROG_CC])
147: AC_BEFORE([$0], [AC_C_INLINE])
148: AC_BEFORE([$0], [AC_C_CONST])
149: dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
150: dnl a magic option to avoid problems with ANSI preprocessor commands
151: dnl like #elif.
152: dnl FIXME: can't do this because then AC_AIX won't work due to a
153: dnl circular dependency.
154: dnl AC_BEFORE([$0], [AC_PROG_CPP])
155: AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
156: AC_CACHE_VAL(am_cv_prog_cc_stdc,
157: [am_cv_prog_cc_stdc=no
158: ac_save_CC="$CC"
159: # Don't try gcc -ansi; that turns off useful extensions and
160: # breaks some systems' header files.
161: # AIX -qlanglvl=ansi
162: # Ultrix and OSF/1 -std1
163: # HP-UX -Aa -D_HPUX_SOURCE
164: # SVR4 -Xc -D__EXTENSIONS__
165: for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
166: do
167: CC="$ac_save_CC $ac_arg"
168: AC_TRY_COMPILE(
169: [#include <stdarg.h>
170: #include <stdio.h>
171: #include <sys/types.h>
172: #include <sys/stat.h>
173: /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
174: struct buf { int x; };
175: FILE * (*rcsopen) (struct buf *, struct stat *, int);
176: static char *e (p, i)
177: char **p;
178: int i;
179: {
180: return p[i];
181: }
182: static char *f (char * (*g) (char **, int), char **p, ...)
183: {
184: char *s;
185: va_list v;
186: va_start (v,p);
187: s = g (p, va_arg (v,int));
188: va_end (v);
189: return s;
190: }
191: int test (int i, double x);
192: struct s1 {int (*f) (int a);};
193: struct s2 {int (*f) (double a);};
194: int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
195: int argc;
196: char **argv;
197: ], [
198: return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
199: ],
200: [am_cv_prog_cc_stdc="$ac_arg"; break])
201: done
202: CC="$ac_save_CC"
203: ])
204: if test -z "$am_cv_prog_cc_stdc"; then
205: AC_MSG_RESULT([none needed])
206: else
207: AC_MSG_RESULT($am_cv_prog_cc_stdc)
208: fi
209: case "x$am_cv_prog_cc_stdc" in
210: x|xno) ;;
211: *) CC="$CC $am_cv_prog_cc_stdc" ;;
212: esac
213: ])
214:
215:
216: # serial 1
217:
218: AC_DEFUN(gp_MSDOS,
219: [AC_MSG_CHECKING(for MS-DOS/djgpp/libGRX)
220: AC_EGREP_CPP(yes,
221: [#if __DJGPP__ && __DJGPP__ == 2
222: yes
223: #endif
224: ], AC_MSG_RESULT(yes)
225: LIBS="-lpc $LIBS"
226: AC_DEFINE(MSDOS)
227: AC_DEFINE(DOS32)
228: with_linux_vga=no
229: AC_CHECK_LIB(grx20,GrLine,dnl
230: LIBS="-lgrx20 $LIBS"
231: CFLAGS="$CFLAGS -fno-inline-functions"
232: AC_DEFINE(DJSVGA)
233: AC_CHECK_LIB(grx20,GrCustomLine,AC_DEFINE(GRX21))),dnl
234: AC_MSG_RESULT(no)
235: )dnl
236: ])
237:
238:
239:
240: # serial 1
241:
242: AC_DEFUN(gp_NEXT,
243: [AC_MSG_CHECKING(for NeXT)
244: AC_EGREP_CPP(yes,
245: [#if __NeXT__
246: yes
247: #endif
248: ], AC_MSG_RESULT(yes)
249: LIBS="$LIBS -lsys_s -lNeXT_s"
250: NEXTOBJS=epsviewe.o
251: CFLAGS="$CFLAGS -ObjC",dnl
252: NEXTOBJS=
253: AC_MSG_RESULT(no))
254: ])
255:
256:
257:
258: # serial 1
259:
260: AC_DEFUN(gp_CHECK_LIB_QUIET,
261: [ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
262: ac_save_LIBS="$LIBS"
263: LIBS="$TERMLIBS $TERMXLIBS -l$1 $5 $LIBS"
264: AC_TRY_LINK(dnl
265: ifelse([$2], [main], , dnl Avoid conflicting decl of main.
266: [/* Override any gcc2 internal prototype to avoid an error. */
267: ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
268: extern "C"
269: #endif
270: ])dnl
271: [/* We use char because int might match the return type of a gcc2
272: builtin and then its argument prototype would still apply. */
273: char $2();
274: ]),
275: [$2()],
276: eval "ac_cv_lib_$ac_lib_var=yes",
277: eval "ac_cv_lib_$ac_lib_var=no")
278: LIBS="$ac_save_LIBS"
279: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
280: ifelse([$3], ,
281: [changequote(, )dnl
282: ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
283: -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
284: changequote([, ])dnl
285: LIBS="$LIBS -l$1"
286: ], [$3])
287: else
288: ifelse([$4], , , [$4
289: ])dnl
290: fi
291: ])
292:
293:
294: # serial 1
295:
296: dnl gp_SEARCH_LIBDIRS(LIBRARY, FUNCTION [, OTHER-LIBRARIES])
297: AC_DEFUN(gp_SEARCH_LIBDIRS,
298: [AC_MSG_CHECKING([for $2 in -l$1])
299: gp_save_TERMLIBS="$TERMLIBS"
300: changequote(, )dnl
301: gp_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
302: -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
303: changequote([, ])dnl
304: dnl The "no" case is just a safety net
305: case "$with_$1" in
306: yes|no)
307: gp_lib_list="";;
308: *)
309: gp_lib_path=`echo $with_$1 | sed -e 's%/lib$1\.a$%%'`
310: gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'`
311: gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path"
312: esac
313: for ac_dir in '' /usr/local/lib $gp_lib_list ; do
314: TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS"
315: gp_CHECK_LIB_QUIET($1,$2,dnl
316: TERMLIBS="$TERMLIBS -l$1"; break, dnl ACTION-IF-FOUND
317: TERMLIBS="$gp_save_TERMLIBS", dnl ACTION-IF-NOT-FOUND
318: $3) dnl OTHER-LIBRARIES
319: done
320: if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
321: AC_MSG_RESULT(yes)
322: else
323: AC_MSG_RESULT(no)
324: fi
325: ])
326:
327:
328:
329: # serial 1
330:
331: dnl gp_SEARCH_HEADERDIRS(HEADER-FILE [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
332: AC_DEFUN(gp_SEARCH_HEADERDIRS,
333: [AC_REQUIRE([gp_SEARCH_LIBDIRS])
334: AC_MSG_CHECKING([for $1])
335: ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
336: gp_save_CPPFLAGS="$CPPFLAGS"
337: for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do
338: CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`"
339: AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
340: eval "ac_cv_header_$ac_safe=no")
341: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
342: break
343: else
344: CPPFLAGS="${ac_save_CPPFLAGS}"
345: fi
346: done
347: if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
348: AC_MSG_RESULT(yes)
349: ifelse([$2], , :, [$2])
350: else
351: AC_MSG_RESULT(no)
352: ifelse([$3], , , [$3
353: ])dnl
354: fi
355: ])
356:
357:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>