version 1.1.1.2, 2000/01/22 14:15:50 |
version 1.1.1.3, 2003/09/15 07:09:22 |
|
|
dnl $Id$ |
dnl $Id$ |
dnl |
dnl |
AC_INIT(graphics.c) |
AC_INIT(graphics.c) |
|
AM_CONFIG_HEADER(config.h:config.hin) |
AC_PREREQ(2.13) |
AC_PREREQ(2.13) |
AC_REVISION($Revision$) |
|
VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` |
VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` |
PL=`sed -n 's/.*patchlevel.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` |
PL=`sed -n 's/.*patchlevel.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` |
AM_INIT_AUTOMAKE(gnuplot, $VERSION.$PL) |
AM_INIT_AUTOMAKE(gnuplot, $VERSION.$PL) |
AC_CONFIG_HEADER(config.h:config.hin) |
|
|
|
dnl Optional features. |
|
|
|
dnl Use builtin readline or GNU readline |
|
AC_ARG_WITH(readline,dnl |
|
[ --with-readline use the builtin minimal readline function (default) |
|
--without-readline do not use the builtin readline function |
|
--with-readline=gnu use the GNU readline library |
|
--with-readline=PATH Specify the location of GNU readline],, |
|
test -z "$with_readline" && with_readline=yes |
|
)dnl |
|
|
|
dnl If no PATH argument given, use the Unix plot library |
|
dnl Else use either GNU libplot from plotutils, |
|
dnl or ancient GNU graphics libplot |
|
AC_ARG_WITH(plot,dnl |
|
[ --with-plot use the Unix plot library |
|
--with-plot=PATH Specify the location of GNU libplot],, |
|
test -z "$with_plot" && with_plot=no |
|
)dnl |
|
|
|
dnl The gif terminal with Tom Boutell's gd library |
|
AC_ARG_WITH(gd,dnl |
|
[ --with-gd enable gif terminal with Tom Boutell's gd library |
|
(requires GD library) |
|
--with-gd=PATH Specify the location of libgd],, |
|
test -z "$with_gd" && with_gd=yes |
|
)dnl |
|
|
|
dnl The Portable Network Graphics (png) terminal |
|
AC_ARG_WITH(png,dnl |
|
[ --with-png enable png terminal |
|
(requires libpng and libz) |
|
--with-png=PATH Specify the location of libpng],, |
|
test -z "$with_png" && with_png=yes |
|
)dnl |
|
|
|
dnl Use .gnuplot file in current directory |
|
AC_ARG_WITH(cwdrc,dnl |
|
[ --with-cwdrc check current directory for .gnuplot file, |
|
normally disabled for security reasons],, |
|
test -z "$with_cwdrc" && with_cwdrc=no |
|
)dnl |
|
|
|
dnl Install the lasergnu printer script |
|
AC_ARG_WITH(lasergnu,dnl |
|
[ --with-lasergnu install lasergnu printer script], |
|
if test "$withval" = yes; then LASERGNU=lasergnu_install; \ |
|
else LASERGNU=lasergnu_noinstall; fi, LASERGNU=lasergnu_noinstall |
|
)dnl |
|
|
|
dnl The Linux console driver |
|
AC_ARG_WITH(linux-vga,dnl |
|
[ --with-linux-vga use the Linux SVGA console driver |
|
(requires /usr/lib/libvga)],, |
|
test -z "$with_linux_vga" && with_linux_vga=no |
|
)dnl |
|
|
|
dnl IRIS terminal on IRIS4D series computer |
|
AC_ARG_ENABLE(iris,dnl |
|
[ --enable-iris enable IRIS terminal (IRIS4D only)],, |
|
test -z "$enable_iris" && enable_iris=no |
|
)dnl |
|
|
|
dnl MGR Window system |
|
AC_ARG_ENABLE(mgr,dnl |
|
[ --enable-mgr enable MGR terminal],, |
|
test -z "$enable_mgr" && enable_mgr=no |
|
)dnl |
|
|
|
dnl Redwood Graphics Interface Protocol |
|
AC_ARG_ENABLE(rgip,dnl |
|
[ --enable-rgip enable Redwood Graphics Interface Protocol],, |
|
test -z "$enable_rgip" && enable_rgip=no |
|
)dnl |
|
|
|
dnl configure.in body |
|
|
|
dnl Compiler characteristics |
dnl Compiler characteristics |
dnl Check for ANSI C prototypes, the const and inline keywords, |
dnl Check for ANSI C prototypes, the const and inline keywords, |
dnl and ANSI style stringification |
dnl and ANSI style stringification |
Line 110 AC_TRY_CPP([#if 0 |
|
Line 33 AC_TRY_CPP([#if 0 |
|
AC_SUBST(ERRORFIX) |
AC_SUBST(ERRORFIX) |
|
|
dnl X Window System files. |
dnl X Window System files. |
AC_SUBST(X_LIBRARIES) |
AC_SUBST(LIBRARIES_FOR_X) |
AC_SUBST(GNUPLOT_X11) |
AC_SUBST(GNUPLOT_X11) |
AC_PATH_XTRA |
AC_PATH_XTRA |
|
|
dnl Needed for LynxOS until AC_PATH_XTRA is fixed |
dnl Needed for LynxOS until AC_PATH_XTRA is fixed |
if test "$ac_cv_lib_nsl_gethostbyname" = no; then |
if test "$ac_cv_func_gethostbyname" = no; then |
AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") |
if test "$ac_cv_lib_nsl_gethostbyname" = no; then |
|
AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") |
|
fi |
fi |
fi |
|
|
if test "$no_x" != yes; then |
if test "$no_x" != yes; then |
CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
X_LIBRARIES="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
LIBRARIES_FOR_X="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
GNUPLOT_X11=gnuplot_x11 |
GNUPLOT_X11=gnuplot_x11 |
AC_DEFINE(X11, 1, |
AC_DEFINE(X11, 1, |
[ Define if you are using the X11 window system. ]) |
[ Define if you are using the X11 window system. ]) |
|
|
dnl Operating systems. |
dnl Operating systems. |
dnl FIXME AC_DEFINE(ISC22) |
dnl FIXME AC_DEFINE(ISC22) |
dnl FIXME AC_DEFINE(KSR) |
dnl FIXME AC_DEFINE(KSR) |
dnl Check for MSDOS and djgpp, NeXT |
dnl Check for MSDOS and djgpp, NeXT, Apple MacOsX (NeXT like), BeOS |
GP_MSDOS |
GP_MSDOS |
GP_NEXT |
GP_NEXT |
|
GP_APPLE |
|
GP_BEOS |
|
|
dnl Apparently, -lNeXT_s is needed on NeXT |
dnl Apparently, -lNeXT_s is needed on NeXT |
dnl _instead_ of -lm ... |
dnl _instead_ of -lm ... |
Line 151 dnl configure's HAVE_XXXX defines are translated into |
|
Line 78 dnl configure's HAVE_XXXX defines are translated into |
|
dnl headers and functions |
dnl headers and functions |
AC_HEADER_STDC |
AC_HEADER_STDC |
|
|
dnl Standard headers |
dnl Header files |
|
dnl ANSI/ISO C, POSIX, others |
AC_CHECK_HEADERS(errno.h float.h limits.h locale.h math.h stdlib.h string.h \ |
AC_CHECK_HEADERS(errno.h float.h limits.h locale.h math.h stdlib.h string.h \ |
time.h sys/time.h sys/timeb.h sys/types.h) |
time.h sys/time.h sys/timeb.h sys/types.h \ |
dnl other |
sys/bsdtypes.h sys/select.h sys/socket.h sys/stat.h \ |
AC_CHECK_HEADERS(sys/bsdtypes.h sys/select.h sys/socket.h sys/stat.h \ |
sys/systeminfo.h sys/utsname.h libc.h malloc.h sgtty.h termios.h values.h |
sys/systeminfo.h sys/utsname.h libc.h malloc.h sgtty.h termios.h values.h) |
) |
|
|
test "$ac_cv_header_sys_stat_h" = yes && AC_HEADER_STAT |
test "$ac_cv_header_sys_stat_h" = yes && AC_HEADER_STAT |
|
|
dnl check if unistd actually declares anything. On NeXT 3.2 unistd is |
dnl check if unistd actually declares anything. On NeXT 3.2 unistd is |
|
|
#ifdef HAVE_ERRNO_H |
#ifdef HAVE_ERRNO_H |
#include <errno.h> |
#include <errno.h> |
#endif], |
#endif], |
errno=0,AC_MSG_RESULT(yes),dnl |
errno=0,AC_MSG_RESULT(yes), |
AC_DEFINE(EXTERN_ERRNO, 1, |
AC_DEFINE(EXTERN_ERRNO, 1, |
[ Define if <errno.h> declares errno. ]) |
[ Define if <errno.h> declares errno. ]) |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
|
|
dnl Types. |
dnl Types. |
AC_TYPE_SIZE_T |
AC_TYPE_SIZE_T |
AC_MSG_CHECKING(for time_t in time.h) |
AC_MSG_CHECKING(for time_t in time.h) |
AC_EGREP_HEADER(time_t,time.h,dnl |
AC_EGREP_HEADER(time_t,time.h, |
[ ac_cv_type_time_t=yes; AC_MSG_RESULT(yes) ],dnl |
[AC_MSG_RESULT(yes) |
[ AC_MSG_RESULT(no) AC_CHECK_TYPE(time_t, long)]) |
AC_DEFINE(HAVE_TIME_T_IN_TIME_H, 1, |
|
[ Define if time_t is declared in time.h. ])]) |
AC_TYPE_SIGNAL |
AC_TYPE_SIGNAL |
|
|
|
|
dnl Functions. Standard first, then others |
dnl Functions. Standard first, then others |
|
|
|
dnl ANSI/ISO and their predecessors |
dnl sunos 4 has on_exit() in place of atexit() |
dnl sunos 4 has on_exit() in place of atexit() |
AC_CHECK_FUNCS(atexit on_exit memcpy memmove memset bcopy bzero setvbuf \ |
|
strerror strchr index strrchr rindex strstr) |
|
|
|
dnl gamma is called lgamma on apollos and linux |
dnl gamma is called lgamma on apollos and linux |
dnl we prefer lgamma over gamma, see specfun.c |
dnl we prefer lgamma over gamma, see specfun.c |
dnl math lib is already available, see operating systems part |
dnl math lib is already available, see operating systems part |
AC_CHECK_FUNCS(erf erfc gamma lgamma getcwd pclose popen sleep snprintf \ |
AC_CHECK_FUNCS(atexit memcpy memmove memset \ |
strncasecmp strnicmp sysinfo tcgetattr) |
on_exit bcopy bzero \ |
|
setvbuf strerror strchr strrchr strstr \ |
|
index rindex \ |
|
erf erfc gamma lgamma \ |
|
getcwd poll pclose popen select sleep snprintf stpcpy \ |
|
strcspn strdup strcasecmp stricmp strncasecmp strnicmp \ |
|
sysinfo tcgetattr vfprintf doprnt |
|
) |
|
|
|
dnl check, if we have sigsetjmp and siglongjmp. |
|
dnl a trivial AC_CHECK_FUNCS(sigsetjmp) won't do |
|
dnl because sigsetjmp() might be a macro declared |
|
dnl in <setjmp.h>. (joze) |
|
AC_MSG_CHECKING(for sigsetjmp) |
|
AC_TRY_LINK([#include <setjmp.h>], [jmp_buf env; sigsetjmp(env, 1);], |
|
[AC_MSG_RESULT(yes) |
|
AC_DEFINE(HAVE_SIGSETJMP, 1, |
|
[ Define if we have sigsetjmp(). ])], |
|
AC_MSG_RESULT(no) |
|
) |
|
|
if test "$ac_cv_func_pclose" = yes && test "$ac_cv_func_popen" = yes ; then |
if test "$ac_cv_func_pclose" = yes && test "$ac_cv_func_popen" = yes ; then |
AC_DEFINE(PIPES, 1, |
AC_DEFINE(PIPES, 1, |
[ Define if you do have the popen and pclose functions. ]) |
[ Define if you do have the popen and pclose functions. ]) |
|
|
dnl On SVR3. |
dnl On SVR3. |
dnl FIXME AC_DEFINE(CRIPPLED_SELECT) |
dnl FIXME AC_DEFINE(CRIPPLED_SELECT) |
|
|
|
dnl Install the lasergnu printer script (default no) |
|
LASERGNU=lasergnu_noinstall |
|
AC_ARG_WITH(lasergnu,dnl |
|
[ --with-lasergnu install lasergnu printer script], |
|
test "$withval" = yes && LASERGNU=lasergnu_install) |
|
|
|
dnl The Linux console driver |
|
AC_ARG_WITH(linux-vga,dnl |
|
[ --with-linux-vga use the Linux SVGA console driver |
|
(requires /usr/lib/libvga)],, |
|
test -z "$with_linux_vga" && with_linux_vga=no) |
|
|
dnl check for installed linux vgalib |
dnl check for installed linux vgalib |
if test "$with_linux_vga" = yes; then |
if test "$with_linux_vga" = yes; then |
AC_MSG_CHECKING(for linux vga library) |
AC_MSG_CHECKING(for linux vga library) |
Line 216 if test "$with_linux_vga" = yes; then |
|
Line 176 if test "$with_linux_vga" = yes; then |
|
[AC_DEFINE(LINUXVGA, 1, |
[AC_DEFINE(LINUXVGA, 1, |
[ Define if this is a Linux system with SuperVGA library. ]) |
[ Define if this is a Linux system with SuperVGA library. ]) |
LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' |
LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' |
TERMLIBS="$TERMLIBS -lvga"],dnl |
TERMLIBS="-lvga $TERMLIBS"], |
with_linux_vga=no) |
with_linux_vga=no) |
fi |
fi |
|
|
|
dnl Use builtin readline or GNU readline |
|
AC_ARG_WITH(readline,dnl |
|
[ --with-readline use the builtin minimal readline function (default) |
|
--without-readline do not use the builtin readline function |
|
--with-readline=gnu use the GNU readline library |
|
--with-readline=PATH Specify the location of GNU readline],, |
|
test -z "$with_readline" && with_readline=yes) |
|
|
dnl GNU readline and the required terminal library |
dnl GNU readline and the required terminal library |
if test "$with_readline" != no; then |
if test "$with_readline" != no; then |
if test "$with_readline" != yes; then |
if test "$with_readline" != yes; then |
Line 236 if test "$with_readline" != no; then |
|
Line 204 if test "$with_readline" != no; then |
|
done |
done |
|
|
if test "$with_readline" = gnu; then |
if test "$with_readline" = gnu; then |
AC_CHECK_LIB(readline, readline,dnl |
AC_CHECK_LIB(readline, readline, |
TERMLIBS="$TERMLIBS -lreadline $gp_tcap",, ${gp_tcap}) |
TERMLIBS="-lreadline $gp_tcap $TERMLIBS",, ${gp_tcap}) |
else |
else |
GP_PATH_LIB(readline,readline,[$with_readline],[${gp_tcap}]) |
if test -d $with_readline/include; then |
if test "$ac_cv_lib_readline_readline" != no; then |
CPPFLAGS="$CPPFLAGS -I$with_readline/include" |
TERMLIBS="$TERMLIBS $gp_tcap" |
|
fi |
fi |
|
if test -d $with_readline/lib; then |
|
LDFLAGS="$LDFLAGS -L$with_readline/lib" |
|
fi |
|
|
|
AC_CHECK_LIB(readline,readline, |
|
TERMLIBS="-lreadline $gp_tcap $TERMLIBS",,[${gp_tcap}]) |
|
|
fi |
fi |
|
|
if test "$ac_cv_lib_readline_readline" = no; then |
if test "$ac_cv_lib_readline_readline" = no; then |
Line 253 if test "$with_readline" != no; then |
|
Line 227 if test "$with_readline" != no; then |
|
[ Define if you are using the GNU readline library. ]) |
[ Define if you are using the GNU readline library. ]) |
fi # ! ac_cv_lib_readline_readline = no |
fi # ! ac_cv_lib_readline_readline = no |
|
|
fi # ! with_readline != yes |
fi # with_readline" != yes |
|
|
if test "$with_readline" = yes; then |
if test "$with_readline" = yes; then |
AC_DEFINE(READLINE, 1, |
AC_DEFINE(READLINE, 1, |
Line 263 if test "$with_readline" != no; then |
|
Line 237 if test "$with_readline" != no; then |
|
fi |
fi |
dnl end readline |
dnl end readline |
|
|
dnl libplot |
dnl The gif terminal with Tom Boutell's gd library |
if test "$with_plot" != no; then |
AC_ARG_WITH(gd,dnl |
if test "$with_plot" = yes; then |
[ --with-gd[=PATH] enable gif terminal with Tom Boutell's gd library |
dnl Unix plot library |
(requires GD library)], |
AC_CHECK_LIB(plot,openpl,dnl |
[if test "$withval" != no; then |
AC_DEFINE(UNIXPLOT, 1, |
if test -d $withval/include; then |
[ Define if you want to use the standard Unix plot library. ]) |
CPPFLAGS="$CPPFLAGS -I$withval/include" |
TERMLIBS="$TERMLIBS -lplot",dnl |
fi |
with_plot=no) |
if test -d $withval/lib; then |
else |
LDFLAGS="$LDFLAGS -L$withval/lib" |
dnl GNU plot library - test for new version first |
fi |
TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11" |
AC_CHECK_LIB(gd,gdImageGif, |
GP_PATH_LIB(plot,pl_textangle,[$with_plot],[$TERMXLIBS]) |
[TERMLIBS="-lgd $TERMLIBS" |
if test "$ac_cv_lib_plot_pl_textangle" = no; then |
AC_CHECK_HEADERS(gd.h, |
GP_PATH_LIB(plot,textangle,[$with_plot],[$TERMXLIBS]) |
AC_DEFINE(HAVE_LIBGD, 1, [ Define if you have Thomas Boutell's gd library. ]), |
if test "$ac_cv_lib_plot_textangle" = no; then |
AC_MSG_WARN([found gd library but not gd.h |
TERMXLIBS= |
please add path to gd.h to CPPFLAGS in Makefile]) |
GP_PATH_LIB(plot,rotate,[$with_plot]) |
)], |
if test "$ac_cv_lib_plot_rotate" = no; then |
AC_MSG_RESULT([ GD library not found or cannot create gif images. |
AC_MSG_WARN([can't find GNU libplot -- disabling gnugraph terminal]) |
See term/gif.trm for download details])) |
with_plot=no |
fi]) |
else |
dnl end gd library |
AC_MSG_RESULT([ - using obsolete GNU graphics library]) |
|
fi # old GNU plotlib |
|
else |
|
AC_MSG_RESULT([ - using GNU plotutils library]) |
|
fi # GNU plotlib pre-2.2 |
|
else |
|
GP_PATH_HEADER(plotcompat.h,[$with_plot],dnl |
|
AC_DEFINE(HAVE_PLOTCOMPAT_H, 1, |
|
[ Define if you have the <plotcompat.h> header file. ]), |
|
AC_MSG_WARN([found GNU plotutils 2.2+ library but not plotcompat.h]) |
|
AC_MSG_WARN([please add path to plotcompat.h to CPPFLAGS in Makefile]) |
|
) # plotcompat.h |
|
fi # new GNU plotlib |
|
|
|
if test "$with_plot" != no; then |
dnl If no PATH argument given, use the Unix plot library |
AC_DEFINE(GNUGRAPH, 1, |
dnl Else use either GNU libplot from plotutils, |
[ Define if you want to use the GNU version of the Unix plot library. ]) |
dnl or ancient GNU graphics libplot |
AC_DEFINE(GNU_PLOTUTILS, 1, |
AC_ARG_WITH(plot,dnl |
[ Define if your libplot.a is from GNU plotutils. ]) |
[ --with-plot[=PATH] use the Unix plot library], |
fi |
[if test "$withval" = yes; then |
|
dnl Unix plot library |
fi # ! Unix plotlib |
AC_CHECK_LIB(plot,openpl, |
fi |
[AC_DEFINE(UNIXPLOT, 1, |
|
[ Define if you want to use the standard Unix plot library. ]) |
|
TERMLIBS="-lplot $TERMLIBS"], |
|
with_plot=no) |
|
elif test "$withval" != no; then |
|
dnl GNU plotutils 2.2 or better |
|
if test -d $withval/include; then |
|
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
fi |
|
if test -d $withval/lib; then |
|
LDFLAGS="$LDFLAGS -L$withval/lib" |
|
fi |
|
TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11" |
|
AC_CHECK_LIB(plot,pl_textangle, |
|
[TERMLIBS="-lplot $TERMLIBS" |
|
AC_DEFINE(GNUGRAPH, 1, |
|
[ Define if you want to use the GNU version of the Unix plot library. ])], |
|
[AC_MSG_WARN([GNU plotutils v2.2 or newer required -- disabling gnugraph terminal]) |
|
TERMXLIBS= |
|
with_plot=no], |
|
[$TERMXLIBS]) |
|
fi]) |
dnl end libplot |
dnl end libplot |
|
|
dnl check for Tom Boutell's gd library |
dnl The Portable Network Graphics (png) terminal |
if test "$with_gd" != no; then |
AC_ARG_WITH(png,dnl |
GP_PATH_LIB(gd,gdImageCreate,[$with_gd]) |
[ --with-png[=PATH] enable png terminal |
if test "$ac_cv_lib_gd_gdImageCreate" != no; then |
(requires libpng and libz)], |
GP_PATH_HEADER(gd.h,[$with_gd],dnl |
[if test "$withval" != no; then |
dnl ACTION-IF-FOUND |
if test -d $withval/include; then |
AC_DEFINE(HAVE_LIBGD, 1, |
CPPFLAGS="$CPPFLAGS -I$withval/include" |
[ Define if you have Thomas Boutell's gd library. ]),dnl |
fi |
dnl ACTION-IF-NOT-FOUND |
if test -d $withval/lib; then |
AC_MSG_WARN([found gd library but not gd.h]) |
LDFLAGS="$LDFLAGS -L$withval/lib" |
AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile])) |
fi |
else |
with_png=yes |
AC_MSG_RESULT([- see term/gif.trm for download details]) |
fi],with_png=yes) |
fi |
|
fi |
|
dnl end gd |
|
|
|
dnl check for png and z library |
if test "$with_png" = yes; then |
if test "$with_png" != no; then |
AC_CHECK_LIB(png,png_init_io, |
GP_PATH_LIB(png,png_info_init,[$with_png],[-lz]) |
[TERMLIBS="-lpng -lz $TERMLIBS" |
if test "$ac_cv_lib_png_png_info_init" != no; then |
AC_CHECK_HEADERS(png.h, |
TERMLIBS="$TERMLIBS -lz" |
[AC_CHECK_HEADERS(zlib.h,, |
GP_PATH_HEADER(png.h,[$with_png],,dnl |
AC_MSG_WARN([found z library but not zlib.h |
AC_MSG_WARN([found png library but not png.h]) |
please add path to zlib.h to CPPFLAGS in Makefile])) |
AC_MSG_WARN([please add path to png.h to CPPFLAGS in Makefile]) |
|
) |
|
GP_PATH_HEADER(zlib.h,[$with_png],,dnl |
|
AC_MSG_WARN([found z library but not zlib.h]) |
|
AC_MSG_WARN([please add path to zlib.h to CPPFLAGS in Makefile]) |
|
) |
|
if test "$ac_cv_header_png_h" != no; then |
|
AC_EGREP_CPP([You lose], [#include "png.h" |
AC_EGREP_CPP([You lose], [#include "png.h" |
#if PNG_LIBPNG_VER < 89 |
#if PNG_LIBPNG_VER < 89 |
You lose. |
You lose. |
#endif |
#endif |
],dnl |
], |
AC_MSG_WARN([- libpng too old - not including png driver]) |
AC_MSG_WARN([- libpng too old - not including png driver]) |
with_png=no) |
ac_cv_header_png_h=no)], |
else |
AC_MSG_WARN([found png library but not png.h |
AC_MSG_WARN([- cannot check png version - compilation may fail]) |
please add path to png.h to CPPFLAGS in Makefile]))], |
fi |
AC_MSG_RESULT([ PNG library not found. |
|
See term/png.trm for download details]), |
|
[-lz]) |
|
|
if test "$with_png" != no; then |
if test "$ac_cv_header_png_h" = yes; then |
AC_DEFINE(HAVE_LIBPNG, 1, |
AC_DEFINE(HAVE_LIBPNG, 1, |
[ Define if you have the png library. ]) |
[ Define if you have the png library. ]) |
fi |
fi |
|
fi |
|
dnl end png and z |
|
|
else |
dnl The Portable Document Format (PDF) terminal |
AC_MSG_RESULT([- see term/png.trm for download details]) |
AC_ARG_WITH(pdf,dnl |
|
[ --with-pdf[=PATH] enable pdf terminal |
|
(requires PDFLib)], |
|
[if test "$withval" != no; then |
|
if test -d $withval/include; then |
|
CPPFLAGS="$CPPFLAGS -I$withval/include" |
|
fi |
|
if test -d $withval/lib; then |
|
LDFLAGS="$LDFLAGS -L$withval/lib" |
|
fi |
|
with_pdf=yes |
|
fi],with_pdf=no) |
|
|
|
if test "$with_pdf" = yes; then |
|
AC_CHECK_LIB(pdf,PDF_get_majorversion, |
|
[TERMLIBS="-lpdf $TERMLIBS" |
|
AC_DEFINE(HAVE_LIBPDF,1, |
|
[ Define if you have the pdf library. ]) |
|
AC_CHECK_HEADERS(pdflib.h,, |
|
AC_MSG_WARN([found pdf library but not pdflib.h |
|
please add path to pdflib.h to CPPFLAGS in Makefile])) |
|
AC_CHECK_HEADERS(zlib.h,, |
|
AC_MSG_WARN([found z library but not zlib.h |
|
please add path to zlib.h to CPPFLAGS in Makefile]))], |
|
AC_MSG_RESULT([ PDF library not found. |
|
See term/pdf.trm for download details])) |
|
|
|
if test "$ac_cv_header_pdflib_h" = yes; then |
|
AC_DEFINE(HAVE_LIBPDF, 1, |
|
[ Define if you have the pdf library. ]) |
fi |
fi |
fi |
fi |
dnl end png and z |
dnl end pdf |
|
|
dnl How do we detect the Ultrix X libraries? |
dnl How do we detect the Ultrix X libraries? |
dnl Or is it really a server (run-time) problem? |
dnl Or is it really a server (run-time) problem? |
Line 375 AC_EGREP_CPP(yes, |
|
Line 380 AC_EGREP_CPP(yes, |
|
[#ifdef SCO |
[#ifdef SCO |
yes |
yes |
#endif |
#endif |
],AC_CHECK_LIB(ccgi, v_opnwk,dnl |
],AC_CHECK_LIB(ccgi, v_opnwk, |
AC_DEFINE(CGI, 1, |
AC_DEFINE(CGI, 1, |
[ Define if you want to use the CGI terminal under SCO. ])dnl |
[ Define if you want to use the CGI terminal under SCO. ]) |
TERMLIBS="$TERMLIBS -lccgi")) |
TERMLIBS="-lccgi $TERMLIBS")) |
|
|
dnl Sun sunview |
dnl Sun sunview |
AC_EGREP_CPP(yes, |
AC_EGREP_CPP(yes, |
[#ifdef sun |
[#ifdef sun |
yes |
yes |
#endif |
#endif |
], AC_CHECK_LIB(suntool, window_create,dnl |
], AC_CHECK_LIB(suntool, window_create, |
AC_CHECK_HEADER(suntool/sunview.h,dnl |
AC_CHECK_HEADER(suntool/sunview.h, |
AC_DEFINE(SUN, 1, |
AC_DEFINE(SUN, 1, |
[ Define if you want to use the sunview terminal (sun). ])dnl |
[ Define if you want to use the sunview terminal (sun). ]) |
TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect"),,dnl |
TERMLIBS="-lsuntool -lsunwindow -lpixrect $TERMLIBS"),, |
[-lsunwindow -lpixrect])) |
[-lsunwindow -lpixrect])) |
|
|
dnl Process with and enable options |
dnl Process enable options |
|
|
if test "$with_cdwrc" = no; then |
dnl Use .gnuplot file in current directory |
AC_DEFINE(NOCWDRC, 1, |
AC_ARG_WITH(cwdrc,dnl |
|
[ --with-cwdrc check current directory for .gnuplot file, |
|
normally disabled for security reasons],, |
|
[if test "$withval" = yes; then |
|
AC_DEFINE(NOCWDRC, 1, |
[ Define if you do not want to read .gnuplot in the current directory. ]) |
[ Define if you do not want to read .gnuplot in the current directory. ]) |
fi |
fi]) |
|
|
if test "$enable_iris" = yes; then |
dnl ggi driver |
AC_CHECK_LIB(gl_s,winopen,dnl |
AC_ARG_ENABLE(ggi,dnl |
AC_DEFINE(IRIS, 1, |
[ --enable-ggi enable ggi driver (EXPERIMENTAL)], |
|
[AC_CHECK_LIB(ggi,ggiInit, |
|
AC_CHECK_LIB(ggiwmh,ggiWmhInit, |
|
AC_DEFINE(HAVE_GGI, 1, |
|
[ Define if you have the required ggi libraries. ]), |
|
enable_ggi=no), |
|
enable_ggi=no) |
|
] |
|
)dnl |
|
|
|
dnl IRIS terminal on IRIS4D series computer |
|
AC_ARG_ENABLE(iris,dnl |
|
[ --enable-iris enable IRIS terminal (IRIS4D only)], |
|
[if test "$enableval" = yes; then |
|
AC_CHECK_LIB(gl_s,winopen, |
|
AC_DEFINE(IRIS, 1, |
[ Define if you want to use the IRIS terminal on IRIS4D series computers. ]) |
[ Define if you want to use the IRIS terminal on IRIS4D series computers. ]) |
TERMLIBS="$TERMLIBS -lgl_s",dnl |
TERMLIBS="-lgl_s $TERMLIBS",enable_iris=no) |
enable_iris=no) |
fi]) |
fi |
|
|
|
if test "$enable_mgr" = yes; then |
dnl MGR Window system |
AC_CHECK_LIB(mgr,m_getinfo,dnl |
AC_ARG_ENABLE(mgr,dnl |
AC_DEFINE(MGR, 1, |
[ --enable-mgr enable MGR terminal], |
[ Define if you want to use the MGR Window system. ]) |
[if test "$enableval" = yes; then |
TERMLIBS="$TERMLIBS -lmgr -lpixrect",dnl |
AC_CHECK_LIB(mgr,m_getinfo, |
enable_mgr=no,[-lpixrect]) |
AC_DEFINE(MGR, 1, [ Define if you want to use the MGR Window system. ]) |
fi |
TERMLIBS="-lmgr -lpixrect $TERMLIBS",enable_mgr=no,[-lpixrect]) |
|
fi]) |
|
|
if test "$enable_rgip" = yes; then |
dnl Redwood Graphics Interface Protocol |
AC_DEFINE(RGIP, 1, |
AC_ARG_ENABLE(rgip,dnl |
[ Define if you want to use the Redwood Graphics Interface Protocol. ]) |
[ --enable-rgip enable Redwood Graphics Interface Protocol], |
fi |
[if test "$enableval" = yes; then |
|
AC_DEFINE(RGIP, 1, |
|
[ Define if you want to use the Redwood Graphics Interface Protocol. ]) |
|
fi]) |
|
|
dnl Substitute variables |
dnl Substitute variables |
AC_SUBST(PACKAGE) |
AC_SUBST(PACKAGE) |
|
|
|
|
Where is the help file? $gp_datadir/gnuplot.gih |
Where is the help file? $gp_datadir/gnuplot.gih |
]) |
]) |
test "$ac_cv_header_gd_h" = yes && \ |
if test "$ac_cv_header_gd_h" = yes; then |
AC_MSG_RESULT([ Enable generation of GIF files]) |
AC_MSG_RESULT([ Enable generation of GIF files]) |
|
fi |
|
|
test "$ac_cv_header_zlib_h" = yes && \ |
if test "$ac_cv_header_pdflib_h" = yes; then |
|
AC_MSG_RESULT([ Enable generation of PDF files]) |
|
fi |
|
|
|
if test "$ac_cv_header_png_h" = yes; then |
AC_MSG_RESULT([ Enable generation of PNG files]) |
AC_MSG_RESULT([ Enable generation of PNG files]) |
|
fi |
|
|
test "$with_cwdrc" = yes && \ |
if test "$with_cwdrc" = yes; then |
AC_MSG_RESULT([ Check current directory for .gnuplot file]) |
AC_MSG_RESULT([ Check current directory for .gnuplot file]) |
|
fi |
|
|
if test "$with_readline" != no; then |
if test "$with_readline" != no; then |
if test "$with_readline" != yes; then |
if test "$with_readline" != yes; then |
Line 455 if test "$with_readline" != no; then |
|
Line 489 if test "$with_readline" != no; then |
|
fi |
fi |
fi |
fi |
|
|
if test "$with_plot" = yes; then |
if test x"$with_plot" != x; then |
AC_MSG_RESULT([ Use the Unix plot library]) |
if test "$with_plot" = yes; then |
elif test "$with_plot" != no; then |
AC_MSG_RESULT([ Use the Unix plot library]) |
AC_MSG_RESULT([ Use the GNU plot library,]) |
|
if test x"$ac_cv_header_plotcompat_h" != x && \ |
|
test "$ac_cv_header_plotcompat_h" != no ; then |
|
AC_MSG_RESULT([ version 2.2 or newer]) |
|
else |
else |
AC_MSG_RESULT([ version 2.1 or older]) |
AC_MSG_RESULT([ Use the GNU plot library v2.2 or better]) |
fi |
fi |
fi |
fi |
|
|
test "$with_lasergnu" = yes && \ |
if test "$with_lasergnu" = yes; then |
AC_MSG_RESULT([ Install lasergnu printer script]) |
AC_MSG_RESULT([ Install lasergnu printer script]) |
|
fi |
|
|
if test "$with_linux_vga" = yes; then |
if test "$with_linux_vga" = yes; then |
AC_MSG_RESULT([ Use the Linux SVGA console driver]) |
AC_MSG_RESULT([ Use the Linux SVGA console driver]) |
Line 476 if test "$with_linux_vga" = yes; then |
|
Line 507 if test "$with_linux_vga" = yes; then |
|
AC_MSG_RESULT([ gnuplot is installed suid root!]) |
AC_MSG_RESULT([ gnuplot is installed suid root!]) |
fi |
fi |
|
|
test "$enable_iris" = yes && \ |
if test "$enable_ggi" = yes; then |
|
AC_MSG_RESULT([ Enable ggi terminal (EXPERIMENTAL)]) |
|
fi |
|
|
|
if test "$enable_iris" = yes; then |
AC_MSG_RESULT([ Enable IRIS terminal]) |
AC_MSG_RESULT([ Enable IRIS terminal]) |
|
fi |
|
|
test "$enable_mgr" = yes && \ |
if test "$enable_mgr" = yes; then |
AC_MSG_RESULT([ Enable MGR terminal]) |
AC_MSG_RESULT([ Enable MGR terminal]) |
|
fi |
|
|
test "$enable_rgip" = yes && \ |
if test "$enable_rgip" = yes; then |
AC_MSG_RESULT([ Enable RGIP terminal]) |
AC_MSG_RESULT([ Enable RGIP terminal]) |
|
fi |
|
|
test "$no_x" != yes && \ |
if test "$no_x" != yes; then |
AC_MSG_RESULT([ Use the X Window System |
AC_MSG_RESULT([ Use the X Window System |
]) |
]) |
|
fi |
dnl end config report |
dnl end config report |
|
|
dnl Write Makefiles and configuration header |
dnl Write Makefiles and configuration header |