diff -uNr dcl-5.2-C/Mkinclude dcl-5.2-C-gtk2/Mkinclude --- dcl-5.2-C/Mkinclude 2002-01-22 14:57:37.000000000 +0900 +++ dcl-5.2-C-gtk2/Mkinclude 1970-01-01 09:00:00.000000000 +0900 @@ -1,125 +0,0 @@ -# $Id: Mkinclude.in,v 0.53 1999/06/02 02:30:25 kagimoto Exp $ -# edited by M. Shiotani 2000/10/07 -# -# include file for Makefile -# - -# suffix rules - -.SUFFIXES : .o .f .c - -.c : - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) - - -.c.o : - $(CC) $(CFLAGS) -c $< - -.f.o : - $(FC) $(FFLAGS) -c $< - -.f : - $(FC) $(FFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) - -# macro definitions - -prefix = /export/home/shiotani/tmp/tmp/dcl-5.2-C -DCLDIR = /export/home/shiotani/tmp/tmp/dcl-5.2-C -#DCLDIR = /export/home/shiotani/tmp/tmp/dcl-5.2-C -BINDIR = $(prefix)/bin -LIBDIR = $(prefix)/lib -INCDIR = $(prefix)/include -DCLVERSION = @DCFLVERSION@ -DCLVERNUM = 52 -DCLLANG = C - -DBASENAME = dcldbase -DBASEDIR = $(LIBDIR)/$(DBASENAME) - -#DCLLIBNAME = dcl$(DCLVERNUM)$(DCLLANG) -#DCLLIBFILE = $(LIBDIR)/lib$(DCLLIBNAME).a -DCLLIBNAME = cdcl52 -DCLLIBFILE = $(LIBDIR)/libcdcl52.a -DCLLIBOPT = -l$(DCLLIBNAME) -DCLLIBPATH = -L$(LIBDIR) - -XINCPATH = -I/usr/openwin/include -XLIBPATH = -L/usr/openwin/lib -R/usr/openwin/lib -XLIBOPT = -lSM -lICE -lX11 - -MATHLIBOPT = -lm - -SRCDIR = $(DCLDIR)/src -DCLINCDIR = $(DCLDIR)/include -LBINDIR = $(DCLDIR)/bin -DEMODIR = $(DCLDIR)/demo -DOCDIR = $(DCLDIR)/doc -ETCDIR = $(DCLDIR)/etc -DCLF2CSRCDIR = $(DCLDIR)/f2csrc -DCLF2CLIBDIR = $(DCLDIR)/f2clib -DCLF2CINCPATH = -I$(DCLF2CLIBDIR) -DCLF2CLIBPATH = -L$(DCLF2CLIBDIR) - -F2CINCPATH = -I$(INCDIR) -F2CLIBPATH = -L$(LIBDIR) -F2CLIBOPT = -lf2c4dcl -#LIBF2C = $(LIBDIR)/libf2c4dcl.a -PSDIR = $(DCLDIR)/ps - -MISC1EXT = clcklib fiolib randlib hexlib reallib -OLDSRC = - -DCLFRT = dclfrt -DCLCC = dclcc -DCLCONFIG = dclconfig -DCLCONFVER = $(DCLCONFIG)$(DCLVERNUM) -CDCLCC = cdclcc -CDCLCONFIG = cdclconfig -CDCLCONFVER = $(CDCLCONFIG)$(DCLVERNUM) - -SHELL = /bin/sh -MAKE = make -CC = gcc -CFLAGS = -O $(XINCPATH) $(DCLF2CINCPATH) $(F2CINCPATH) -FC = f90 -FFLAGS = -O -LD = ld -LDFLAGS = $(DCLLIBPATH) $(XLIBPATH) $(DCLF2CLIBPATH) $(F2CLIBPATH) -LDLIBS = -R/opt/FSUNf90/lib $(DCLLIBOPT) $(F2CLIBOPT) -lsocket -lnsl $(XLIBOPT) $(MATHLIBOPT) -AR = ar -ARFLAGS = vru -RM = rm -f -CP = cp -MV = mv -f -RANLIB = ranlib -CAT = cat -AWK = /bin/nawk -SED = sed - -#JLATEX = @JLATEX@ -#DVI2JPS = @DVI2JPS@ - -# some constants used in math1/syslib/glpget.f - -INTMAX = 0x00800000 -REALMAX = 0x00800000 -REALMIN = 0x00800000 -REPSL = 1.19221E-06 - -# some constants used in misc1/clcklib/clckst.c - -CLK_PER_SEC = -CLK_RSL_TCK = - -#selection of function atexit() -IF_ONEXIT = onexit=on_exit - -# selection of source code in math1/oslib - -OSQARN = iargc -OSGARG = getarg - -# selection of source code in grph1/csgi - -CSGI = general - diff -uNr dcl-5.2-C/Mkinclude.in dcl-5.2-C-gtk2/Mkinclude.in --- dcl-5.2-C/Mkinclude.in 2002-01-08 17:47:09.000000000 +0900 +++ dcl-5.2-C-gtk2/Mkinclude.in 2004-01-22 18:43:14.000000000 +0900 @@ -9,11 +9,11 @@ .SUFFIXES : .o .f .c .c : - $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) + $(CC) $(DEFS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) .c.o : - $(CC) $(CFLAGS) -c $< + $(CC) $(DEFS) $(CFLAGS) -c $< .f.o : $(FC) $(FFLAGS) -c $< @@ -29,7 +29,7 @@ BINDIR = $(prefix)/bin LIBDIR = $(prefix)/lib INCDIR = $(prefix)/include -DCLVERSION = @DCFLVERSION@ +DCLVERSION = @DCLVERSION@ DCLVERNUM = @DCLVERNUM@ DCLLANG = @DCLLANG@ @@ -47,6 +47,9 @@ XLIBPATH = @X_LIBS@ XLIBOPT = @X_PRE_LIBS@ @X_LIBRARIES@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ + MATHLIBOPT = -lm SRCDIR = $(DCLDIR)/src @@ -77,15 +80,18 @@ CDCLCONFIG = cdclconfig CDCLCONFVER = $(CDCLCONFIG)$(DCLVERNUM) +GTKVERSION = @GTKVERSION@ + SHELL = /bin/sh MAKE = make CC = @CC@ -CFLAGS = @CFLAGS@ $(XINCPATH) $(DCLF2CINCPATH) $(F2CINCPATH) +DEFS = @DEFS@ +CFLAGS = @CFLAGS@ $(GTK_CFLAGS) $(XINCPATH) $(DCLF2CINCPATH) $(F2CINCPATH) FC = @FC@ FFLAGS = @FFLAGS@ LD = ld LDFLAGS = $(DCLLIBPATH) $(XLIBPATH) $(DCLF2CLIBPATH) $(F2CLIBPATH) -LDLIBS = @FLIBS@ $(DCLLIBOPT) $(F2CLIBOPT) @X_EXTRA_LIBS@ $(XLIBOPT) $(MATHLIBOPT) +LDLIBS = @FLIBS@ $(DCLLIBOPT) $(F2CLIBOPT) $(GTK_LIBS) @X_EXTRA_LIBS@ $(XLIBOPT) $(MATHLIBOPT) AR = ar ARFLAGS = vru RM = rm -f diff -uNr dcl-5.2-C/aclocal.m4 dcl-5.2-C-gtk2/aclocal.m4 --- dcl-5.2-C/aclocal.m4 1970-01-01 09:00:00.000000000 +0900 +++ dcl-5.2-C-gtk2/aclocal.m4 2003-11-21 17:33:55.000000000 +0900 @@ -0,0 +1,1320 @@ +dnl $Id: aclocal.m4,v 0.55 1999/06/15 06:15:26 kagimoto Exp $ +dnl DCL macros for dcl-5.0.1 configure + +dnl Check for C compiler. +dnl +AC_DEFUN(DCL_PROG_CC, +[ + case "${CC-}" in + '') + case `uname` in + ULTRIX) + ccs='gcc cc' + ;; + *) + ccs='xlc acc cc gcc' + ;; + esac + for cc in $ccs; do + AC_CHECK_PROG(CC, $cc, $cc) + case "$CC" in + '') ;; + *) break;; + esac + done + case "${CC-}" in + '') + AC_MSG_ERROR("Could not find C compiler") + ;; + esac + ;; + *) + AC_CHECKING(user-defined C compiler \"$CC\") + ;; + esac + AC_MSG_CHECKING(C compiler) + AC_TRY_COMPILE(, , + AC_MSG_RESULT(works), + AC_MSG_ERROR($CC failed to compile test program)) + AC_SUBST(CC) + case "$CC" in + *gcc*) + GCC=yes # Expected by autoconf(1) macros + ;; + esac + case `uname -s` in + HP-UX*) + CFLAGS="${CFLAGS-} -D_INCLUDE_POSIX_SOURCE)" + ;; + SunOS) + case `uname -r` in + 4*) + CFLAGS="${CFLAGS-} -Dsun4" + ;; + 5*) + ;; + esac + ;; + esac + AC_SUBST(CFLAGS) +]) + +dnl Check for FORTRAN compiler. +dnl +AC_DEFUN(DCL_PROG_FC, +[ + SUNF=no + case `uname -s` in + AIX) + forts="xlf90 f90 xlf f77" + ;; + BSD/OS) + forts="f77 g77" + fflags=-w + ;; + HI-OSF*) + forts="f90 f77" + fflags="-i,E,L,EU" + ;; + HP-UX) + forts=fort77 + fflags=-w + flibs=-lU77 + ;; + IRIX) + forts="f90 f77" + ;; + IRIX64) + forts="f90 f77 g77" + fflags=-w + ;; + Linux) + forts="f90 pgf77 f77 g77" + fflags=-w + ;; + OSF1) + forts="f90 f77" + ;; + SunOS) + case `uname -r` in + 4*) + forts="f77 frt g77" + fflags=-w + ;; + 5*) + forts="f90 f77 frt g77" + SUNF=yes + ;; + esac + ;; + sn*|UNICOS) + forts="cf90 f90 cf77 f77 g77" + ;; + *) + forts="xlf90 f90 xlf ghf77 f77 cf77 g77 fort77" + ;; + esac + FFLAGS="${FFLAGS-} ${fflags-}" + FLIBS="${FLIBS-} ${flibs-}" + case "${FC+set}" in + set) + case "$FC" in + '') + AC_MSG_WARN(no FORTRAN compiler) + ;; + *) + AC_MSG_CHECKING(user-defined FORTRAN compiler \"$FC\") + cat << EOF > conftest.f + CALL FOO + END +EOF + doit='$FC -c ${FFLAGS-} conftest.f' + if AC_TRY_EVAL(doit); then + AC_MSG_RESULT(works) + else + AC_MSG_WARN($FC failed to compile test program) + FC= + fi + rm -f conftest.* + ;; + esac + ;; + *) + for fc in $forts; do + AC_CHECK_PROG(FC, $fc, $fc) + case "${FC-}" in + '') + ;; + *) + cat << EOF > conftest.f + CALL FOO + END +EOF + doit='$FC -c ${FFLAGS-} conftest.f' + if AC_TRY_EVAL(doit); then + break + else + AC_MSG_WARN($FC failed to compile test program) + unset FC + unset ac_cv_prog_FC + fi + ;; + esac + done + rm -f conftest.* + case "${FC-}" in + '') + AC_MSG_WARN(Could not find working FORTRAN compiler) + FC= + ;; + esac + ;; + esac + +dnl If Sun Fortran 90 is selected, -R should be specified +dnl in the compilation process +dnl + if test ${SUNF} = yes && test "${FC}" = "f90"; then + AC_PATH_PROG(SUNFC,"f90") + flibdir=`dirname ${SUNFC}` + flibdir=`echo $flibdir | sed -e s/bin/lib/` + FLIBS="${FLIBS-} -R"$flibdir + fi + + AC_SUBST(FC) + AC_SUBST(FFLAGS) + AC_SUBST(FLIBS) +]) + +dnl Check for awk +dnl +AC_DEFUN(DCL_PROG_AWK, +[ + awk="mawk gawk jgawk nawk awk" + for prog in $awk + do + AC_PATH_PROG(AWK, $prog) + case "${AWK-}" in + '') + ;; + *) + break;; + esac + done + case "${AWK-}" in + '') + AC_MSG_WARN(Could not find awk program) + AWK= + ;; + esac + AC_SUBST(AWK) +]) + +dnl Check for sed +dnl +AC_DEFUN(DCL_PROG_SED, +[ + sed="gsed sed" + for prog in $sed + do + AC_CHECK_PROG(SED, $prog, $prog) + case "${SED-}" in + '') + ;; + *) + break;; + esac + done + case "${SED-}" in + '') + AC_MSG_WARN(Could not find sed program) + SED= + ;; + esac + AC_SUBST(SED) +]) + +dnl Check for jLaTeX program +dnl +AC_DEFUN(DCL_PROG_JLATEX, +[ + jlatex="jlatex platex" + for jl in $jlatex + do + AC_CHECK_PROG(JLATEX, $jl, $jl) + case "${JLATEX-}" in + '') + ;; + *) + break + ;; + esac + done + case "${JLATEX-}" in + '') + AC_MSG_WARN(Could not find LaTeX program) + JLATEX= + ;; + esac + AC_SUBST(JLATEX) +]) + +dnl Check for DVI->PS filter +dnl +AC_DEFUN(DCL_PROG_DVIPS, +[ + dvips="dvi2ps dvi2jps dvips" + for dvi in $dvips + do + AC_CHECK_PROG(DVI2JPS, $dvi, $dvi) + case "${DVI2JPS-}" in + '') + ;; + dvips) + DVI2JPS="dvips -f" + break + ;; + *) + break + ;; + esac + done + case "${DVI2JPS-}" in + '') + AC_MSG_WARN(Could not find DVI->PS program) + DVI2JPS= + ;; + esac + AC_SUBST(DVI2JPS) +]) + +dnl Check options for math1/oslib/{osgarg.F,osqarn.F} +dnl +AC_DEFUN(DCL_CHECK_OSLIB_OPTIONS, +[ + cat << EOF > conftest.f + PROGRAM MAIN + CHARACTER ARGV*10 + EXTERNAL GETARG + CALL GETARG(2, ARGV) + STOP + END +EOF + doit='${FC-} ${FFLAGS-} conftest.f > /dev/null 2>&1' + AC_MSG_CHECKING(Fortran service routine getarg()) + if AC_TRY_EVAL(doit); then + AC_MSG_RESULT(works) + OSGARG_OPT=getarg + else + AC_MSG_WARN(getarg() is not available) + OSGARG_OPT=dummy + fi + rm -f conftest.* a.out + + cat << EOF > conftest.f + PROGRAM MAIN + EXTERNAL IARGC + N = IARGC() + STOP + END +EOF + doit='${FC-} ${FFLAGS-} conftest.f > /dev/null 2>&1' + AC_MSG_CHECKING(Fortran service routine iargc()) + if AC_TRY_EVAL(doit); then + AC_MSG_RESULT(works) + OSQARN_OPT=iargc + else + AC_MSG_WARN(Service routine iargc() is not available) + OSQARN_OPT=dummy + fi + rm -f conftest.* a.out + + AC_SUBST(OSGARG_OPT) + AC_SUBST(OSQARN_OPT) +]) + +dnl Check underscore for C functions' name +dnl +AC_DEFUN(DCL_CHECK_UNDERSCORE, +[ + cat << EOF > conftest.f + PROGRAM MAIN + CALL CFUNC + STOP + END +EOF + cat << EOF > conftest1.c +int cfunc() +{ + return 0; +} +EOF + cat << EOF > conftest2.c +int cfunc_() +{ + return 0; +} +EOF + ${CC-} -c conftest1.c -o conftest1.o + ${CC-} -c conftest2.c -o conftest2.o + doit1='${FC-} ${FFLAGS-} conftest.f conftest1.o' + doit2='${FC-} ${FFLAGS-} conftest.f conftest2.o' + if AC_TRY_EVAL(doit1); then + AC_MSG_RESULT(underscore is unnecessary) + USCORE="-DUSCORE" + elif AC_TRY_EVAL(doit2); then + AC_MSG_RESULT(underscore is necessary) + USCORE="-DUSCORE=_" + fi + rm -f conftest?.? conftest.* a.out + AC_SUBST(USCORE) +]) + +dnl Check CSGI package +dnl +AC_DEFUN(DCL_CHECK_CSGI, +[ + cat << EOF > conftest.f + print*,ichar('a') + end +EOF + AC_MSG_CHECKING(Character code set csgi()/isgc()) + ${FC-} -o conftest conftest.f > /dev/null 2>&1 + ia=`./conftest` + if test $ia -gt 0; then + CSGI_OPT=general + AC_MSG_RESULT(general) + else + CSGI_OPT=other + AC_MSG_RESULT(other) + fi + rm -f conftest conftest.? + AC_SUBST(CSGI_OPT) +]) + +dnl Set DCLDIR (current working directory) +dnl +AC_DEFUN(DCL_SET_DCLDIR, +[ + AC_PATH_PROG(PWD, pwd) + case "${PWD-}" in + '') + AC_MSG_WARN(*** WARN *** Please set environment variable DCLDIR by yourself) + DCLDIR= + ;; + *) + DCLDIR=${PWD-} + esac + AC_SUBST(DCLDIR) +]) + +dnl Check for the name format of a Fortran-callable C routine. +dnl +dnl DCL_CHECK_FCALLSCSUB +AC_DEFUN([DCL_CHECK_FCALLSCSUB], +[ + AC_REQUIRE([DCL_PROG_FC]) + case "$FC" in + '') ;; + *) AC_BEFORE([DCL_CHECK_CTYPE_FORTRAN]) + AC_MSG_CHECKING(for C-equivalent to Fortran routine \"SUB\") + cat >conftest.f <<\EOF + call sub() + end +EOF + doit='$FC -c ${FFLAGS} conftest.f' + if AC_TRY_EVAL(doit); then + FCALLSCSUB=`nm conftest.o | awk ' + /SUB_/{print "SUB_";exit} + /SUB/ {print "SUB"; exit} + /sub_/{print "sub_";exit} + /sub/ {print "sub"; exit}'` + case "$FCALLSCSUB" in + '') AC_MSG_ERROR(not found) + ;; + *) AC_MSG_RESULT($FCALLSCSUB) + ;; + esac + else + AC_MSG_ERROR(Could not compile conftest.f) + fi + rm -f conftest* + ;; + esac +]) + +dnl Check for a C type equivalent to a Fortran type. +dnl +dnl DCL_CHECK_CTYPE_FORTRAN(ftype, ctypes, fmacro_root) +dnl +AC_DEFUN(DCL_CHECK_CTYPE_FORTRAN, +[ + cat >conftestf.f <conftest.c < conftest1.f + INTEGER I + DATA I /Z'7FFFFFFF'/ + END +EOF + cat << EOF > conftest2.f + INTEGER I + DATA I /Z7FFFFFFF/ + END +EOF + doit1='$FC -o conftest1 ${FFLAGS-} conftest1.f' + doit2='$FC -o conftest2 ${FFLAGS-} conftest2.f' + + if AC_TRY_EVAL(doit1); then + AC_MSG_RESULT(hexadecimal number requires quotation) + QFLAG=-DQUOTE + elif AC_TRY_EVAL(doit2); then + AC_MSG_RESULT(hexadecimal number requires no quotation) + QFLAG= + fi + rm -f conftest? conftest?.? +]) + +dnl +dnl Get information about maximum and minimum value +dnl +AC_DEFUN(DCL_CHECK_VALUES, +[ + AC_REQUIRE([DCL_CHECK_FORTRAN_HEX_DATA]) + AC_CHECK_HEADER(float.h, EXTRA_CFLAGS=-DHAVE_FLOAT_H) + +cat << EOF > conftest.c +#include +#ifdef HAVE_FLOAT_H +# include +#endif +#include + +#ifdef FLT_MIN +# define float_min FLT_MIN +#else +# define float_min 1.175494351E-38 +#endif +#ifdef FLT_MAX +# define float_max FLT_MAX +#else +# define float_max 3.402823466E+38 +#endif +#ifdef FLT_EPSILON +# define float_epsilon FLT_EPSILON +#else +# define float_epsilon 1.192092896E-07 +#endif +#ifdef INT_MAX +# define int_max INT_MAX +#else +# define int_max 2147483647 +#endif + +typedef union { + int si; + unsigned int ui; +} INT; +typedef union { + float fl; + unsigned int ui; +} FLT; + +main () +{ + FILE *fd1, *fd2, *fd3, *fd4; + FLT fmin, fmax; + float feps; + INT imax; + + fmin.fl = float_min, fmax.fl = float_max; + feps = float_epsilon * 10.001; + imax.si = int_max; + + if ((fd1 = fopen("fminval", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file fminval\n"); + exit(1); + } + if ((fd2 = fopen("fmaxval", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file fmaxval\n"); + exit(1); + } + if ((fd3 = fopen("fepsval", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file fepsval\n"); + exit(1); + } + if ((fd4 = fopen("imaxval", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file imaxval\n"); + exit(1); + } +/* +#ifdef QUOTE + fprintf(fd1, "Z'%08X'\n", fmin.ui); + fprintf(fd2, "Z'%08X'\n", fmax.ui); + fprintf(fd4, "Z'%08X'\n", imax.ui); +#else + fprintf(fd1, "Z%08X\n", fmin.ui); + fprintf(fd2, "Z%08X\n", fmax.ui); + fprintf(fd4, "Z%08X\n", imax.ui); +#endif +*/ + fprintf(fd1,"0x%08X\n",fmin.ui); + fprintf(fd2,"0x%08X\n",fmin.ui); + fprintf(fd4,"0x%08X\n",fmin.ui); + fprintf(fd3, "%12.5E\n", feps); + fclose(fd1); + fclose(fd2); + fclose(fd3); + fclose(fd4); + exit(0); +} +EOF + + REALMIN= + REALMAX= + REPSL= + INTMAX= + doit='$CC -o conftest ${CFLAGS-} ${EXTRA_CFLAGS-} $QFLAG conftest.c' + if AC_TRY_EVAL(doit); then + doit=`./conftest` + REALMIN=`cat fminval` + REALMAX=`cat fmaxval` + REPSL=`cat fepsval` + INTMAX=`cat imaxval` + AC_MSG_RESULT(REALMAX is ${REALMAX}) + AC_MSG_RESULT(REALMIN is ${REALMIN}) + AC_MSG_RESULT(EPSILON is ${REPSL}) + AC_MSG_RESULT(INTMAX is ${INTMAX}) + fi + AC_SUBST(REALMIN) + AC_SUBST(REALMAX) + AC_SUBST(REPSL) + AC_SUBST(INTMAX) + + rm -f conftest conftest.? fminval fmaxval fepsval imaxval +]) + +dnl +dnl Check the value CLOCKS_PER_SEC and CLK_TCK +dnl +AC_DEFUN(DCL_CHECK_CLOCK_VALUES, +[ + cat << EOF > conftest.c +#include +#include + +#ifndef CLOCKS_PER_SEC +# define CLK_PER_SEC 1000000 +#else +# define CLK_PER_SEC 0 +#endif +#ifndef CLK_TCK +# define CLK_RSL_TCK 60 +#else +# define CLK_RSL_TCK 0 +#endif + +main () +{ + FILE *fd1, *fd2; + + if ((fd1 = fopen("confval1", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file confval1\n"); + exit(1); + } + if ((fd2 = fopen("confval2", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file confval2\n"); + exit(1); + } + + fprintf(fd1, "%d", CLK_PER_SEC); + fprintf(fd2, "%d", CLK_RSL_TCK); + + fclose(fd1); + fclose(fd2); +} +EOF + + doit='$CC -o conftest ${CFLAGS-} conftest.c' + CLK_PER_SEC= + CLK_RSL_TCK= + if AC_TRY_EVAL(doit); then + doit=`./conftest` + cpsval=`cat confval1` + crtval=`cat confval2` + if test ${cpsval} != 0; then + CLK_PER_SEC=${cpsval} + AC_MSG_RESULT(CLOCKS_PER_SEC is ${CLK_PER_SEC}) + else + AC_MSG_RESULT(CLOCKS_PER_SEC is provided by the system) + fi + if test ${crtval} != 0; then + CLK_RSL_TCK=${crtval} + AC_MSG_RESULT(CLK_TCK is ${CLK_RSL_TCK}) + else + AC_MSG_RESULT(CLK_TCK is provided by the system) + fi + fi + AC_SUBST(CLK_PER_SEC) + AC_SUBST(CLK_RSL_TCK) + + rm -f conftest conftest.? confval? +]) + + +# Configure paths for GTK+ +# Owen Taylor 1997-2001 + +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, +dnl pass to pkg-config +dnl +AC_DEFUN(AM_PATH_GTK_2_0, +[dnl +dnl Get the cflags and libraries from pkg-config +dnl +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], + , enable_gtktest=yes) + + pkg_config_args=gtk+-2.0 + for module in . $4 + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity +dnl checks the results of pkg-config to some extent) +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + + + +dnl gdk-pixbuf-2.0 +AC_DEFUN(AM_PATH_GDK_PIXBUF_2_0, +[dnl + pkg_config_args=gdk-pixbuf-2.0 + + no_gdk_pixbuf="" + + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gdk_pixbuf=yes + PKG_CONFIG=no + fi + else + no_gdk_pixbuf=yes + fi + + min_gdk_pixbuf_version=ifelse([$1], ,2.0.0,$1) + AC_MSG_CHECKING(for GDK_PIXBU) + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GDK_PIXBUF found in PKG_CONFIG_PATH" + fi + + if $PKG_CONFIG --atleast-version $min_gdk_pixbuf_version $pkg_config_args; then + : + else + no_gdk_pixbuf=yes + fi + fi + + if test x"$no_gdk_pixbuf" = x ; then + gdk_pixbuf_config_major_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gdk_pixbuf_config_minor_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gdk_pixbuf_config_micro_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + fi + + if test x"$no_gdk_pixbuf" = x ; then + GDK_PIXBUF_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GDK_PIXBUF_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + AC_MSG_RESULT(yes (version $gdk_pixbuf_config_major_version.$gdk_pixbuf_config_minor_version.$gdk_pixbuf_config_micro_version)) + else + AC_MSG_RESULT(no) + fi + AC_SUBST(GDK_PIXBUF_CFLAGS) + AC_SUBST(GDK_PIXBUF_LIBS) +]) + + + +# Configure paths for GTK+ +# Owen Taylor 97-11-3 + +dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) +dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS +dnl +AC_DEFUN(AM_PATH_GTK, +[dnl +dnl Get the cflags and libraries from the gtk-config script +dnl +AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], + gtk_config_prefix="$withval", gtk_config_prefix="") +AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], + gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") +AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], + , enable_gtktest=yes) + + for module in . $4 + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + AC_PATH_PROG(GTK_CONFIG, gtk-config, no) + min_gtk_version=ifelse([$1], ,0.99.7,$1) + AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" +dnl +dnl Now check if the installed GTK is sufficiently new. (Also sanity +dnl checks the results of gtk-config to some extent +dnl + rm -f conf.gtktest + AC_TRY_RUN([ +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} +],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" ], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + rm -f conf.gtktest +]) + + +# Configure paths for IMLIB +# Frank Belew 98-8-31 +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +# Check for gdk-imlib +AC_DEFUN(AM_PATH_GDK_IMLIB, +[dnl +dnl Get the cflags and libraries from the imlib-config script +dnl +AC_ARG_WITH(imlib-prefix,[ --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional)], + imlib_prefix="$withval", imlib_prefix="") +AC_ARG_WITH(imlib-exec-prefix,[ --with-imlib-exec-prefix=PFX Exec prefix where IMLIB is installed (optional)], + imlib_exec_prefix="$withval", imlib_exec_prefix="") +AC_ARG_ENABLE(imlibtest, [ --disable-imlibtest Do not try to compile and run a test IMLIB program], + , enable_imlibtest=yes) + + if test x$imlib_exec_prefix != x ; then + imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix" + if test x${IMLIB_CONFIG+set} != xset ; then + IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config + fi + fi + if test x$imlib_prefix != x ; then + imlib_args="$imlib_args --prefix=$imlib_prefix" + if test x${IMLIB_CONFIG+set} != xset ; then + IMLIB_CONFIG=$imlib_prefix/bin/imlib-config + fi + fi + + AC_PATH_PROG(IMLIB_CONFIG, imlib-config, no) + min_imlib_version=ifelse([$1], ,1.8.2,$1) + AC_MSG_CHECKING(for IMLIB - version >= $min_imlib_version) + no_imlib="" + if test "$IMLIB_CONFIG" = "no" ; then + no_imlib=yes + else + GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk` + GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk` + + imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + if test "x$enable_imlibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + LIBS="$LIBS $GDK_IMLIB_LIBS" +dnl +dnl Now check if the installed IMLIB is sufficiently new. (Also sanity +dnl checks the results of imlib-config to some extent +dnl + rm -f conf.imlibtest + AC_TRY_RUN([ +#include +#include +#include + +int main () +{ + int major, minor; + char *tmp_version; + + system ("touch conf.gdkimlibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_imlib_version"); + if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { + printf("%s, bad version string\n", "$min_imlib_version"); + exit(1); + } + + if (($imlib_major_version > major) || + (($imlib_major_version == major) && ($imlib_minor_version >= minor))) + { + return 0; + } + else + { + printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version); + printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor); + printf("*** best to upgrade to the required version.\n"); + printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n"); + printf("*** to point to the correct copy of imlib-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_imlib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_imlib" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$IMLIB_CONFIG" = "no" ; then + echo "*** The imlib-config script installed by IMLIB could not be found" + echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the IMLIB_CONFIG environment variable to the" + echo "*** full path to imlib-config." + else + if test -f conf.gdkimlibtest ; then + : + else + echo "*** Could not run IMLIB test program, checking why..." + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + LIBS="$LIBS $GDK_IMLIB_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding IMLIB or finding the wrong" + echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means IMLIB was incorrectly installed" + echo "*** or that you have moved IMLIB since it was installed. In the latter case, you" + echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + IMLIB_CFLAGS="" + IMLIB_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GDK_IMLIB_CFLAGS) + AC_SUBST(GDK_IMLIB_LIBS) + rm -f conf.gdkimlibtest +]) diff -uNr dcl-5.2-C/bin/Makefile dcl-5.2-C-gtk2/bin/Makefile --- dcl-5.2-C/bin/Makefile 2002-01-08 17:47:01.000000000 +0900 +++ dcl-5.2-C-gtk2/bin/Makefile 2003-11-24 17:46:22.000000000 +0900 @@ -40,6 +40,7 @@ -e 's!@FFLAGS@!$(FFLAGS)!' \ -e 's!@LDFLAGS@!$(LDFLAGS)!' \ -e 's!@LDLIBS@!$(LDLIBS)!' \ + -e 's!@GTKVERSION@!$(GTKVERSION)!' \ dclconfig.org > $(CDCLCONFVER) @chmod +x $(CDCLCONFVER) # $(CP) $(CDCLCONFVER) $(CDCLCONFIG) diff -uNr dcl-5.2-C/bin/dclconfig.org dcl-5.2-C-gtk2/bin/dclconfig.org --- dcl-5.2-C/bin/dclconfig.org 2002-01-08 17:47:01.000000000 +0900 +++ dcl-5.2-C-gtk2/bin/dclconfig.org 2003-11-24 17:55:58.000000000 +0900 @@ -34,6 +34,8 @@ ldflags="@LDFLAGS@" ldlibs="@LDLIBS@" +gtkversion="@GTKVERSION@" + usage() { cat <&2 ;; diff -uNr dcl-5.2-C/config.h.in dcl-5.2-C-gtk2/config.h.in --- dcl-5.2-C/config.h.in 1970-01-01 09:00:00.000000000 +0900 +++ dcl-5.2-C-gtk2/config.h.in 2003-11-21 17:33:55.000000000 +0900 @@ -0,0 +1,10 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if you have the header file. */ +#undef HAVE_GTK_H + +/* Define if you have the header file. */ +#undef HAVE_GDK_PIXBUF_H + +/* Define if you have the header file. */ +#undef HAVE_GDK_IMLIB_H diff -uNr dcl-5.2-C/configure dcl-5.2-C-gtk2/configure --- dcl-5.2-C/configure 2002-01-08 17:48:07.000000000 +0900 +++ dcl-5.2-C-gtk2/configure 2004-01-22 18:41:52.000000000 +0900 @@ -1,30 +1,325 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.58. # +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + -# Defaults: -ac_help= +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-x use the X Window System" -ac_help="$ac_help - --with-oldsrc compile dcl source codes older than ver.5" +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="INSTALL" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP AWK SED RANLIB ac_ct_RANLIB FC SUNFC FFLAGS FLIBS X_INCLUDES X_LIBRARIES X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS OLDSRC OSGARG_OPT OSQARN_OPT CSGI_OPT PWD DCLDIR EGREP REALMIN REALMAX REPSL INTMAX CLK_PER_SEC CLK_RSL_TCK DCLVERSION DCLVERNUM DCLLANG GTKVERSION PKG_CONFIG GTK_CFLAGS GTK_LIBS GDK_PIXBUF_CFLAGS GDK_PIXBUF_LIBS GTK_CONFIG IMLIB_CONFIG GDK_IMLIB_CFLAGS GDK_IMLIB_LIBS LIBOBJS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -33,10 +328,15 @@ silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -50,16 +350,9 @@ infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -67,59 +360,59 @@ continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -128,95 +421,47 @@ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -225,19 +470,19 @@ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -251,26 +496,26 @@ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -287,7 +532,7 @@ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -297,7 +542,7 @@ ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -308,58 +553,57 @@ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -370,99 +614,110 @@ ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -exec 5>./config.log -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=INSTALL # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -472,13 +727,472 @@ fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-gtktest do not try to compile and run a test GTK+ program + --disable-gtktest Do not try to compile and run a test GTK program + --disable-imlibtest Do not try to compile and run a test IMLIB program + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-x use the X Window System + --with-oldsrc compile dcl source codes older than ver.5 + --with-gtk-prefix=PFX Prefix where GTK is installed (optional) + --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) + --with-imlib-prefix=PFX Prefix where IMLIB is installed (optional) + --with-imlib-exec-prefix=PFX Exec prefix where IMLIB is installed (optional) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +case "$ac_dir" in +.) ac_abs_builddir=$ac_builddir;; +*) + case $ac_builddir in + .) ac_abs_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; + *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.58. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -489,124 +1203,1163 @@ fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi -DCLVERSION=5.2 + + + + + + + + ac_config_headers="$ac_config_headers config.h" + + +DCLVERSION=5.2-C.3 DCLVERNUM=52 DCLLANG=C CFLAGS=${CFLAGS--O} FFLAGS=${FFLAGS--O} - - case "${CC-}" in - '') - case `uname` in - ULTRIX) - ccs='gcc cc' - ;; - *) - ccs='gcc xlc acc cc' - ;; - esac - for cc in $ccs; do - # Extract the first word of "$cc", so it can be a program name with args. -set dummy $cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:549: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$cc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - case "$CC" in +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + case "${CC-}" in + '') + case `uname` in + ULTRIX) + ccs='gcc cc' + ;; + *) + ccs='xlc acc cc gcc' + ;; + esac + for cc in $ccs; do + # Extract the first word of "$cc", so it can be a program name with args. +set dummy $cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + case "$CC" in '') ;; *) break;; esac done case "${CC-}" in '') - { echo "configure: error: "Could not find C compiler"" 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: \"Could not find C compiler\"" >&5 +echo "$as_me: error: \"Could not find C compiler\"" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; *) - echo "checking user-defined C compiler \"$CC\"" 1>&6 -echo "configure:587: checking user-defined C compiler \"$CC\"" >&5 + { echo "$as_me:$LINENO: checking user-defined C compiler \"$CC\"..." >&5 +echo "$as_me: checking user-defined C compiler \"$CC\"..." >&6;} ;; esac - echo $ac_n "checking C compiler""... $ac_c" 1>&6 -echo "configure:591: checking C compiler" >&5 - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking C compiler... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ -; return 0; } -EOF -if { (eval echo configure:600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""works" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - { echo "configure: error: $CC failed to compile test program" 1>&2; exit 1; } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: works" >&5 +echo "${ECHO_T}works" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: $CC failed to compile test program" >&5 +echo "$as_me: error: $CC failed to compile test program" >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest* - +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + case "$CC" in *gcc*) GCC=yes # Expected by autoconf(1) macros @@ -626,102 +2379,283 @@ esac ;; esac - -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:633: checking how to run the C preprocessor" >&5 + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi - CPP="$ac_cv_prog_CPP" +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue else - ac_cv_prog_CPP="$CPP" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break fi -echo "$ac_t""$CPP" 1>&6 +rm -f conftest.err conftest.$ac_ext +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi - awk="mawk gawk jgawk nawk awk" - for prog in $awk + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + awk="mawk gawk jgawk nawk awk" + for prog in $awk do # Extract the first word of "$prog", so it can be a program name with args. set dummy $prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:700: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_AWK'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$AWK" in - /*) + case $AWK in + [\\/]* | ?:[\\/]*) ac_cv_path_AWK="$AWK" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_AWK="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -AWK="$ac_cv_path_AWK" +AWK=$ac_cv_path_AWK + if test -n "$AWK"; then - echo "$ac_t""$AWK" 1>&6 + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi case "${AWK-}" in @@ -733,11 +2667,12 @@ done case "${AWK-}" in '') - echo "configure: warning: Could not find awk program" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not find awk program" >&5 +echo "$as_me: WARNING: Could not find awk program" >&2;} AWK= ;; esac - + sed="gsed sed" @@ -745,30 +2680,37 @@ do # Extract the first word of "$prog", so it can be a program name with args. set dummy $prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:750: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$SED"; then ac_cv_prog_SED="$SED" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_SED="$prog" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_SED="$prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -SED="$ac_cv_prog_SED" +SED=$ac_cv_prog_SED if test -n "$SED"; then - echo "$ac_t""$SED" 1>&6 + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi case "${SED-}" in @@ -780,39 +2722,91 @@ done case "${SED-}" in '') - echo "configure: warning: Could not find sed program" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not find sed program" >&5 +echo "$as_me: WARNING: Could not find sed program" >&2;} SED= ;; esac - -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:793: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" fi @@ -874,20 +2868,27 @@ set) case "$FC" in '') - echo "configure: warning: no FORTRAN compiler" 1>&2 + { echo "$as_me:$LINENO: WARNING: no FORTRAN compiler" >&5 +echo "$as_me: WARNING: no FORTRAN compiler" >&2;} ;; *) - echo $ac_n "checking user-defined FORTRAN compiler \"$FC\"""... $ac_c" 1>&6 -echo "configure:882: checking user-defined FORTRAN compiler \"$FC\"" >&5 + echo "$as_me:$LINENO: checking user-defined FORTRAN compiler \"$FC\"" >&5 +echo $ECHO_N "checking user-defined FORTRAN compiler \"$FC\"... $ECHO_C" >&6 cat << EOF > conftest.f CALL FOO END EOF doit='$FC -c ${FFLAGS-} conftest.f' - if { (eval echo configure:888: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - echo "$ac_t""works" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: works" >&5 +echo "${ECHO_T}works" >&6 else - echo "configure: warning: $FC failed to compile test program" 1>&2 + { echo "$as_me:$LINENO: WARNING: $FC failed to compile test program" >&5 +echo "$as_me: WARNING: $FC failed to compile test program" >&2;} FC= fi rm -f conftest.* @@ -898,30 +2899,37 @@ for fc in $forts; do # Extract the first word of "$fc", so it can be a program name with args. set dummy $fc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:903: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_FC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_FC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_FC="$fc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FC="$fc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + fi fi -FC="$ac_cv_prog_FC" +FC=$ac_cv_prog_FC if test -n "$FC"; then - echo "$ac_t""$FC" 1>&6 + echo "$as_me:$LINENO: result: $FC" >&5 +echo "${ECHO_T}$FC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi case "${FC-}" in @@ -933,10 +2941,15 @@ END EOF doit='$FC -c ${FFLAGS-} conftest.f' - if { (eval echo configure:937: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then break else - echo "configure: warning: $FC failed to compile test program" 1>&2 + { echo "$as_me:$LINENO: WARNING: $FC failed to compile test program" >&5 +echo "$as_me: WARNING: $FC failed to compile test program" >&2;} unset FC unset ac_cv_prog_FC fi @@ -946,7 +2959,8 @@ rm -f conftest.* case "${FC-}" in '') - echo "configure: warning: Could not find working FORTRAN compiler" 1>&2 + { echo "$as_me:$LINENO: WARNING: Could not find working FORTRAN compiler" >&5 +echo "$as_me: WARNING: Could not find working FORTRAN compiler" >&2;} FC= ;; esac @@ -956,33 +2970,41 @@ if test ${SUNF} = yes && test "${FC}" = "f90"; then # Extract the first word of ""f90"", so it can be a program name with args. set dummy "f90"; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:961: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_SUNFC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SUNFC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$SUNFC" in - /*) + case $SUNFC in + [\\/]* | ?:[\\/]*) ac_cv_path_SUNFC="$SUNFC" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_SUNFC="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SUNFC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -SUNFC="$ac_cv_path_SUNFC" +SUNFC=$ac_cv_path_SUNFC + if test -n "$SUNFC"; then - echo "$ac_t""$SUNFC" 1>&6 + echo "$as_me:$LINENO: result: $SUNFC" >&5 +echo "${ECHO_T}$SUNFC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi flibdir=`dirname ${SUNFC}` @@ -990,27 +3012,24 @@ FLIBS="${FLIBS-} -R"$flibdir fi - - - -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1007: checking for X" >&5 + + + + +echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6 + # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" - : -fi +fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. @@ -1020,207 +3039,210 @@ # Both variables are already set. have_x=yes else -if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. -ac_x_includes=NO ac_x_libraries=NO -rm -fr conftestdir -if mkdir conftestdir; then - cd conftestdir +ac_x_includes=no ac_x_libraries=no +rm -fr conftest.dir +if mkdir conftest.dir; then + cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. - cat > Imakefile <<'EOF' + cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' -EOF +_ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && - test -f $ac_im_libdir/libX11.$ac_extension; then - ac_im_usrlibdir=$ac_im_libdir; break + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. - case "$ac_im_incroot" in + case $ac_im_incroot in /usr/include) ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac - case "$ac_im_usrlibdir" in + case $ac_im_usrlibdir in /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. - rm -fr conftestdir + rm -fr conftest.dir fi -if test "$ac_x_includes" = NO; then - # Guess where to find include files, by looking for this one X11 .h file. - test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. -cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - # Look for the header file in a standard set of common directories. -# Check X11 before X11Rn because it is often a symlink to the current release. - for ac_dir in \ - /usr/X11/include \ - /usr/X11R6/include \ - /usr/X11R5/include \ - /usr/X11R4/include \ - \ - /usr/include/X11 \ - /usr/include/X11R6 \ - /usr/include/X11R5 \ - /usr/include/X11R4 \ - \ - /usr/local/X11/include \ - /usr/local/X11R6/include \ - /usr/local/X11R5/include \ - /usr/local/X11R4/include \ - \ - /usr/local/include/X11 \ - /usr/local/include/X11R6 \ - /usr/local/include/X11R5 \ - /usr/local/include/X11R4 \ - \ - /usr/X386/include \ - /usr/x386/include \ - /usr/XFree86/include/X11 \ - \ - /usr/include \ - /usr/local/include \ - /usr/unsupported/include \ - /usr/athena/include \ - /usr/local/x11r5/include \ - /usr/lpp/Xamples/include \ - \ - /usr/openwin/include \ - /usr/openwin/share/include \ - ; \ - do - if test -r "$ac_dir/$x_direct_test_include"; then - ac_x_includes=$ac_dir - break - fi - done + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Intrinsic.h"; then + ac_x_includes=$ac_dir + break + fi +done fi -rm -f conftest* -fi # $ac_x_includes = NO +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no -if test "$ac_x_libraries" = NO; then +if test "$ac_x_libraries" = no; then # Check for the libraries. - - test -z "$x_direct_test_library" && x_direct_test_library=Xt - test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc - # See if we find them without any special options. # Don't add to $LIBS permanently. - ac_save_LIBS="$LIBS" - LIBS="-l$x_direct_test_library $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - LIBS="$ac_save_LIBS" + ac_save_LIBS=$LIBS + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +XtMalloc (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - LIBS="$ac_save_LIBS" -# First see if replacing the include by lib works. -# Check X11 before X11Rn because it is often a symlink to the current release. -for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ - /usr/X11/lib \ - /usr/X11R6/lib \ - /usr/X11R5/lib \ - /usr/X11R4/lib \ - \ - /usr/lib/X11 \ - /usr/lib/X11R6 \ - /usr/lib/X11R5 \ - /usr/lib/X11R4 \ - \ - /usr/local/X11/lib \ - /usr/local/X11R6/lib \ - /usr/local/X11R5/lib \ - /usr/local/X11R4/lib \ - \ - /usr/local/lib/X11 \ - /usr/local/lib/X11R6 \ - /usr/local/lib/X11R5 \ - /usr/local/lib/X11R4 \ - \ - /usr/X386/lib \ - /usr/x386/lib \ - /usr/XFree86/lib/X11 \ - \ - /usr/lib \ - /usr/local/lib \ - /usr/unsupported/lib \ - /usr/athena/lib \ - /usr/local/x11r5/lib \ - /usr/lpp/Xamples/lib \ - /lib/usr/lib/X11 \ - \ - /usr/openwin/lib \ - /usr/openwin/share/lib \ - ; \ + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do + # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi -rm -f conftest* -fi # $ac_x_libraries = NO +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no -if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then +if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ - ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi + fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then - echo "$ac_t""$have_x" 1>&6 + echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. @@ -1229,26 +3251,28 @@ # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" - echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then - X_INCLUDES= X_LIBRARIES= + X_INCLUDES= X_LIBRARIES= else if test -n "$x_includes"; then X_INCLUDES="-I$x_includes" fi X_LIBRARIES="-lX11" - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define X11 1 -EOF +_ACEOF fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 -EOF +_ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -1261,60 +3285,119 @@ X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in + case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1268: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ -; return 0; } -EOF -if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_R_nospace=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_nospace=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_R_nospace=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { +int +main () +{ -; return 0; } -EOF -if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_R_space=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_R_space=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else - echo "$ac_t""neither works" 1>&6 + echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6 fi fi - LIBS="$ac_xsave_LIBS" + LIBS=$ac_xsave_LIBS esac fi @@ -1325,527 +3408,1022 @@ if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1333: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldnet $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dnet_ntoa(); + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -dnet_ntoa() -; return 0; } -EOF -if { (eval echo configure:1352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1374: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dnet_ntoa(); - -int main() { -dnet_ntoa() -; return 0; } -EOF -if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dnet_stub_dnet_ntoa=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 fi fi +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1422: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#ifdef __STDC__ +# include +#else +# include +#endif +#undef gethostbyname + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else -gethostbyname(); +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != gethostbyname; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +ac_cv_func_gethostbyname=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1471: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname(); - -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -else - echo "$ac_t""no" 1>&6 + if test $ac_cv_lib_nsl_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_bsd_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi + fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1520: checking for connect" >&5 -if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -int main() { +#undef connect +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else -connect(); +char (*f) () = connect; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_connect=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_connect=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != connect; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +ac_cv_func_connect=no fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then - echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1569: checking for connect in -lsocket" >&5 -ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); - -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -else - echo "$ac_t""no" 1>&6 fi fi - # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. - echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1612: checking for remove" >&5 -if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6 +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -int main() { +#undef remove +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else -remove(); +char (*f) () = remove; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_remove=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_remove=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != remove; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +ac_cv_func_remove=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1661: checking for remove in -lposix" >&5 -ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); - -int main() { -remove() -; return 0; } -EOF -if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char remove (); +int +main () +{ +remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_posix_remove=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -else - echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1704: checking for shmat" >&5 -if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6 +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shmat(); + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ -int main() { +#ifdef __STDC__ +# include +#else +# include +#endif +#undef shmat + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else -shmat(); +char (*f) () = shmat; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_shmat=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_shmat=no" -fi -rm -f conftest* -fi +int +main () +{ +return f != shmat; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 +ac_cv_func_shmat=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then - echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1753: checking for shmat in -lipc" >&5 -ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char shmat(); - -int main() { -shmat() -; return 0; } -EOF -if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char shmat (); +int +main () +{ +shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ipc_shmat=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -else - echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS="$LDFLAGS" + ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. - # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1805: checking for IceConnectionNumber in -lICE" >&5 -ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lICE $LIBS" -cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char IceConnectionNumber(); - -int main() { -IceConnectionNumber() -; return 0; } -EOF -if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 + builtin and then its argument prototype would still apply. */ +char IceConnectionNumber (); +int +main () +{ +IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ICE_IceConnectionNumber=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -else - echo "$ac_t""no" 1>&6 fi - LDFLAGS="$ac_save_LDFLAGS" + LDFLAGS=$ac_save_LDFLAGS fi + # Check whether --with-oldsrc or --without-oldsrc was given. if test "${with_oldsrc+set}" = set; then withval="$with_oldsrc" @@ -1854,8 +4432,7 @@ else OLDSRC= -fi - +fi; cat << EOF > conftest.f PROGRAM MAIN @@ -1866,13 +4443,19 @@ END EOF doit='${FC-} ${FFLAGS-} conftest.f > /dev/null 2>&1' - echo $ac_n "checking Fortran service routine getarg()""... $ac_c" 1>&6 -echo "configure:1871: checking Fortran service routine getarg()" >&5 - if { (eval echo configure:1872: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - echo "$ac_t""works" 1>&6 + echo "$as_me:$LINENO: checking Fortran service routine getarg()" >&5 +echo $ECHO_N "checking Fortran service routine getarg()... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: works" >&5 +echo "${ECHO_T}works" >&6 OSGARG_OPT=getarg else - echo "configure: warning: getarg() is not available" 1>&2 + { echo "$as_me:$LINENO: WARNING: getarg() is not available" >&5 +echo "$as_me: WARNING: getarg() is not available" >&2;} OSGARG_OPT=dummy fi rm -f conftest.* a.out @@ -1885,19 +4468,25 @@ END EOF doit='${FC-} ${FFLAGS-} conftest.f > /dev/null 2>&1' - echo $ac_n "checking Fortran service routine iargc()""... $ac_c" 1>&6 -echo "configure:1890: checking Fortran service routine iargc()" >&5 - if { (eval echo configure:1891: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - echo "$ac_t""works" 1>&6 + echo "$as_me:$LINENO: checking Fortran service routine iargc()" >&5 +echo $ECHO_N "checking Fortran service routine iargc()... $ECHO_C" >&6 + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: works" >&5 +echo "${ECHO_T}works" >&6 OSQARN_OPT=iargc else - echo "configure: warning: Service routine iargc() is not available" 1>&2 + { echo "$as_me:$LINENO: WARNING: Service routine iargc() is not available" >&5 +echo "$as_me: WARNING: Service routine iargc() is not available" >&2;} OSQARN_OPT=dummy fi rm -f conftest.* a.out - - + + @@ -1905,201 +4494,76 @@ print*,ichar('a') end EOF - echo $ac_n "checking Character code set csgi()/isgc()""... $ac_c" 1>&6 -echo "configure:1910: checking Character code set csgi()/isgc()" >&5 + echo "$as_me:$LINENO: checking Character code set csgi()/isgc()" >&5 +echo $ECHO_N "checking Character code set csgi()/isgc()... $ECHO_C" >&6 ${FC-} -o conftest conftest.f > /dev/null 2>&1 ia=`./conftest` if test $ia -gt 0; then CSGI_OPT=general - echo "$ac_t""general" 1>&6 + echo "$as_me:$LINENO: result: general" >&5 +echo "${ECHO_T}general" >&6 else CSGI_OPT=other - echo "$ac_t""other" 1>&6 + echo "$as_me:$LINENO: result: other" >&5 +echo "${ECHO_T}other" >&6 fi rm -f conftest conftest.? - + # Extract the first word of "pwd", so it can be a program name with args. set dummy pwd; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1928: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_PWD'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PWD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - case "$PWD" in - /*) + case $PWD in + [\\/]* | ?:[\\/]*) ac_cv_path_PWD="$PWD" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_PWD="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PWD="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + ;; esac fi -PWD="$ac_cv_path_PWD" +PWD=$ac_cv_path_PWD + if test -n "$PWD"; then - echo "$ac_t""$PWD" 1>&6 + echo "$as_me:$LINENO: result: $PWD" >&5 +echo "${ECHO_T}$PWD" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi case "${PWD-}" in '') - echo "configure: warning: *** WARN *** Please set environment variable DCLDIR by yourself" 1>&2 + { echo "$as_me:$LINENO: WARNING: *** WARN *** Please set environment variable DCLDIR by yourself" >&5 +echo "$as_me: WARNING: *** WARN *** Please set environment variable DCLDIR by yourself" >&2;} DCLDIR= ;; *) DCLDIR=${PWD-} esac - - - - case "$FC" in - '') ;; - *) - echo $ac_n "checking for C-equivalent to Fortran routine \"SUB\"""... $ac_c" 1>&6 -echo "configure:1975: checking for C-equivalent to Fortran routine \"SUB\"" >&5 - cat >conftest.f <<\EOF - call sub() - end -EOF - doit='$FC -c ${FFLAGS} conftest.f' - if { (eval echo configure:1981: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - FCALLSCSUB=`nm conftest.o | awk ' - /SUB_/{print "SUB_";exit} - /SUB/ {print "SUB"; exit} - /sub_/{print "sub_";exit} - /sub/ {print "sub"; exit}'` - case "$FCALLSCSUB" in - '') { echo "configure: error: not found" 1>&2; exit 1; } - ;; - *) echo "$ac_t""$FCALLSCSUB" 1>&6 - ;; - esac - else - { echo "configure: error: Could not compile conftest.f" 1>&2; exit 1; } - fi - rm -f conftest* - ;; - esac - - - - case "$FC" in - '') - ;; - *) - - - - cat >conftestf.f <&6 -echo "configure:2017: checking if Fortran \"integer\" is C \"$ctype\"" >&5 - cat >conftest.c <&5; (eval $doit) 2>&5; }; then - doit='$FC ${FFLAGS} -c conftestf.f' - if { (eval echo configure:2028: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - doit='$FC -o conftest ${FFLAGS} ${FLDFLAGS} conftestf.o conftest.o ${LIBS}' - if { (eval echo configure:2030: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - doit=./conftest - if { (eval echo configure:2032: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <&6 - fi - else - { echo "configure: error: Could not link conftestf.o and conftest.o" 1>&2; exit 1; } - fi - else - { echo "configure: error: Could not compile conftestf.f" 1>&2; exit 1; } - fi - else - { echo "configure: error: Could not compile conftest.c" 1>&2; exit 1; } - fi - done - rm -f conftest* - - - cat >conftestf.f <&6 -echo "configure:2063: checking if Fortran \"real\" is C \"$ctype\"" >&5 - cat >conftest.c <&5; (eval $doit) 2>&5; }; then - doit='$FC ${FFLAGS} -c conftestf.f' - if { (eval echo configure:2074: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - doit='$FC -o conftest ${FFLAGS} ${FLDFLAGS} conftestf.o conftest.o ${LIBS}' - if { (eval echo configure:2076: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - doit=./conftest - if { (eval echo configure:2078: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <&6 - fi - else - { echo "configure: error: Could not link conftestf.o and conftest.o" 1>&2; exit 1; } - fi - else - { echo "configure: error: Could not compile conftestf.f" 1>&2; exit 1; } - fi - else - { echo "configure: error: Could not compile conftest.c" 1>&2; exit 1; } - fi - done - rm -f conftest* - - ;; - esac - - cat << EOF > conftest1.f INTEGER I DATA I /Z'7FFFFFFF'/ @@ -2113,49 +4577,421 @@ doit1='$FC -o conftest1 ${FFLAGS-} conftest1.f' doit2='$FC -o conftest2 ${FFLAGS-} conftest2.f' - if { (eval echo configure:2117: \"$doit1\") 1>&5; (eval $doit1) 2>&5; }; then - echo "$ac_t""hexadecimal number requires quotation" 1>&6 + if { (eval echo "$as_me:$LINENO: \"$doit1\"") >&5 + (eval $doit1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: hexadecimal number requires quotation" >&5 +echo "${ECHO_T}hexadecimal number requires quotation" >&6 QFLAG=-DQUOTE - elif { (eval echo configure:2120: \"$doit2\") 1>&5; (eval $doit2) 2>&5; }; then - echo "$ac_t""hexadecimal number requires no quotation" 1>&6 + elif { (eval echo "$as_me:$LINENO: \"$doit2\"") >&5 + (eval $doit2) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + echo "$as_me:$LINENO: result: hexadecimal number requires no quotation" >&5 +echo "${ECHO_T}hexadecimal number requires no quotation" >&6 QFLAG= fi rm -f conftest? conftest?.? - - - ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for float.h""... $ac_c" 1>&6 -echo "configure:2130: checking for float.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no fi rm -f conftest* + fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - EXTRA_CFLAGS=-DHAVE_FLOAT_H + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : else - echo "$ac_t""no" 1>&6 + ac_cv_header_stdc=no fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + if test "${ac_cv_header_float_h+set}" = set; then + echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +if test "${ac_cv_header_float_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking float.h usability" >&5 +echo $ECHO_N "checking float.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking float.h presence" >&5 +echo $ECHO_N "checking float.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for float.h" >&5 +echo $ECHO_N "checking for float.h... $ECHO_C" >&6 +if test "${ac_cv_header_float_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_float_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5 +echo "${ECHO_T}$ac_cv_header_float_h" >&6 + +fi +if test $ac_cv_header_float_h = yes; then + EXTRA_CFLAGS=-DHAVE_FLOAT_H +fi + cat << EOF > conftest.c @@ -2233,9 +5069,9 @@ fprintf(fd4, "Z%08X\n", imax.ui); #endif */ - fprintf(fd1,"0x%08X\n",fmin.ui); - fprintf(fd2,"0x%08X\n",fmin.ui); - fprintf(fd4,"0x%08X\n",fmin.ui); + fprintf(fd1,"0x%08X\n",fmin.ui); + fprintf(fd2,"0x%08X\n",fmin.ui); + fprintf(fd4,"0x%08X\n",fmin.ui); fprintf(fd3, "%12.5E\n", feps); fclose(fd1); fclose(fd2); @@ -2250,21 +5086,29 @@ REPSL= INTMAX= doit='$CC -o conftest ${CFLAGS-} ${EXTRA_CFLAGS-} $QFLAG conftest.c' - if { (eval echo configure:2249: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then doit=`./conftest` REALMIN=`cat fminval` REALMAX=`cat fmaxval` REPSL=`cat fepsval` INTMAX=`cat imaxval` - echo "$ac_t""REALMAX is ${REALMAX}" 1>&6 - echo "$ac_t""REALMIN is ${REALMIN}" 1>&6 - echo "$ac_t""EPSILON is ${REPSL}" 1>&6 - echo "$ac_t""INTMAX is ${INTMAX}" 1>&6 - fi - - - - + echo "$as_me:$LINENO: result: REALMAX is ${REALMAX}" >&5 +echo "${ECHO_T}REALMAX is ${REALMAX}" >&6 + echo "$as_me:$LINENO: result: REALMIN is ${REALMIN}" >&5 +echo "${ECHO_T}REALMIN is ${REALMIN}" >&6 + echo "$as_me:$LINENO: result: EPSILON is ${REPSL}" >&5 +echo "${ECHO_T}EPSILON is ${REPSL}" >&6 + echo "$as_me:$LINENO: result: INTMAX is ${INTMAX}" >&5 +echo "${ECHO_T}INTMAX is ${INTMAX}" >&6 + fi + + + + rm -f conftest conftest.? fminval fmaxval fepsval imaxval @@ -2288,447 +5132,2803 @@ { FILE *fd1, *fd2; - if ((fd1 = fopen("confval1", "w")) == NULL) { - fprintf(stderr, "conftest: cannot open file confval1\n"); - exit(1); + if ((fd1 = fopen("confval1", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file confval1\n"); + exit(1); + } + if ((fd2 = fopen("confval2", "w")) == NULL) { + fprintf(stderr, "conftest: cannot open file confval2\n"); + exit(1); + } + + fprintf(fd1, "%d", CLK_PER_SEC); + fprintf(fd2, "%d", CLK_RSL_TCK); + + fclose(fd1); + fclose(fd2); +} +EOF + + doit='$CC -o conftest ${CFLAGS-} conftest.c' + CLK_PER_SEC= + CLK_RSL_TCK= + if { (eval echo "$as_me:$LINENO: \"$doit\"") >&5 + (eval $doit) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + doit=`./conftest` + cpsval=`cat confval1` + crtval=`cat confval2` + if test ${cpsval} != 0; then + CLK_PER_SEC=${cpsval} + echo "$as_me:$LINENO: result: CLOCKS_PER_SEC is ${CLK_PER_SEC}" >&5 +echo "${ECHO_T}CLOCKS_PER_SEC is ${CLK_PER_SEC}" >&6 + else + echo "$as_me:$LINENO: result: CLOCKS_PER_SEC is provided by the system" >&5 +echo "${ECHO_T}CLOCKS_PER_SEC is provided by the system" >&6 + fi + if test ${crtval} != 0; then + CLK_RSL_TCK=${crtval} + echo "$as_me:$LINENO: result: CLK_TCK is ${CLK_RSL_TCK}" >&5 +echo "${ECHO_T}CLK_TCK is ${CLK_RSL_TCK}" >&6 + else + echo "$as_me:$LINENO: result: CLK_TCK is provided by the system" >&5 +echo "${ECHO_T}CLK_TCK is provided by the system" >&6 + fi + fi + + + + rm -f conftest conftest.? confval? + + + + + + + +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + +else + enable_gtktest=yes +fi; + + pkg_config_args=gtk+-2.0 + for module in . + do + case "$module" in + gthread) + pkg_config_args="$pkg_config_args gthread-2.0" + ;; + esac + done + + no_gtk="" + + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gtk=yes + PKG_CONFIG=no + fi + else + no_gtk=yes + fi + + min_gtk_version=2.0.0 + echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5 +echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH" + enable_gtktest=no + fi + + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then + : + else + no_gtk=yes + fi + fi + + if test x"$no_gtk" = x ; then + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If pkg-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); + printf("*** to point to the correct configuration files\n"); + } + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n"); + printf("*** correct copy of pkg-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_gtk=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5 +echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6 + : + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + if test "$PKG_CONFIG" = "no" ; then + echo "*** A new enough version of pkg-config was not found." + echo "*** See http://pkgconfig.sourceforge.net" + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK+ test program, checking why..." + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK+ or finding the wrong" + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed." +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + : + fi + + + rm -f conf.gtktest + + +if test x"$no_gtk" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GTK_CFLAGS" + if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 +echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6 +if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 +echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking gtk/gtk.h usability" >&5 +echo $ECHO_N "checking gtk/gtk.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking gtk/gtk.h presence" >&5 +echo $ECHO_N "checking gtk/gtk.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: gtk/gtk.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: gtk/gtk.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 +echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6 +if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_gtk_gtk_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 +echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6 + +fi +if test $ac_cv_header_gtk_gtk_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK_H 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h is not found." >&5 +echo "$as_me: WARNING: gtk/gtk.h is not found." >&2;} +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" + GTKVERSION="2" + + pkg_config_args=gdk-pixbuf-2.0 + + no_gdk_pixbuf="" + + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test x$PKG_CONFIG != xno ; then + if pkg-config --atleast-pkgconfig-version 0.7 ; then + : + else + echo *** pkg-config too old; version 0.7 or better required. + no_gdk_pixbuf=yes + PKG_CONFIG=no + fi + else + no_gdk_pixbuf=yes + fi + + min_gdk_pixbuf_version=2.0.0 + echo "$as_me:$LINENO: checking for GDK_PIXBU" >&5 +echo $ECHO_N "checking for GDK_PIXBU... $ECHO_C" >&6 + + if test x$PKG_CONFIG != xno ; then + ## don't try to run the test against uninstalled libtool libs + if $PKG_CONFIG --uninstalled $pkg_config_args; then + echo "Will use uninstalled version of GDK_PIXBUF found in PKG_CONFIG_PATH" + fi + + if $PKG_CONFIG --atleast-version $min_gdk_pixbuf_version $pkg_config_args; then + : + else + no_gdk_pixbuf=yes + fi + fi + + if test x"$no_gdk_pixbuf" = x ; then + gdk_pixbuf_config_major_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gdk_pixbuf_config_minor_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gdk_pixbuf_config_micro_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0 | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + fi + + if test x"$no_gdk_pixbuf" = x ; then + GDK_PIXBUF_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags` + GDK_PIXBUF_LIBS=`$PKG_CONFIG $pkg_config_args --libs` + echo "$as_me:$LINENO: result: yes (version $gdk_pixbuf_config_major_version.$gdk_pixbuf_config_minor_version.$gdk_pixbuf_config_micro_version)" >&5 +echo "${ECHO_T}yes (version $gdk_pixbuf_config_major_version.$gdk_pixbuf_config_minor_version.$gdk_pixbuf_config_micro_version)" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + + if test x"$no_gdk_pixbuf" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GDK_PIXBUF_CFLAGS" + if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then + echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5 +echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6 +if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5 +echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h usability" >&5 +echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking gdk-pixbuf/gdk-pixbuf.h presence" >&5 +echo $ECHO_N "checking gdk-pixbuf/gdk-pixbuf.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for gdk-pixbuf/gdk-pixbuf.h" >&5 +echo $ECHO_N "checking for gdk-pixbuf/gdk-pixbuf.h... $ECHO_C" >&6 +if test "${ac_cv_header_gdk_pixbuf_gdk_pixbuf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_gdk_pixbuf_gdk_pixbuf_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&5 +echo "${ECHO_T}$ac_cv_header_gdk_pixbuf_gdk_pixbuf_h" >&6 + +fi +if test $ac_cv_header_gdk_pixbuf_gdk_pixbuf_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_GDK_PIXBUF_H 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: gdk-pixbuf/gdk-pixbuf.h is not found." >&5 +echo "$as_me: WARNING: gdk-pixbuf/gdk-pixbuf.h is not found." >&2;} +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" + GTK_CFLAGS="$GTK_CFLAGS $GDK_PIXBUF_CFLAGS" + GTK_LIBS="$GTK_LIBS $GDK_PIXBUF_LIBS" + fi + +else + +# Check whether --with-gtk-prefix or --without-gtk-prefix was given. +if test "${with_gtk_prefix+set}" = set; then + withval="$with_gtk_prefix" + gtk_config_prefix="$withval" +else + gtk_config_prefix="" +fi; + +# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given. +if test "${with_gtk_exec_prefix+set}" = set; then + withval="$with_gtk_exec_prefix" + gtk_config_exec_prefix="$withval" +else + gtk_config_exec_prefix="" +fi; +# Check whether --enable-gtktest or --disable-gtktest was given. +if test "${enable_gtktest+set}" = set; then + enableval="$enable_gtktest" + +else + enable_gtktest=yes +fi; + + for module in . + do + case "$module" in + gthread) + gtk_config_args="$gtk_config_args gthread" + ;; + esac + done + + if test x$gtk_config_exec_prefix != x ; then + gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config + fi + fi + if test x$gtk_config_prefix != x ; then + gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" + if test x${GTK_CONFIG+set} != xset ; then + GTK_CONFIG=$gtk_config_prefix/bin/gtk-config + fi + fi + + # Extract the first word of "gtk-config", so it can be a program name with args. +set dummy gtk-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GTK_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GTK_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" + ;; +esac +fi +GTK_CONFIG=$ac_cv_path_GTK_CONFIG + +if test -n "$GTK_CONFIG"; then + echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 +echo "${ECHO_T}$GTK_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + min_gtk_version=0.99.7 + echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 +echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6 + no_gtk="" + if test "$GTK_CONFIG" = "no" ; then + no_gtk=yes + else + GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` + GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` + gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test "x$enable_gtktest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + rm -f conf.gtktest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +int +main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.gtktest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_gtk_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_gtk_version"); + exit(1); + } + + if ((gtk_major_version != $gtk_config_major_version) || + (gtk_minor_version != $gtk_config_minor_version) || + (gtk_micro_version != $gtk_config_micro_version)) + { + printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", + $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf ("*** was found! If gtk-config was correct, then it is best\n"); + printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); + printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); + printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } +#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) + else if ((gtk_major_version != GTK_MAJOR_VERSION) || + (gtk_minor_version != GTK_MINOR_VERSION) || + (gtk_micro_version != GTK_MICRO_VERSION)) + { + printf("*** GTK+ header files (version %d.%d.%d) do not match\n", + GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); + printf("*** library (version %d.%d.%d)\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + } +#endif /* defined (GTK_MAJOR_VERSION) ... */ + else + { + if ((gtk_major_version > major) || + ((gtk_major_version == major) && (gtk_minor_version > minor)) || + ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", + gtk_major_version, gtk_minor_version, gtk_micro_version); + printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", + major, minor, micro); + printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); + printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); + printf("*** correct copy of gtk-config. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } + } + return 1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_gtk=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_gtk" = x ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + : + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + if test "$GTK_CONFIG" = "no" ; then + echo "*** The gtk-config script installed by GTK could not be found" + echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the GTK_CONFIG environment variable to the" + echo "*** full path to gtk-config." + else + if test -f conf.gtktest ; then + : + else + echo "*** Could not run GTK test program, checking why..." + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$LIBS $GTK_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding GTK or finding the wrong" + echo "*** version of GTK. If it is not finding GTK, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" + echo "***" + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" + echo "*** came with the system with the command" + echo "***" + echo "*** rpm --erase --nodeps gtk gtk-devel" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means GTK was incorrectly installed" + echo "*** or that you have moved GTK since it was installed. In the latter case, you" + echo "*** may want to edit the gtk-config script: $GTK_CONFIG" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + GTK_CFLAGS="" + GTK_LIBS="" + : + fi + + + rm -f conf.gtktest + + if test x"$no_gtk" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GTK_CFLAGS" + if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 +echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6 +if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 +echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking gtk/gtk.h usability" >&5 +echo $ECHO_N "checking gtk/gtk.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking gtk/gtk.h presence" >&5 +echo $ECHO_N "checking gtk/gtk.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: gtk/gtk.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: gtk/gtk.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: gtk/gtk.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: gtk/gtk.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: gtk/gtk.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: gtk/gtk.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: gtk/gtk.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: gtk/gtk.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for gtk/gtk.h" >&5 +echo $ECHO_N "checking for gtk/gtk.h... $ECHO_C" >&6 +if test "${ac_cv_header_gtk_gtk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_gtk_gtk_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gtk_gtk_h" >&5 +echo "${ECHO_T}$ac_cv_header_gtk_gtk_h" >&6 + +fi +if test $ac_cv_header_gtk_gtk_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK_H 1 +_ACEOF + +else + { echo "$as_me:$LINENO: WARNING: gtk/gtk.h is not found." >&5 +echo "$as_me: WARNING: gtk/gtk.h is not found." >&2;} +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" + GTKVERSION="1" + + +# Check whether --with-imlib-prefix or --without-imlib-prefix was given. +if test "${with_imlib_prefix+set}" = set; then + withval="$with_imlib_prefix" + imlib_prefix="$withval" +else + imlib_prefix="" +fi; + +# Check whether --with-imlib-exec-prefix or --without-imlib-exec-prefix was given. +if test "${with_imlib_exec_prefix+set}" = set; then + withval="$with_imlib_exec_prefix" + imlib_exec_prefix="$withval" +else + imlib_exec_prefix="" +fi; +# Check whether --enable-imlibtest or --disable-imlibtest was given. +if test "${enable_imlibtest+set}" = set; then + enableval="$enable_imlibtest" + +else + enable_imlibtest=yes +fi; + + if test x$imlib_exec_prefix != x ; then + imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix" + if test x${IMLIB_CONFIG+set} != xset ; then + IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config + fi + fi + if test x$imlib_prefix != x ; then + imlib_args="$imlib_args --prefix=$imlib_prefix" + if test x${IMLIB_CONFIG+set} != xset ; then + IMLIB_CONFIG=$imlib_prefix/bin/imlib-config + fi + fi + + # Extract the first word of "imlib-config", so it can be a program name with args. +set dummy imlib-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_IMLIB_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $IMLIB_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_IMLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_IMLIB_CONFIG" && ac_cv_path_IMLIB_CONFIG="no" + ;; +esac +fi +IMLIB_CONFIG=$ac_cv_path_IMLIB_CONFIG + +if test -n "$IMLIB_CONFIG"; then + echo "$as_me:$LINENO: result: $IMLIB_CONFIG" >&5 +echo "${ECHO_T}$IMLIB_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + min_imlib_version=1.8.2 + echo "$as_me:$LINENO: checking for IMLIB - version >= $min_imlib_version" >&5 +echo $ECHO_N "checking for IMLIB - version >= $min_imlib_version... $ECHO_C" >&6 + no_imlib="" + if test "$IMLIB_CONFIG" = "no" ; then + no_imlib=yes + else + GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk` + GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk` + + imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + if test "x$enable_imlibtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + LIBS="$LIBS $GDK_IMLIB_LIBS" + rm -f conf.imlibtest + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +int main () +{ + int major, minor; + char *tmp_version; + + system ("touch conf.gdkimlibtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = g_strdup("$min_imlib_version"); + if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { + printf("%s, bad version string\n", "$min_imlib_version"); + exit(1); + } + + if (($imlib_major_version > major) || + (($imlib_major_version == major) && ($imlib_minor_version >= minor))) + { + return 0; } - if ((fd2 = fopen("confval2", "w")) == NULL) { - fprintf(stderr, "conftest: cannot open file confval2\n"); - exit(1); + else + { + printf("\n*** 'imlib-config --version' returned %d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version); + printf("*** of IMLIB required is %d.%d. If imlib-config is correct, then it is\n", major, minor); + printf("*** best to upgrade to the required version.\n"); + printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n"); + printf("*** to point to the correct copy of imlib-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; } +} - fprintf(fd1, "%d", CLK_PER_SEC); - fprintf(fd2, "%d", CLK_RSL_TCK); - fclose(fd1); - fclose(fd2); +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_imlib=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_imlib" = x ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + : + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + if test "$IMLIB_CONFIG" = "no" ; then + echo "*** The imlib-config script installed by IMLIB could not be found" + echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the IMLIB_CONFIG environment variable to the" + echo "*** full path to imlib-config." + else + if test -f conf.gdkimlibtest ; then + : + else + echo "*** Could not run IMLIB test program, checking why..." + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + LIBS="$LIBS $GDK_IMLIB_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +int +main () +{ + return 0; + ; + return 0; } -EOF +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding IMLIB or finding the wrong" + echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means IMLIB was incorrectly installed" + echo "*** or that you have moved IMLIB since it was installed. In the latter case, you" + echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + IMLIB_CFLAGS="" + IMLIB_LIBS="" + : + fi - doit='$CC -o conftest ${CFLAGS-} conftest.c' - CLK_PER_SEC= - CLK_RSL_TCK= - if { (eval echo configure:2307: \"$doit\") 1>&5; (eval $doit) 2>&5; }; then - doit=`./conftest` - cpsval=`cat confval1` - crtval=`cat confval2` - if test ${cpsval} != 0; then - CLK_PER_SEC=${cpsval} - echo "$ac_t""CLOCKS_PER_SEC is ${CLK_PER_SEC}" 1>&6 - else - echo "$ac_t""CLOCKS_PER_SEC is provided by the system" 1>&6 - fi - if test ${crtval} != 0; then - CLK_RSL_TCK=${crtval} - echo "$ac_t""CLK_TCK is ${CLK_RSL_TCK}" 1>&6 - else - echo "$ac_t""CLK_TCK is provided by the system" 1>&6 - fi - fi - - - rm -f conftest conftest.? confval? + rm -f conf.gdkimlibtest + + if test x"$no_imlib" = x ; then + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + GTK_LIBS="$GTK_LIBS $GDK_IMLIB_LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GDK_IMLIB_CFLAGS" + if test "${ac_cv_header_gdk_imlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for gdk_imlib.h" >&5 +echo $ECHO_N "checking for gdk_imlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_gdk_imlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gdk_imlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_gdk_imlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking gdk_imlib.h usability" >&5 +echo $ECHO_N "checking gdk_imlib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking gdk_imlib.h presence" >&5 +echo $ECHO_N "checking gdk_imlib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: gdk_imlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: gdk_imlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: gdk_imlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: gdk_imlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: gdk_imlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: gdk_imlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: gdk_imlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: gdk_imlib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for gdk_imlib.h" >&5 +echo $ECHO_N "checking for gdk_imlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_gdk_imlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_gdk_imlib_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_gdk_imlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_gdk_imlib_h" >&6 +fi +if test $ac_cv_header_gdk_imlib_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_GDK_IMLIB_H 1 +_ACEOF - cat<conftest.c - #include - #include - int fn1(void); - void main(void) - { - atexit(fn1); - } - int fn1() - { - return 0; - } - EOF - doit='$CC -o conftest ${CFLAGS-} conftest.c' - if{(eval echo configure:2403: "$doit") 1>&5;(eval $doit) 2>&5;};then - IF_ONEXIT="onexit=on_exit" - echo "Checking atexit OK" 1>&6 - else - IF_ONEXIT="NO_ONEXIT" - echo "There is no atexit" 1>&6 - fi - rm -f conftest conftest.? confval? +else + { echo "$as_me:$LINENO: WARNING: gdk_imlib.h is not found." >&5 +echo "$as_me: WARNING: gdk_imlib.h is not found." >&2;} +fi + CPPFLAGS="$ac_save_CPPFLAGS" + fi + else + GTKVERSION="no" + fi +fi -trap '' 1 2 15 -cat > confcache <<\EOF + ac_config_files="$ac_config_files Mkinclude:Mkinclude.in" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.58. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.58, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 do - case "\$ac_option" in + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + esac + shift done -ac_given_srcdir=$srcdir +ac_configure_extra_args= -trap 'rm -fr `echo "Mkinclude:Mkinclude.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS </dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@AWK@%$AWK%g -s%@SED@%$SED%g -s%@RANLIB@%$RANLIB%g -s%@FC@%$FC%g -s%@SUNFC@%$SUNFC%g -s%@FFLAGS@%$FFLAGS%g -s%@FLIBS@%$FLIBS%g -s%@X_INCLUDES@%$X_INCLUDES%g -s%@X_LIBRARIES@%$X_LIBRARIES%g -s%@X_CFLAGS@%$X_CFLAGS%g -s%@X_PRE_LIBS@%$X_PRE_LIBS%g -s%@X_LIBS@%$X_LIBS%g -s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -s%@OLDSRC@%$OLDSRC%g -s%@OSGARG_OPT@%$OSGARG_OPT%g -s%@OSQARN_OPT@%$OSQARN_OPT%g -s%@CSGI_OPT@%$CSGI_OPT%g -s%@PWD@%$PWD%g -s%@DCLDIR@%$DCLDIR%g -s%@REALMIN@%$REALMIN%g -s%@REALMAX@%$REALMAX%g -s%@REPSL@%$REPSL%g -s%@INTMAX@%$INTMAX%g -s%@CLK_PER_SEC@%$CLK_PER_SEC%g -s%@CLK_RSL_TCK@%$CLK_RSL_TCK%g -s%@DCLVERSION@%$DCLVERSION%g -s%@DCLVERNUM@%$DCLVERNUM%g -s%@DCLLANG@%$DCLLANG%g -s%@IF_ONEXIT@%$IF_ONEXIT%g +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Mkinclude" ) CONFIG_FILES="$CONFIG_FILES Mkinclude:Mkinclude.in" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@AWK@,$AWK,;t t +s,@SED@,$SED,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@FC@,$FC,;t t +s,@SUNFC@,$SUNFC,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@FLIBS@,$FLIBS,;t t +s,@X_INCLUDES@,$X_INCLUDES,;t t +s,@X_LIBRARIES@,$X_LIBRARIES,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@OLDSRC@,$OLDSRC,;t t +s,@OSGARG_OPT@,$OSGARG_OPT,;t t +s,@OSQARN_OPT@,$OSQARN_OPT,;t t +s,@CSGI_OPT@,$CSGI_OPT,;t t +s,@PWD@,$PWD,;t t +s,@DCLDIR@,$DCLDIR,;t t +s,@EGREP@,$EGREP,;t t +s,@REALMIN@,$REALMIN,;t t +s,@REALMAX@,$REALMAX,;t t +s,@REPSL@,$REPSL,;t t +s,@INTMAX@,$INTMAX,;t t +s,@CLK_PER_SEC@,$CLK_PER_SEC,;t t +s,@CLK_RSL_TCK@,$CLK_RSL_TCK,;t t +s,@DCLVERSION@,$DCLVERSION,;t t +s,@DCLVERNUM@,$DCLVERNUM,;t t +s,@DCLLANG@,$DCLLANG,;t t +s,@GTKVERSION@,$GTKVERSION,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t +s,@GTK_LIBS@,$GTK_LIBS,;t t +s,@GDK_PIXBUF_CFLAGS@,$GDK_PIXBUF_CFLAGS,;t t +s,@GDK_PIXBUF_LIBS@,$GDK_PIXBUF_LIBS,;t t +s,@GTK_CONFIG@,$GTK_CONFIG,;t t +s,@IMLIB_CONFIG@,$IMLIB_CONFIG,;t t +s,@GDK_IMLIB_CFLAGS@,$GDK_IMLIB_CFLAGS,;t t +s,@GDK_IMLIB_LIBS@,$GDK_IMLIB_LIBS,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF -EOF -cat >> $CONFIG_STATUS <<\EOF +_ACEOF -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +case "$ac_dir" in +.) ac_abs_builddir=$ac_builddir;; +*) + case $ac_builddir in + .) ac_abs_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; + *) ac_abs_builddir="$ac_dir"/$ac_builddir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; + esac;; +esac +case "$ac_dir" in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir="$ac_dir";; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; + esac;; +esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff -uNr dcl-5.2-C/configure.in dcl-5.2-C-gtk2/configure.in --- dcl-5.2-C/configure.in 2002-01-08 17:47:09.000000000 +0900 +++ dcl-5.2-C-gtk2/configure.in 2004-01-22 18:19:51.000000000 +0900 @@ -5,7 +5,9 @@ configure.in: AC_INIT(INSTALL) -DCLVERSION=5.2 +AC_CONFIG_HEADER(config.h) + +DCLVERSION=5.2-C.3 DCLVERNUM=52 DCLLANG=C @@ -57,10 +59,6 @@ dnl DCLDIR DCL_SET_DCLDIR -dnl bitlib -AC_CONFIG_HEADER(src/misc1/bitlib/bitlib.h:src/misc1/bitlib/bitlib.in) - -DCL_FORTRAN_TYPES DCL_CHECK_VALUES DCL_CHECK_CLOCK_VALUES @@ -68,4 +66,51 @@ AC_SUBST(DCLVERNUM) AC_SUBST(DCLLANG) +dnl GTK2 +AC_SUBST(GTKVERSION) +AM_PATH_GTK_2_0 + +if test x"$no_gtk" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GTK_CFLAGS" + AC_CHECK_HEADER(gtk/gtk.h,AC_DEFINE(HAVE_GTK_H),AC_MSG_WARN(gtk/gtk.h is not found.)) + CPPFLAGS="$ac_save_CPPFLAGS" + GTKVERSION="2" + + dnl check gdk-pixbuf + AM_PATH_GDK_PIXBUF_2_0 + if test x"$no_gdk_pixbuf" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GDK_PIXBUF_CFLAGS" + AC_CHECK_HEADER(gdk-pixbuf/gdk-pixbuf.h,AC_DEFINE(HAVE_GDK_PIXBUF_H),AC_MSG_WARN(gdk-pixbuf/gdk-pixbuf.h is not found.)) + CPPFLAGS="$ac_save_CPPFLAGS" + GTK_CFLAGS="$GTK_CFLAGS $GDK_PIXBUF_CFLAGS" + GTK_LIBS="$GTK_LIBS $GDK_PIXBUF_LIBS" + fi + +else + AM_PATH_GTK + if test x"$no_gtk" = x ; then + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GTK_CFLAGS" + AC_CHECK_HEADER(gtk/gtk.h,AC_DEFINE(HAVE_GTK_H),AC_MSG_WARN(gtk/gtk.h is not found.)) + CPPFLAGS="$ac_save_CPPFLAGS" + GTKVERSION="1" + + dnl check gdk-imlib + AM_PATH_GDK_IMLIB + if test x"$no_imlib" = x ; then + CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS" + GTK_LIBS="$GTK_LIBS $GDK_IMLIB_LIBS" + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$GDK_IMLIB_CFLAGS" + AC_CHECK_HEADER(gdk_imlib.h,AC_DEFINE(HAVE_GDK_IMLIB_H),AC_MSG_WARN(gdk_imlib.h is not found.)) + CPPFLAGS="$ac_save_CPPFLAGS" + fi + else + GTKVERSION="no" + fi + +fi + AC_OUTPUT(Mkinclude:Mkinclude.in) diff -uNr dcl-5.2-C/conftest.c dcl-5.2-C-gtk2/conftest.c --- dcl-5.2-C/conftest.c 2002-01-22 14:57:36.000000000 +0900 +++ dcl-5.2-C-gtk2/conftest.c 1970-01-01 09:00:00.000000000 +0900 @@ -1,41 +0,0 @@ - #include - #include - int fn1(void); - void main(void) - { - atexit(fn1); - } - int fn1() - { - return 0; - } - EOF - doit='gcc -o conftest -O conftest.c' - if{(eval echo configure:2403: "") 1>&5;(eval ) 2>&5;};then - IF_ONEXIT="onexit=on_exit" - echo "Checking atexit OK" 1>&6 - else - IF_ONEXIT="NO_ONEXIT" - echo "There is no atexit" 1>&6 - fi - rm -f conftest conftest.? confval? - - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# diff -uNr dcl-5.2-C/src/grph1/swpack/Makefile dcl-5.2-C-gtk2/src/grph1/swpack/Makefile --- dcl-5.2-C/src/grph1/swpack/Makefile 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/Makefile 2003-11-21 17:33:55.000000000 +0900 @@ -9,11 +9,11 @@ LIBNAME = swpack LIBCSRCS = swpack.c swiget.c swiqnp.c swlget.c swlqnp.c swrget.c \ swrqnp.c swcget.c swcqnp.c swpget.c swpqnp.c swqfnm.c -LIBFSRCS = zxpack.c z1pack.c ztpack.c cfnchr.c +LIBFSRCS = zxpack.c z1pack.c ztpack.c zgpack.c cfnchr.c LIBSRCS = $(LIBCSRCS) $(LIBFSRCS) LIBCOBJS = swpack.o swiget.o swiqnp.o swlget.o swlqnp.o swrget.o \ swrqnp.o swcget.o swcqnp.o swpget.o swpqnp.o swqfnm.o -LIBFOBJS = zxpack.o z1pack.o ztpack.o cfnchr.o +LIBFOBJS = zxpack.o z1pack.o ztpack.o zgpack.o cfnchr.o LIBOBJS = $(LIBCOBJS) $(LIBFOBJS) diff -uNr dcl-5.2-C/src/grph1/swpack/swcqnp.c dcl-5.2-C-gtk2/src/grph1/swpack/swcqnp.c --- dcl-5.2-C/src/grph1/swpack/swcqnp.c 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/swcqnp.c 2003-11-21 17:33:55.000000000 +0900 @@ -5,10 +5,18 @@ #include "libtinyf2c.h" +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + /* Table of constant values */ static integer c__3 = 3; -static integer c__11 = 11; +#ifdef HAVE_GTK_H + static integer c__12 = 12; +#else + static integer c__11 = 11; +#endif /* ----------------------------------------------------------------------- */ /* Copyright (C) 2000 GFD Dennou Club. All rights reserved. */ @@ -18,14 +26,31 @@ { /* Initialized data */ - static char cparas[8*11] = "WSNAME01" "WSNAME02" "WSNAME03" "FNAME " +#ifdef HAVE_GTK_H + static char cparas[8*12] = "WSNAME01" "WSNAME02" "WSNAME03" "WSNAME04" + "FNAME " +#else + static char cparas[8*11] = "WSNAME01" "WSNAME02" "WSNAME03" "FNAME " +#endif "TITLE " "CLRMAP " "BITMAP " "CL2TN " "FONT1 " "FONT2 " "LPR "; +#ifdef HAVE_GTK_H + static char cx[80*12] = "X " +#else static char cx[80*11] = "X " +#endif " " "PS " " " "Tek " " " - " " "dcl " +#ifdef HAVE_GTK_H + " " + "GTK " + " " + " " + "dcl " +#else + " " "dcl " +#endif " " "* " " " "colormap " " " @@ -36,9 +61,19 @@ " " " " "lpr " " "; +#ifdef HAVE_GTK_H + static char cparal[40*12] = "DEVICE_NAME01 " +#else static char cparal[40*11] = "DEVICE_NAME01 " +#endif "DEVICE_NAME02 " "DEVICE_NAME03 " - " " "FLAME_NAME " +#ifdef HAVE_GTK_H + " " + "DEVICE_NAME03 " + "FLAME_NAME " +#else + " " "FLAME_NAME " +#endif "TITLE " "COLORMAP " " " "BITMAP " "COLOR_TO_TONE_MAP " "FONT1 " @@ -73,12 +108,20 @@ case 6: goto L_swcqin; } - *ncp = 11; +#ifdef HAVE_GTK_H + *ncp = c__12; +#else + *ncp = c__11; +#endif return 0; /* ----------------------------------------------------------------------- */ L_swcqid: - for (n = 1; n <= 11; ++n) { +#ifdef HAVE_GTK_H + for (n = 1; n <= c__12; ++n) { +#else + for (n = 1; n <= c__11; ++n) { +#endif if (lchreq_(cp, cparas + (n - 1 << 3), cp_len, (ftnlen)8) || lchreq_( cp, cparal + (n - 1) * 40, cp_len, (ftnlen)40)) { *idx = n; @@ -96,7 +139,11 @@ /* ----------------------------------------------------------------------- */ L_swcqcp: - if (1 <= *idx && *idx <= 11) { +#ifdef HAVE_GTK_H + if (1 <= *idx && *idx <= c__12) { +#else + if (1 <= *idx && *idx <= c__11) { +#endif s_copy(cp, cparas + (*idx - 1 << 3), cp_len, (ftnlen)8); } else { msgdmp_("E", "SWCQCP", "IDX IS OUT OF RANGE.", (ftnlen)1, (ftnlen)6, ( @@ -106,7 +153,11 @@ /* ----------------------------------------------------------------------- */ L_swcqcl: - if (1 <= *idx && *idx <= 11) { +#ifdef HAVE_GTK_H + if (1 <= *idx && *idx <= c__12) { +#else + if (1 <= *idx && *idx <= c__11) { +#endif s_copy(cp, cparal + (*idx - 1) * 40, cp_len, (ftnlen)40); } else { msgdmp_("E", "SWCQCL", "IDX IS OUT OF RANGE.", (ftnlen)1, (ftnlen)6, ( @@ -117,11 +168,20 @@ L_swcqvl: if (lfirst) { +#ifdef HAVE_GTK_H + rtcget_("SW", cparas, cx, &c__12, (ftnlen)2, (ftnlen)8, (ftnlen)80); + rlcget_(cparal, cx, &c__12, (ftnlen)40, (ftnlen)80); +#else rtcget_("SW", cparas, cx, &c__11, (ftnlen)2, (ftnlen)8, (ftnlen)80); rlcget_(cparal, cx, &c__11, (ftnlen)40, (ftnlen)80); +#endif lfirst = FALSE_; } - if (1 <= *idx && *idx <= 11) { +#ifdef HAVE_GTK_H + if (1 <= *idx && *idx <= c__12) { +#else + if (1 <= *idx && *idx <= c__11) { +#endif s_copy(cval, cx + (*idx - 1) * 80, cval_len, (ftnlen)80); } else { msgdmp_("E", "SWCQVL", "IDX IS OUT OF RANGE.", (ftnlen)1, (ftnlen)6, ( @@ -132,11 +192,20 @@ L_swcsvl: if (lfirst) { +#ifdef HAVE_GTK_H + rtcget_("SW", cparas, cx, &c__12, (ftnlen)2, (ftnlen)8, (ftnlen)80); + rlcget_(cparal, cx, &c__12, (ftnlen)40, (ftnlen)80); +#else rtcget_("SW", cparas, cx, &c__11, (ftnlen)2, (ftnlen)8, (ftnlen)80); rlcget_(cparal, cx, &c__11, (ftnlen)40, (ftnlen)80); +#endif lfirst = FALSE_; } - if (1 <= *idx && *idx <= 11) { +#ifdef HAVE_GTK_H + if (1 <= *idx && *idx <= c__12) { +#else + if (1 <= *idx && *idx <= c__11) { +#endif s_copy(cx + (*idx - 1) * 80, cval, (ftnlen)80, cval_len); } else { msgdmp_("E", "SWCSVL", "IDX IS OUT OF RANGE.", (ftnlen)1, (ftnlen)6, ( @@ -146,7 +215,11 @@ /* ----------------------------------------------------------------------- */ L_swcqin: - for (n = 1; n <= 11; ++n) { +#ifdef HAVE_GTK_H + for (n = 1; n <= c__12; ++n) { +#else + for (n = 1; n <= c__11; ++n) { +#endif if (lchreq_(cp, cparas + (n - 1 << 3), cp_len, (ftnlen)8) || lchreq_( cp, cparal + (n - 1) * 40, cp_len, (ftnlen)40)) { *in = n; diff -uNr dcl-5.2-C/src/grph1/swpack/swiqnp.c dcl-5.2-C-gtk2/src/grph1/swpack/swiqnp.c --- dcl-5.2-C/src/grph1/swpack/swiqnp.c 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/swiqnp.c 2003-11-21 17:33:55.000000000 +0900 @@ -5,6 +5,10 @@ #include "libtinyf2c.h" +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + /* Table of constant values */ static integer c__3 = 3; @@ -22,7 +26,11 @@ static char cparas[8*8] = "MAXWNU " "IWS " "IPOSX " "IPOSY " "IWIDTH " "IHEIGHT " "MODE " "NLNSIZE "; +#ifdef HAVE_GTK_H + static integer ix[8] = { 4,1,-999,-999,900,650,1,21 }; +#else static integer ix[8] = { 3,1,-999,-999,900,650,1,21 }; +#endif static char cparal[40*8] = "****MAXWNU " "****IWS " "WINDOW_X_POS " " " "WINDOW_Y_POS " diff -uNr dcl-5.2-C/src/grph1/swpack/swpack.c dcl-5.2-C-gtk2/src/grph1/swpack/swpack.c --- dcl-5.2-C/src/grph1/swpack/swpack.c 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/swpack.c 2003-11-21 17:33:55.000000000 +0900 @@ -5,6 +5,10 @@ #include "libtinyf2c.h" +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + /* Table of constant values */ static integer c__0 = 0; @@ -146,7 +150,11 @@ chngi_(cmsg, "##", &jws, "(I2)", (ftnlen)80, (ftnlen)2, (ftnlen)4); msgdmp_("M", "SWDOPN", cmsg, (ftnlen)1, (ftnlen)6, (ftnlen)80); /* / DEVICE DEPENDENT PARAMETERS / */ +#ifdef HAVE_GTK_H + if (iws == 1 || iws == 2 || iws == 4) { +#else if (iws == 1 || iws == 2) { +#endif swiget_("IWIDTH ", &iwidth, (ftnlen)7); swiget_("IHEIGHT", &iheigh, (ftnlen)7); swcget_("FNAME ", cout, (ftnlen)7, (ftnlen)80); @@ -199,6 +207,25 @@ swiget_("NLNSIZE", &nlnsiz, (ftnlen)7); gliset_("NLNSIZE", &nlnsiz, (ftnlen)7); ztdopn_(&lwait); +#ifdef HAVE_GTK_H + } else if (iws == 4) { + swiget_("IPOSX ", &iposx, (ftnlen)7); + swiget_("IPOSY ", &iposy, (ftnlen)7); + swlget_("LWAIT ", &lwait, (ftnlen)7); + swlget_("LWAIT0 ", &lwait0, (ftnlen)7); + swlget_("LWAIT1 ", &lwait1, (ftnlen)7); + swlget_("LALT ", &lalt, (ftnlen)7); + swlget_("LDUMP ", &ldump, (ftnlen)7); + swqfnm_("BITMAP ", cbtmap, (ftnlen)7, (ftnlen)80); + if (s_cmp(cbtmap, " ", (ftnlen)80, (ftnlen)1) == 0) { + msgdmp_("E", "SWDOPN", "BITMAP FILE DOES NOT EXIST.", (ftnlen)1, ( + ftnlen)6, (ftnlen)27); + } + zgdopn_(&iwidth, &iheigh, &iposx, &iposy, &lwait, &lwait0, &lwait1, + &lalt, &ldump, + clrmap, cbtmap, cout, cttl, + (ftnlen)80, (ftnlen)80, (ftnlen)80, (ftnlen)80); +#endif } return 0; /* ----------------------------------------------------------------------- */ @@ -215,6 +242,11 @@ ztdcls_(); gliset_("NLNSIZE", &nlnsz0, (ftnlen)7); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgdcls_(); + } +#endif s_copy(cmsg, "GRPH1 : TERMINATED.", (ftnlen)80, (ftnlen)19); msgdmp_("M", "SWDCLS", cmsg, (ftnlen)1, (ftnlen)6, (ftnlen)80); return 0; @@ -233,6 +265,11 @@ if (iws == 3) { ztpopn_(); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgpopn_(); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -251,6 +288,11 @@ if (iws == 3) { ztpcls_(&lwait); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgpcls_(&lwait); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* OBJECT */ @@ -267,6 +309,11 @@ if (iws == 3) { ztoopn_(cobj, comm, cobj_len, comm_len); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgoopn_(cobj, comm, cobj_len, comm_len); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -281,6 +328,11 @@ if (iws == 3) { ztocls_(cobj, cobj_len); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgocls_(cobj, cobj_len); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* LINE */ @@ -297,6 +349,11 @@ if (iws == 3) { ztswdi_(iwdidx); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgswdi_(iwdidx); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -311,6 +368,11 @@ if (iws == 3) { ztscli_(iclidx); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgscli_(iclidx); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -325,6 +387,11 @@ if (iws == 3) { ztgopn_(); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggopn_(); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -339,6 +406,11 @@ if (iws == 3) { ztgmov_(wx, wy); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggmov_(wx, wy); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -353,6 +425,11 @@ if (iws == 3) { ztgplt_(wx, wy); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggplt_(wx, wy); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -367,6 +444,11 @@ if (iws == 3) { ztgcls_(); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggcls_(); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* TONE */ @@ -383,6 +465,11 @@ if (iws == 3) { ztgton_(np, &wpx[1], &wpy[1], itpat); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggton_(np, &wpx[1], &wpy[1], itpat); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* IMAGE */ @@ -399,6 +486,11 @@ if (iws == 3) { ztiopn_(iwx, iwy, imw, imh); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgiopn_(iwx, iwy, imw, imh); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -413,6 +505,11 @@ if (iws == 3) { ztidat_(&image[1], nlen); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgidat_(&image[1], nlen); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -427,6 +524,11 @@ if (iws == 3) { zticls_(); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgicls_(); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* MOUSE */ @@ -443,6 +545,11 @@ if (iws == 3) { ztqpnt_(wx, wy, mb); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqpnt_(wx, wy, mb); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* TRANSFORMATION */ @@ -459,6 +566,11 @@ if (iws == 3) { ztfint_(wx, wy, iwx, iwy); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgfint_(wx, wy, iwx, iwy); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -473,6 +585,11 @@ if (iws == 3) { ztiint_(iwx, iwy, wx, wy); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgiint_(iwx, iwy, wx, wy); + } +#endif return 0; /* ----------------------------------------------------------------------- */ /* INQUIRY */ @@ -489,6 +606,11 @@ if (iws == 3) { ztqwdc_(lwdatr); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqwdc_(lwdatr); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -503,6 +625,11 @@ if (iws == 3) { ztqclc_(lclatr); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqclc_(lclatr); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -517,6 +644,11 @@ if (iws == 3) { ztqtnc_(ltnatr); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqtnc_(ltnatr); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -531,6 +663,11 @@ if (iws == 3) { ztqimc_(limatr); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqimc_(limatr); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -545,6 +682,11 @@ if (iws == 3) { ztqptc_(lptatr); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqptc_(lptatr); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -559,6 +701,11 @@ if (iws == 3) { ztqrct_(wsxmn, wsxmx, wsymn, wsymx, fact); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqrct_(wsxmn, wsxmx, wsymn, wsymx, fact); + } +#endif return 0; /* ----------------------------------------------------------------------- */ @@ -573,6 +720,11 @@ if (iws == 3) { ztsrot_(iwtrot); } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgsrot_(iwtrot); + } +#endif return 0; } /* swdopn_ */ diff -uNr dcl-5.2-C/src/grph1/swpack/swpack.c.orig dcl-5.2-C-gtk2/src/grph1/swpack/swpack.c.orig --- dcl-5.2-C/src/grph1/swpack/swpack.c.orig 1970-01-01 09:00:00.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/swpack.c.orig 2003-11-21 17:33:55.000000000 +0900 @@ -0,0 +1,999 @@ +/* swpack.f -- translated by f2c (version 19990503). + You must link the resulting object file with the libraries: + -lf2c -lm (in that order) +*/ + +#include "libtinyf2c.h" + +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + +/* Table of constant values */ + +static integer c__0 = 0; + +/* ----------------------------------------------------------------------- */ +/* SWPACK */ +/* ----------------------------------------------------------------------- */ +/* Copyright (C) 2000 GFD Dennou Club. All rights reserved. */ +/* ----------------------------------------------------------------------- */ +/* Subroutine */ int swdopn_0_(int n__, char *cobj, char *comm, integer * + iwdidx, integer *iclidx, real *wx, real *wy, integer *np, real *wpx, + real *wpy, integer *itpat, integer *iwx, integer *iwy, integer *imw, + integer *imh, integer *image, integer *nlen, integer *mb, logical * + lwdatr, logical *lclatr, logical *ltnatr, logical *limatr, logical * + lptatr, real *wsxmn, real *wsxmx, real *wsymn, real *wsymx, real * + fact, integer *iwtrot, ftnlen cobj_len, ftnlen comm_len) +{ + /* Builtin functions */ + /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); + integer s_cmp(char *, char *, ftnlen, ftnlen); + + /* Local variables */ + static char cmsg[80]; + static logical lalt; + static char clpr[80]; + static logical lsep, lkey; + static char cttl[80], cout[80]; + extern /* Subroutine */ int chngi_(char *, char *, integer *, char *, + ftnlen, ftnlen, ftnlen); + static integer npage; + static logical lwait, ldump; + static integer iposx, iposy; + extern /* Subroutine */ int z1idat_(integer *, integer *), z1qclc_( + logical *); + static logical lwait0, lwait1; + extern /* Subroutine */ int z1dcls_(void), z1gcls_(void), z1qimc_(logical + *), z1scli_(integer *), z1icls_(void), z1qwdc_(logical *), + z1dopn_(integer *, integer *, logical *, logical *, logical *, + char *, char *, char *, char *, ftnlen, ftnlen, ftnlen, ftnlen), + z1pcls_(void), z1ocls_(char *, ftnlen), z1gopn_(void), z1iopn_( + integer *, integer *, integer *, integer *), z1swdi_(integer *), + z1gplt_(real *, real *), z1gmov_(real *, real *); + static integer nlnsz0; + extern /* Subroutine */ int z1gton_(integer *, real *, real *, integer *), + z1oopn_(char *, char *, ftnlen, ftnlen), z1popn_(void), z1fint_( + real *, real *, integer *, integer *), z1iint_(integer *, integer + *, real *, real *), z1qtnc_(logical *), z1qptc_(logical *), + z1qrct_(real *, real *, real *, real *, real *); + static integer iheigh; + extern /* Subroutine */ int z1qpnt_(real *, real *, integer *), z1srot_( + integer *); + static char cbtmap[80]; + extern /* Subroutine */ int gliget_(char *, integer *, ftnlen); + static char clrmap[80]; + extern /* Subroutine */ int sgiget_(char *, integer *, ftnlen), osgarg_( + integer *, char *, ftnlen), dclvnm_(char *, ftnlen), msgdmp_(char + *, char *, char *, ftnlen, ftnlen, ftnlen); + static integer iwidth; + static logical lcolor; + extern /* Subroutine */ int clower_(char *, ftnlen), swcget_(char *, char + *, ftnlen, ftnlen), gliset_(char *, integer *, ftnlen), swiget_( + char *, integer *, ftnlen), ztdcls_(void), swlget_(char *, + logical *, ftnlen), zxdcls_(void); + static logical lprint; + extern /* Subroutine */ int swqfnm_(char *, char *, ftnlen, ftnlen); + static integer nlnsiz; + extern /* Subroutine */ int ztdopn_(logical *), ztpcls_(logical *), + ztocls_(char *, ftnlen), zxdopn_(integer *, integer *, integer *, + integer *, logical *, logical *, logical *, logical *, logical *, + logical *, char *, char *, char *, char *, ftnlen, ftnlen, ftnlen, + ftnlen), zxpcls_(void), zxocls_(char *, ftnlen), zxswdi_(integer + *), ztoopn_(char *, char *, ftnlen, ftnlen), ztpopn_(void), + ztswdi_(integer *), zxscli_(integer *), zxoopn_(char *, char *, + ftnlen, ftnlen), zxpopn_(void), ztscli_(integer *), zxgopn_(void), + ztgopn_(void), zxgmov_(real *, real *), ztgmov_(real *, real *), + zxgplt_(real *, real *), ztgplt_(real *, real *), zxgcls_(void), + ztgcls_(void), zxgton_(integer *, real *, real *, integer *), + ztgton_(integer *, real *, real *, integer *), zxiopn_(integer *, + integer *, integer *, integer *), ztiopn_(integer *, integer *, + integer *, integer *), zxidat_(integer *, integer *), ztidat_( + integer *, integer *), zxicls_(void), zticls_(void), zxqpnt_(real + *, real *, integer *), ztqpnt_(real *, real *, integer *), + zxfint_(real *, real *, integer *, integer *), ztfint_(real *, + real *, integer *, integer *), zxiint_(integer *, integer *, real + *, real *), ztiint_(integer *, integer *, real *, real *), + zxqwdc_(logical *), ztqwdc_(logical *), zxqclc_(logical *), + ztqclc_(logical *), zxqtnc_(logical *), ztqtnc_(logical *), + zxqimc_(logical *), ztqimc_(logical *), zxqptc_(logical *), + ztqptc_(logical *), zxqrct_(real *, real *, real *, real *, real * + ); + static integer iws, jws; + extern /* Subroutine */ int ztqrct_(real *, real *, real *, real *, real * + ), zxsrot_(integer *), ztsrot_(integer *); + +/* / OPEN ( AND ACTIVATE ) WORKSTATION / */ + /* Parameter adjustments */ + if (wpx) { + --wpx; + } + if (wpy) { + --wpy; + } + if (image) { + --image; + } + + /* Function Body */ + switch(n__) { + case 1: goto L_swdcls; + case 2: goto L_swpopn; + case 3: goto L_swpcls; + case 4: goto L_swoopn; + case 5: goto L_swocls; + case 6: goto L_swswdi; + case 7: goto L_swscli; + case 8: goto L_swgopn; + case 9: goto L_swgmov; + case 10: goto L_swgplt; + case 11: goto L_swgcls; + case 12: goto L_swgton; + case 13: goto L_swiopn; + case 14: goto L_swidat; + case 15: goto L_swicls; + case 16: goto L_swqpnt; + case 17: goto L_swfint; + case 18: goto L_swiint; + case 19: goto L_swqwdc; + case 20: goto L_swqclc; + case 21: goto L_swqtnc; + case 22: goto L_swqimc; + case 23: goto L_swqptc; + case 24: goto L_swqrct; + case 25: goto L_swsrot; + } + + sgiget_("IWS", &jws, (ftnlen)3); + swiget_("IWS", &iws, (ftnlen)3); + s_copy(cmsg, "GRPH1 : STARTED / IWS = ##.", (ftnlen)80, (ftnlen)27); + chngi_(cmsg, "##", &jws, "(I2)", (ftnlen)80, (ftnlen)2, (ftnlen)4); + msgdmp_("M", "SWDOPN", cmsg, (ftnlen)1, (ftnlen)6, (ftnlen)80); +/* / DEVICE DEPENDENT PARAMETERS / */ +#ifdef HAVE_GTK_H + if (iws == 1 || iws == 2 || iws == 4) { +#else + if (iws == 1 || iws == 2) { +#endif + swiget_("IWIDTH ", &iwidth, (ftnlen)7); + swiget_("IHEIGHT", &iheigh, (ftnlen)7); + swcget_("FNAME ", cout, (ftnlen)7, (ftnlen)80); + swcget_("TITLE ", cttl, (ftnlen)7, (ftnlen)80); + swqfnm_("CLRMAP ", clrmap, (ftnlen)7, (ftnlen)80); + if (s_cmp(clrmap, " ", (ftnlen)80, (ftnlen)1) == 0) { + msgdmp_("E", "SWDOPN", "COLORMAP FILE DOES NOT EXIST.", (ftnlen)1, + (ftnlen)6, (ftnlen)29); + } + if (s_cmp(cout, " ", (ftnlen)80, (ftnlen)1) == 0 || s_cmp(cout, "*", ( + ftnlen)80, (ftnlen)1) == 0) { + osgarg_(&c__0, cout, (ftnlen)80); + } + if (s_cmp(cout, " ", (ftnlen)80, (ftnlen)1) == 0) { + s_copy(cout, "DCL", (ftnlen)80, (ftnlen)3); + clower_(cout, (ftnlen)80); + } + if (s_cmp(cttl, " ", (ftnlen)80, (ftnlen)1) == 0 || s_cmp(cttl, "*", ( + ftnlen)80, (ftnlen)1) == 0) { + dclvnm_(cttl, (ftnlen)80); + } + } + if (iws == 1) { + swiget_("IPOSX ", &iposx, (ftnlen)7); + swiget_("IPOSY ", &iposy, (ftnlen)7); + swlget_("LWAIT ", &lwait, (ftnlen)7); + swlget_("LWAIT0 ", &lwait0, (ftnlen)7); + swlget_("LWAIT1 ", &lwait1, (ftnlen)7); + swlget_("LKEY ", &lkey, (ftnlen)7); + swlget_("LALT ", &lalt, (ftnlen)7); + swlget_("LDUMP ", &ldump, (ftnlen)7); + swqfnm_("BITMAP ", cbtmap, (ftnlen)7, (ftnlen)80); + if (s_cmp(cbtmap, " ", (ftnlen)80, (ftnlen)1) == 0) { + msgdmp_("E", "SWDOPN", "BITMAP FILE DOES NOT EXIST.", (ftnlen)1, ( + ftnlen)6, (ftnlen)27); + } + zxdopn_(&iwidth, &iheigh, &iposx, &iposy, &lwait, &lwait0, &lwait1, & + lkey, &lalt, &ldump, clrmap, cbtmap, cout, cttl, (ftnlen)80, ( + ftnlen)80, (ftnlen)80, (ftnlen)80); + } else if (iws == 2) { + swlget_("LCOLOR ", &lcolor, (ftnlen)7); + swlget_("LSEP ", &lsep, (ftnlen)7); + swlget_("LPRINT ", &lprint, (ftnlen)7); + swcget_("LPR ", clpr, (ftnlen)7, (ftnlen)80); + z1dopn_(&iwidth, &iheigh, &lcolor, &lsep, &lprint, clrmap, cout, cttl, + clpr, (ftnlen)80, (ftnlen)80, (ftnlen)80, (ftnlen)80); + } else if (iws == 3) { + swlget_("LWAIT ", &lwait, (ftnlen)7); + gliget_("NLNSIZE", &nlnsz0, (ftnlen)7); + swiget_("NLNSIZE", &nlnsiz, (ftnlen)7); + gliset_("NLNSIZE", &nlnsiz, (ftnlen)7); + ztdopn_(&lwait); +#ifdef HAVE_GTK_H + } else if (iws == 4) { + swqfnm_("BITMAP ", cbtmap, (ftnlen)7, (ftnlen)80); + if (s_cmp(cbtmap, " ", (ftnlen)80, (ftnlen)1) == 0) { + msgdmp_("E", "SWDOPN", "BITMAP FILE DOES NOT EXIST.", (ftnlen)1, ( + ftnlen)6, (ftnlen)27); + } + zgdopn_(clrmap, cbtmap, (ftnlen)80, (ftnlen)80); +#endif + } + return 0; +/* ----------------------------------------------------------------------- */ + +L_swdcls: +/* / ( DEACTIVATE AND ) CLOSE WORKSTATION / */ + if (iws == 1) { + zxdcls_(); + } + if (iws == 2) { + z1dcls_(); + } + if (iws == 3) { + ztdcls_(); + gliset_("NLNSIZE", &nlnsz0, (ftnlen)7); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgdcls_(); + } +#endif + s_copy(cmsg, "GRPH1 : TERMINATED.", (ftnlen)80, (ftnlen)19); + msgdmp_("M", "SWDCLS", cmsg, (ftnlen)1, (ftnlen)6, (ftnlen)80); + return 0; +/* ----------------------------------------------------------------------- */ +/* PAGE */ +/* ----------------------------------------------------------------------- */ + +L_swpopn: +/* / OPEN PAGE ( OR SCREEN ) / */ + if (iws == 1) { + zxpopn_(); + } + if (iws == 2) { + z1popn_(); + } + if (iws == 3) { + ztpopn_(); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgpopn_(); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swpcls: +/* / CLOSE PAGE ( OR SCREEN ) / */ + ++npage; + s_copy(cmsg, "GRPH1 : PAGE = ### COMPLETED.", (ftnlen)80, (ftnlen)29); + chngi_(cmsg, "###", &npage, "(I3)", (ftnlen)80, (ftnlen)3, (ftnlen)4); + msgdmp_("M", "SWPCLS", cmsg, (ftnlen)1, (ftnlen)6, (ftnlen)80); + if (iws == 1) { + zxpcls_(); + } + if (iws == 2) { + z1pcls_(); + } + if (iws == 3) { + ztpcls_(&lwait); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgpcls_(&lwait); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* OBJECT */ +/* ----------------------------------------------------------------------- */ + +L_swoopn: +/* / OPEN OBJECT / */ + if (iws == 1) { + zxoopn_(cobj, comm, cobj_len, comm_len); + } + if (iws == 2) { + z1oopn_(cobj, comm, cobj_len, comm_len); + } + if (iws == 3) { + ztoopn_(cobj, comm, cobj_len, comm_len); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgoopn_(cobj, comm, cobj_len, comm_len); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swocls: +/* / CLOSE OBJECT / */ + if (iws == 1) { + zxocls_(cobj, cobj_len); + } + if (iws == 2) { + z1ocls_(cobj, cobj_len); + } + if (iws == 3) { + ztocls_(cobj, cobj_len); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgocls_(cobj, cobj_len); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* LINE */ +/* ----------------------------------------------------------------------- */ + +L_swswdi: +/* / SET LINE WIDTH INDEX / */ + if (iws == 1) { + zxswdi_(iwdidx); + } + if (iws == 2) { + z1swdi_(iwdidx); + } + if (iws == 3) { + ztswdi_(iwdidx); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgswdi_(iwdidx); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swscli: +/* / SET LINE COLOR INDEX / */ + if (iws == 1) { + zxscli_(iclidx); + } + if (iws == 2) { + z1scli_(iclidx); + } + if (iws == 3) { + ztscli_(iclidx); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgscli_(iclidx); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swgopn: +/* / OPEN GRAPHIC SEGMENT / */ + if (iws == 1) { + zxgopn_(); + } + if (iws == 2) { + z1gopn_(); + } + if (iws == 3) { + ztgopn_(); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggopn_(); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swgmov: +/* / PEN-UP MOVE / */ + if (iws == 1) { + zxgmov_(wx, wy); + } + if (iws == 2) { + z1gmov_(wx, wy); + } + if (iws == 3) { + ztgmov_(wx, wy); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggmov_(wx, wy); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swgplt: +/* / PEN-DOWN MOVE / */ + if (iws == 1) { + zxgplt_(wx, wy); + } + if (iws == 2) { + z1gplt_(wx, wy); + } + if (iws == 3) { + ztgplt_(wx, wy); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggplt_(wx, wy); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swgcls: +/* / CLOSE GRAPHIC SEGMENT / */ + if (iws == 1) { + zxgcls_(); + } + if (iws == 2) { + z1gcls_(); + } + if (iws == 3) { + ztgcls_(); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggcls_(); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* TONE */ +/* ----------------------------------------------------------------------- */ + +L_swgton: +/* / HARD FILL / */ + if (iws == 1) { + zxgton_(np, &wpx[1], &wpy[1], itpat); + } + if (iws == 2) { + z1gton_(np, &wpx[1], &wpy[1], itpat); + } + if (iws == 3) { + ztgton_(np, &wpx[1], &wpy[1], itpat); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zggton_(np, &wpx[1], &wpy[1], itpat); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* IMAGE */ +/* ----------------------------------------------------------------------- */ + +L_swiopn: +/* / OPEN IMAGE / */ + if (iws == 1) { + zxiopn_(iwx, iwy, imw, imh); + } + if (iws == 2) { + z1iopn_(iwx, iwy, imw, imh); + } + if (iws == 3) { + ztiopn_(iwx, iwy, imw, imh); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgiopn_(iwx, iwy, imw, imh); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swidat: +/* / IMAGE DATA / */ + if (iws == 1) { + zxidat_(&image[1], nlen); + } + if (iws == 2) { + z1idat_(&image[1], nlen); + } + if (iws == 3) { + ztidat_(&image[1], nlen); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgidat_(&image[1], nlen); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swicls: +/* / IMAGE CLOSE / */ + if (iws == 1) { + zxicls_(); + } + if (iws == 2) { + z1icls_(); + } + if (iws == 3) { + zticls_(); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgicls_(); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* MOUSE */ +/* ----------------------------------------------------------------------- */ + +L_swqpnt: +/* / INQUIRE POSITION OF POINTER / */ + if (iws == 1) { + zxqpnt_(wx, wy, mb); + } + if (iws == 2) { + z1qpnt_(wx, wy, mb); + } + if (iws == 3) { + ztqpnt_(wx, wy, mb); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqpnt_(wx, wy, mb); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* TRANSFORMATION */ +/* ----------------------------------------------------------------------- */ + +L_swfint: +/* / REAL TO INT / */ + if (iws == 1) { + zxfint_(wx, wy, iwx, iwy); + } + if (iws == 2) { + z1fint_(wx, wy, iwx, iwy); + } + if (iws == 3) { + ztfint_(wx, wy, iwx, iwy); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgfint_(wx, wy, iwx, iwy); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swiint: +/* / INT TO REAL / */ + if (iws == 1) { + zxiint_(iwx, iwy, wx, wy); + } + if (iws == 2) { + z1iint_(iwx, iwy, wx, wy); + } + if (iws == 3) { + ztiint_(iwx, iwy, wx, wy); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgiint_(iwx, iwy, wx, wy); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ +/* INQUIRY */ +/* ----------------------------------------------------------------------- */ + +L_swqwdc: +/* / INQUIRE LINE WIDTH CAPABILITY / */ + if (iws == 1) { + zxqwdc_(lwdatr); + } + if (iws == 2) { + z1qwdc_(lwdatr); + } + if (iws == 3) { + ztqwdc_(lwdatr); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqwdc_(lwdatr); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swqclc: +/* / INQUIRE LINE COLOR CAPABILITY / */ + if (iws == 1) { + zxqclc_(lclatr); + } + if (iws == 2) { + z1qclc_(lclatr); + } + if (iws == 3) { + ztqclc_(lclatr); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqclc_(lclatr); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swqtnc: +/* / INQUIRE HARD FILL CAPABILITY / */ + if (iws == 1) { + zxqtnc_(ltnatr); + } + if (iws == 2) { + z1qtnc_(ltnatr); + } + if (iws == 3) { + ztqtnc_(ltnatr); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + ztqtnc_(ltnatr); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swqimc: +/* / INQUIRE BIT IMAGE CAPABILITY / */ + if (iws == 1) { + zxqimc_(limatr); + } + if (iws == 2) { + z1qimc_(limatr); + } + if (iws == 3) { + ztqimc_(limatr); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqimc_(limatr); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swqptc: +/* / INQUIRE MOUSE POINT CAPABILITY / */ + if (iws == 1) { + zxqptc_(lptatr); + } + if (iws == 2) { + z1qptc_(lptatr); + } + if (iws == 3) { + ztqptc_(lptatr); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqptc_(lptatr); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swqrct: +/* / INQUIRE WORKSTATION RECTANGLE / */ + if (iws == 1) { + zxqrct_(wsxmn, wsxmx, wsymn, wsymx, fact); + } + if (iws == 2) { + z1qrct_(wsxmn, wsxmx, wsymn, wsymx, fact); + } + if (iws == 3) { + ztqrct_(wsxmn, wsxmx, wsymn, wsymx, fact); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgqrct_(wsxmn, wsxmx, wsymn, wsymx, fact); + } +#endif + return 0; +/* ----------------------------------------------------------------------- */ + +L_swsrot: +/* / SET FRAME ROTATION FLAG / */ + if (iws == 1) { + zxsrot_(iwtrot); + } + if (iws == 2) { + z1srot_(iwtrot); + } + if (iws == 3) { + ztsrot_(iwtrot); + } +#ifdef HAVE_GTK_H + if (iws == 4) { + zgsrot_(iwtrot); + } +#endif + return 0; +} /* swdopn_ */ + +/* Subroutine */ int swdopn_(void) +{ + return swdopn_0_(0, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swdcls_(void) +{ + return swdopn_0_(1, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swpopn_(void) +{ + return swdopn_0_(2, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swpcls_(void) +{ + return swdopn_0_(3, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swoopn_(char *cobj, char *comm, ftnlen cobj_len, ftnlen + comm_len) +{ + return swdopn_0_(4, cobj, comm, (integer *)0, (integer *)0, (real *)0, ( + real *)0, (integer *)0, (real *)0, (real *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (logical *)0, (logical *)0, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, cobj_len, comm_len); + } + +/* Subroutine */ int swocls_(char *cobj, ftnlen cobj_len) +{ + return swdopn_0_(5, cobj, (char *)0, (integer *)0, (integer *)0, (real *) + 0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (logical *)0, (logical *)0, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, cobj_len, (ftnint)0) + ; + } + +/* Subroutine */ int swswdi_(integer *iwdidx) +{ + return swdopn_0_(6, (char *)0, (char *)0, iwdidx, (integer *)0, (real *)0, + (real *)0, (integer *)0, (real *)0, (real *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (logical *)0, (logical *)0, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swscli_(integer *iclidx) +{ + return swdopn_0_(7, (char *)0, (char *)0, (integer *)0, iclidx, (real *)0, + (real *)0, (integer *)0, (real *)0, (real *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (logical *)0, (logical *)0, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swgopn_(void) +{ + return swdopn_0_(8, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swgmov_(real *wx, real *wy) +{ + return swdopn_0_(9, (char *)0, (char *)0, (integer *)0, (integer *)0, wx, + wy, (integer *)0, (real *)0, (real *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (logical *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (real *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swgplt_(real *wx, real *wy) +{ + return swdopn_0_(10, (char *)0, (char *)0, (integer *)0, (integer *)0, wx, + wy, (integer *)0, (real *)0, (real *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (logical *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (real *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swgcls_(void) +{ + return swdopn_0_(11, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swgton_(integer *np, real *wpx, real *wpy, integer * + itpat) +{ + return swdopn_0_(12, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, np, wpx, wpy, itpat, (integer *)0, (integer * + )0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (logical *)0, (logical *)0, (logical *)0, (logical *) + 0, (logical *)0, (real *)0, (real *)0, (real *)0, (real *)0, ( + real *)0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swiopn_(integer *iwx, integer *iwy, integer *imw, + integer *imh) +{ + return swdopn_0_(13, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, iwx, iwy, imw, imh, (integer *)0, (integer *)0, (integer *)0, + (logical *)0, (logical *)0, (logical *)0, (logical *)0, (logical + *)0, (real *)0, (real *)0, (real *)0, (real *)0, (real *)0, ( + integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swidat_(integer *image, integer *nlen) +{ + return swdopn_0_(14, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, + image, nlen, (integer *)0, (logical *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (real *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swicls_(void) +{ + return swdopn_0_(15, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, ( + ftnint)0); + } + +/* Subroutine */ int swqpnt_(real *wx, real *wy, integer *mb) +{ + return swdopn_0_(16, (char *)0, (char *)0, (integer *)0, (integer *)0, wx, + wy, (integer *)0, (real *)0, (real *)0, (integer *)0, (integer *) + 0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, mb, (logical *)0, (logical *)0, (logical *)0, ( + logical *)0, (logical *)0, (real *)0, (real *)0, (real *)0, (real + *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swfint_(real *wx, real *wy, integer *iwx, integer *iwy) +{ + return swdopn_0_(17, (char *)0, (char *)0, (integer *)0, (integer *)0, wx, + wy, (integer *)0, (real *)0, (real *)0, (integer *)0, iwx, iwy, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (logical *)0, (logical *)0, (logical *)0, (logical *)0, ( + logical *)0, (real *)0, (real *)0, (real *)0, (real *)0, (real *) + 0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swiint_(integer *iwx, integer *iwy, real *wx, real *wy) +{ + return swdopn_0_(18, (char *)0, (char *)0, (integer *)0, (integer *)0, wx, + wy, (integer *)0, (real *)0, (real *)0, (integer *)0, iwx, iwy, ( + integer *)0, (integer *)0, (integer *)0, (integer *)0, (integer *) + 0, (logical *)0, (logical *)0, (logical *)0, (logical *)0, ( + logical *)0, (real *)0, (real *)0, (real *)0, (real *)0, (real *) + 0, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swqwdc_(logical *lwdatr) +{ + return swdopn_0_(19, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, lwdatr, (logical *)0, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swqclc_(logical *lclatr) +{ + return swdopn_0_(20, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, lclatr, ( + logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swqtnc_(logical *ltnatr) +{ + return swdopn_0_(21, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, ltnatr, (logical *)0, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swqimc_(logical *limatr) +{ + return swdopn_0_(22, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, limatr, (logical *)0, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swqptc_(logical *lptatr) +{ + return swdopn_0_(23, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, lptatr, (real *)0, (real *)0, ( + real *)0, (real *)0, (real *)0, (integer *)0, (ftnint)0, (ftnint) + 0); + } + +/* Subroutine */ int swqrct_(real *wsxmn, real *wsxmx, real *wsymn, real * + wsymx, real *fact) +{ + return swdopn_0_(24, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, wsxmn, wsxmx, wsymn, + wsymx, fact, (integer *)0, (ftnint)0, (ftnint)0); + } + +/* Subroutine */ int swsrot_(integer *iwtrot) +{ + return swdopn_0_(25, (char *)0, (char *)0, (integer *)0, (integer *)0, ( + real *)0, (real *)0, (integer *)0, (real *)0, (real *)0, (integer + *)0, (integer *)0, (integer *)0, (integer *)0, (integer *)0, ( + integer *)0, (integer *)0, (integer *)0, (logical *)0, (logical *) + 0, (logical *)0, (logical *)0, (logical *)0, (real *)0, (real *)0, + (real *)0, (real *)0, (real *)0, iwtrot, (ftnint)0, (ftnint)0); + } + diff -uNr dcl-5.2-C/src/grph1/swpack/swqfnm.c dcl-5.2-C-gtk2/src/grph1/swpack/swqfnm.c --- dcl-5.2-C/src/grph1/swpack/swqfnm.c 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/swqfnm.c 2003-11-21 17:33:55.000000000 +0900 @@ -5,6 +5,10 @@ #include "libtinyf2c.h" +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + /* Table of constant values */ static integer c__2 = 2; @@ -61,7 +65,11 @@ nf = 1; } else if (lchreq_(cpara, "CLRMAP", cpara_len, (ftnlen)6) || lchreq_( cpara, "BITMAP", cpara_len, (ftnlen)6)) { - if (iws == 1) { +#ifdef HAVE_GTK_H + if (iws == 1 || iws == 4) { +#else + if (iws == 1) { +#endif /* Writing concatenation */ i__1[0] = lcp, a__1[0] = cpx; i__1[1] = 4, a__1[1] = cx11; diff -uNr dcl-5.2-C/src/grph1/swpack/z1pack.c.org dcl-5.2-C-gtk2/src/grph1/swpack/z1pack.c.org --- dcl-5.2-C/src/grph1/swpack/z1pack.c.org 2002-01-08 17:46:46.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/z1pack.c.org 1970-01-01 09:00:00.000000000 +0900 @@ -1,571 +0,0 @@ -/* - * dcl graphic driver for Post Script - * - * (color version for only all-over filling) - * - * based on z1pack.f by M. Shiotani, K. Sato, A. Numaguti, K. Ishioka - * - * original M. Shiotani (C version) - * 93/02/01 A. Numaguti: conforming PostScript (PS-Adobe-2.0) - * 94/01/28 S. Sakai: dcl-5.x.3 - * 94/03/15 M. Shiotani - */ - -#include -#include - -#define XMAX 7500.0 /* max x */ -#define YMAX 5300.0 /* max y */ -#define TRUE 1 /* numeric value for true */ -#define FALSE 0 /* numeric value for false */ -#define LWDATR TRUE /* line width capability */ -#define LTNATR TRUE /* hard fill capability */ -#define LIMATR TRUE /* bit image capability */ -#define LPTATR FALSE /* mouse point capability */ -#define MAXWDI 9 /* maximum number of line index */ -#define MAXCLI 100 /* maximum number of color index */ -#define MAXT 6 /* maximum number of tone pattern */ -#define MAXNP 1000 /* maximum buffer size */ -#define RGBMAX 65535 /* maximum rgb intensity */ -#define A0 12.0 /* constant for tone pattern */ -#define RFACT 1e8 /* constant for truncation */ - -static float xlwdth[MAXWDI] = { 2, 4, 6, 8, 10, 11, 12, 13, 14 }; - /* initialization for line width */ -static int itd[MAXT] = {1, 2, 4, 6, 8, 12}; -static int itl[MAXT] = {1, 2, 3, 4, 6, 8}; -static int rgb[MAXCLI]; -static int r[MAXCLI], g[MAXCLI], b[MAXCLI]; -static int imlen, ipxcl; -static int iwdidz, iwdidy, iclidz, iclidy, iwtroz, itbak; -static long np; -static int page = 0; - -static float wsxwd, wsywd, wsxmnz, wsxmxz, wsymnz, wsymxz; /* window size */ -static float factz, scale; - -static FILE *outf; /* PS file */ -static int color, separate, print; /* initialized by z1dopn */ -static char psfile[80], command[80], fname[80], xtitle[80]; - -static void z1fopn(), z1fcls(); /* internal routines */ - -/*------------------------- device ------------------------*/ - -void z1dopn_(width, height, lcolor, lsep, lprint, - cmap, file, title, com) - int *width, *height, *lcolor, *lsep, *lprint; - char cmap[], file[], title[], com[]; -{ - int ncolor, m, n; - long int rx[MAXCLI], gx[MAXCLI], bx[MAXCLI]; - float scx, scy; - char cmapz[80], c[80]; - FILE *stream; - void cfnchr(); - - color = *lcolor; - separate = *lsep | *lprint; - print = *lprint; - - cfnchr (command, com, 79); - cfnchr (psfile, file, 79); - cfnchr (xtitle, title, 79); - -/* page size */ - - scx = XMAX / (*width -1); - scy = YMAX / (*height-1); - scale = (scx < scy) ? scx : scy ; /* min (scx, scy) */ - wsxwd = (*width -1) * scale; /* window width */ - wsywd = (*height-1) * scale; /* window height */ - wsxmnz = (XMAX - wsxwd) / 2; /* lower-left corner */ - wsymnz = (YMAX - wsywd) / 2; /* lower-left corner */ - wsxmxz = wsxmnz + wsxwd; /* upper-right corner */ - wsymxz = wsymnz + wsywd; /* upper-right corner */ - factz = 0.0035; - -/* read colormap file */ - - cfnchr (cmapz, cmap, 79); - - if ((stream = fopen(cmapz, "r")) == NULL) { - fprintf (stderr, "*** Error in z1dopn : "); - fprintf (stderr, - "Allocation failed for colormap (%s).\n", cmapz); - exit (1); - } - - fscanf (stream, "%d : %s", &ncolor, c); - for (n = 0; n < ncolor; n++){ - fscanf(stream, "%6d%6d%6d : %s", &rx[n], &gx[n], &bx[n], c); - } - -/* open ( and activate ) workstation */ - - if (color) { - for (n = 0; n < MAXCLI; n++) { - m = n % ncolor; - rgb[n] = rx[m] * 15 / RGBMAX * 256 - + gx[m] * 15 / RGBMAX * 16 - + bx[m] * 15 / RGBMAX; - r[n] = rx[m] / 256; - g[n] = gx[m] / 256; - b[n] = bx[m] / 256; - } - } -} - -void z1dcls_() -{ - if (!separate) - z1fcls(); -} - -/*------------------------- page --------------------------*/ - -void z1popn_() -{ - page++; - if (separate || page==1) - z1fopn(); - - fprintf (outf,"%%%%Page: %d %d\n", page, page); - fputs ("gsave\n", outf); - fputs ("[ 0.0 0.1 -0.1 0.0 562 44 ] concat\n", outf); - fputs ("1 setlinecap\n", outf); - fputs ("1 setlinejoin\n", outf); - fputs ("10 setmiterlimit\n", outf); - iwdidy = 0; - if (color) { - fputs ("%%BeginObject: background\n", outf); - fputs ("N\n", outf); - fprintf (outf, "%4.0f %4.0f M\n", wsxmnz, wsymnz); - fprintf (outf, "%4.0f %4.0f L\n", wsxmxz, wsymnz); - fprintf (outf, "%4.0f %4.0f L\n", wsxmxz, wsymxz); - fprintf (outf, "%4.0f %4.0f L\n", wsxmnz, wsymxz); - fputs ("C\n", outf); - fprintf (outf, "%4i RGB\n", rgb[0]); - fputs ("F\n", outf); - iclidy = 0; - fputs ("%%EndObject\n", outf); - } - itbak = 0; - fputs ("%%BeginObject: grph1\n", outf); -} - -void z1pcls_() -{ - char comline[128]; - -/* close page ( or screen ) */ - - fputs ("%%EndObject\n", outf); - fputs ("grestore\n", outf); - fputs ("showpage\n", outf); - - if (separate) { - z1fcls(); - if (print) { - sprintf (comline, "%s %s", command, fname); - system (comline); - sprintf (comline, "rm %s", fname); - system (comline); - } - } -} - -/*------------------------- object ------------------------*/ - -void z1oopn_(objname, comment, Lobj, Lcom) - char *objname, *comment; - int Lobj, Lcom; -{ - char obj[32], com[80]; - int nc; - - void cfnchr(); - - cfnchr (obj, objname, Lobj); - cfnchr (com, comment, Lcom); - - fprintf (outf, "%%%%Begin %s [%s]\n", obj, com); -} - -void z1ocls_(objname, Lobj) - char *objname; - int Lobj; -{ - char obj[32]; - - void cfnchr(); - - cfnchr (obj, objname, Lobj); - - fprintf (outf, "%%%%End %s\n", obj); -} - -/*------------------------- line --------------------------*/ - -void z1swdi_(iwdidx) - int *iwdidx; -{ - -/* set line width index */ - - iwdidz = *iwdidx % 10; - if (iwdidz == 0) - iwdidz = 1; -} - -void z1scli_(iclidx) - int *iclidx; -{ - -/* set line color index */ - - iclidz = *iclidx % MAXCLI; - if (iclidz == 0) - iclidz = 1; -} - -void z1gopn_() -{ - -/* open graphic segment */ - - np = 0; - if (iwdidz != iwdidy) { - fprintf (outf, "%4.1f W\n", xlwdth[iwdidz-1]); - iwdidy = iwdidz; - } - if (color && iclidz != iclidy) { - fprintf (outf, "%4i RGB\n", rgb[iclidz]); - iclidy = iclidz; - } - fputs ("N\n", outf); -} - -void z1gmov_(wx, wy) - float *wx, *wy; -{ - -/* pen-up move */ - - np = np + 1; - fprintf (outf, "%4.0f %4.0f M\n", *wx, *wy); -} - -void z1gplt_(wx, wy) - float *wx, *wy; -{ - -/* pen-down move */ - - np = np + 1; - fprintf (outf, "%4.0f %4.0f L\n", *wx, *wy); - - if (np >= MAXNP) { - fputs ("S\n", outf); - np = 0; - fputs ("N\n", outf); - fprintf (outf, "%4.0f %4.0f M\n", *wx, *wy); - } -} - -void z1gcls_() -{ - -/* close graphic segment */ - - fputs ("S\n", outf); -} - -/*------------------------- tone --------------------------*/ - -void z1gton_(np, wpx, wpy, itpat) - int *np, *itpat; - float wpx[], wpy[]; -{ - int i, j, k, jtpat, ltpat, jtclr, lbeta, it, iz1; - float rz1; - double r; - -/* hard fill */ - - jtpat = *itpat % 1000; - jtclr = (*itpat / 1000) % MAXCLI; - if (jtclr == 0) - jtclr = 1; - - i = jtpat / 100; - lbeta = jtpat == 999; - - if (MAXT < i && !lbeta) { - fprintf (stderr, "*** Error in z1pack : "); - fprintf (stderr, "Tone pattern no. %d is not supported.\n", jtpat); - return; - } - - fputs ("N\n", outf); - fprintf (outf, "%4.0f %4.0f M\n", wpx[0], wpy[0]); - for (it = 1; it < *np; ++it) - fprintf (outf, "%4.0f %4.0f L\n", wpx[it], wpy[it]); - fputs ("C\n", outf); - - fprintf (outf, "%% %3i PAT\n", jtpat); - - if (color && lbeta) { - if (itbak != -1) { - fputs ("R0\n", outf); - itbak = -1; - } - fprintf (outf, "%4i RGB\n", rgb[jtclr]); - } - else { - if (lbeta) - jtpat = 9; - ltpat = jtpat != itbak; - j = (jtpat - i * 100) / 10; - k = jtpat - i * 100 - j * 10; - if (iwtroz != 1 && 1 <= i && i <= 4) - i = (i + 1) % 4 + 1; - if (k == 0) - return; - - if (i == 0) { - r = 1.0 - pow (2.0, (double) (k - 9)) * itd[j]; - r = floor (r * RFACT + 0.5) / RFACT; - if (r <= 0) { - fputs ("0 G\n", outf); - } - else { - if (ltpat) { - rz1 = pow (2.0, (double) (k - 1) / 2.0) * A0; - iz1 = ((k + 1) % 2) * 45; - fprintf (outf,"%6.2f %2i P0 R ", rz1, iz1); - itbak = jtpat; - } - fprintf (outf, "%5.3f G\n", r); - } - } - else { - r = 1.0 - pow (2.0, (double) (k - 5)) * itl[j]; - r = floor (r * RFACT + 0.5) / RFACT; - if (r <= 0) { - fputs ("0 G\n", outf); - } - else { - if (ltpat) { - rz1 = pow ((double) 2, (double) (k - 1)) * A0; - fprintf (outf,"%6.2f 0 P%1i R ", rz1, i); - itbak = jtpat; - } - fprintf (outf, "%5.3f G\n", r); - } - } - } - - fputs ("F\n", outf); - - if (!(color && lbeta)) - fputs ("0 G\n", outf); - iclidy = 0; -} - -/*------------------------- image -------------------------*/ - -void z1iopn_(iwx, iwy, iwidth, iheight) - int *iwx, *iwy, *iwidth, *iheight; -{ - fprintf (outf, "/picstr %d string def \n", *iwidth); - fprintf (outf, "%d %d 8 \n", *iwidth, *iheight); - fprintf (outf, "[%f 0 0 %f %f %f]\n", - 1/scale, -1/scale, -wsxmnz/scale-*iwx+0.5, wsymxz/scale-*iwy+0.5); - fputs ("{currentfile picstr readhexstring pop}\n", outf); - fputs ("false 3 colorimage\n", outf); - - imlen = *iwidth * *iheight; - ipxcl = 0; -} - -void z1idat_(image, nlen) - int *nlen, image[]; -{ - int i, ip; - - for (i = 0; i < *nlen; i++) { - ipxcl++; - ip = image[i]; - fprintf (outf, "%2.2x%2.2x%2.2x", r[ip], g[ip], b[ip]); - if ((ipxcl % 10) == 0) - fputs("\n", outf); - } -} - -void z1icls_() -{ - -} - -/*------------------------- mouse -------------------------*/ - -void z1qpnt_(wx, wy, mb) - float *wx, *wy; - int *mb; -{ - *mb = 0; -} - -/*---------------------- transformation -------------------*/ - -void z1fint_(wx, wy, iwx, iwy) - float *wx, *wy; - int *iwx, *iwy; -{ - *iwx = (*wx - wsxmnz) / scale + 0.5; - *iwy = (wsymxz - *wy) / scale + 0.5; -} - -void z1iint_(iwx, iwy, wx, wy) - float *wx, *wy; - int *iwx, *iwy; -{ - *wx = wsxmnz + *iwx*scale; - *wy = wsymxz - *iwy*scale; -} - -/*------------------------- inquiry -----------------------*/ - -void z1qwdc_(lwdatr) - int *lwdatr; -{ - -/* inquire line width capability */ - - *lwdatr = LWDATR; -} - -void z1qclc_(lclatr) - int *lclatr; -{ - -/* inquire line color capability */ - - *lclatr = color; -} - -void z1qtnc_(ltnatr) - int *ltnatr; -{ - -/* inquire hard fill capability */ - - *ltnatr = LTNATR; -} - -void z1qimc_(limatr) - int *limatr; -{ - -/* inquire bit image capability */ - - *limatr = LIMATR; -} - -void z1qptc_(lptatr) - int *lptatr; -{ - -/* inquire mouse point capability */ - - *lptatr = LPTATR; -} - -void z1qrct_(wsxmn, wsxmx, wsymn, wsymx, fact) - float *wsxmn, *wsxmx, *wsymn, *wsymx, *fact; -{ - -/* inquire workstation rectangle */ - - *wsxmn = wsxmnz; - *wsxmx = wsxmxz; - *wsymn = wsymnz; - *wsymx = wsymxz; - *fact = factz; -} - -void z1srot_(iwtrot) - int *iwtrot; -{ - -/* set frame rotation flag */ - - iwtroz = *iwtrot; -} - -/*---------- file handling (internal functions) -----------*/ - -static void z1fopn() -{ - if (!separate) { - sprintf (fname, "%s.ps", psfile); - } - else { - sprintf (fname, "%s_%03d.ps", psfile, page); - } - if ((outf = fopen(fname, "w+")) == NULL) { - fprintf (stderr, "*** Error in z1pack : "); - fprintf (stderr, "File < %s > cannot be opened.\n", fname); - exit (1); - } - - fputs ("%!PS-Adobe-2.0\n", outf); - fprintf (outf, "%%%%Creator: %s\n", xtitle); - fprintf (outf, "%%%%Title: %s\n", fname); - fputs ("%%Pages: (atend)\n", outf); - fputs ("%%BoundingBox: 31 43 563 795\n", outf); - fputs ("%%DocumentPaperSizes: A4\n", outf); - if (iwtroz != 1) - fputs ("%%Orientation: Portrait\n", outf); - else - fputs ("%%Orientation: Landscape\n", outf); - fputs ("%%EndComments\n", outf); - fputs ("%%BeginProlog\n", outf); - fputs ("/W {setlinewidth} def\n", outf); - fputs ("/N {newpath} def\n", outf); - fputs ("/M {moveto} def\n", outf); - fputs ("/L {lineto} def\n", outf); - fputs ("/S {stroke} def\n", outf); - fputs ("/C {closepath} def\n", outf); - fputs ("/R {setscreen} def\n", outf); - fputs ("/G {setgray} def\n", outf); - fputs ("/F {fill} def\n", outf); - fputs ("/max {2 copy lt {exch} if pop} def\n", outf); - fputs ("/rightup {sub abs -1 add abs} def\n", outf); - fputs ("/rightdown {add abs -1 add abs} def\n", outf); - fputs ("/P0 {{180 mul cos exch 180 mul cos add 2 div}} def\n", outf); - fputs ("/P1 {{pop}} def\n", outf); - fputs ("/P2 {{rightup}} def\n", outf); - fputs ("/P3 {{exch pop}} def\n", outf); - fputs ("/P4 {{rightdown}} def\n", outf); - fputs ("/P5 {{max}} def\n", outf); - fputs ("/P6 {{2 copy rightup 3 1 roll rightdown max}} def\n", outf); - fputs ("currentscreen /dot exch def /ang exch def /freq exch def\n", outf); - fputs ("/R0 {freq ang {dot} setscreen} def\n", outf); - if (color) { - fputs ("/RGB {dup 256 idiv 15 div /r exch def\n", outf); - fputs (" dup 256 mod 16 idiv 15 div /g exch def\n", outf); - fputs (" 16 mod 15 div /b exch def\n", outf); - fputs (" r g b setrgbcolor} def\n", outf); - } - fputs ("%%EndProlog\n", outf); -} - -static void z1fcls() -{ - fputs ("%%Trailer\n", outf); - fprintf (outf, "%%%%Pages: %d\n", page); - fputs ("%%EOF\n", outf); - fclose (outf); -} diff -uNr dcl-5.2-C/src/grph1/swpack/zgpack.c dcl-5.2-C-gtk2/src/grph1/swpack/zgpack.c --- dcl-5.2-C/src/grph1/swpack/zgpack.c 1970-01-01 09:00:00.000000000 +0900 +++ dcl-5.2-C-gtk2/src/grph1/swpack/zgpack.c 2004-01-08 18:28:13.000000000 +0900 @@ -0,0 +1,793 @@ +#define G_INLINE_FUNC +#include +#include + +#include "libtinyf2c.h" + +#ifdef HAVE_CONFIG_H +# include "../../../config.h" +#endif + +#ifdef HAVE_GTK_H + #include + #include + +#ifdef HAVE_GDK_IMLIB_H + #include +#endif + +#ifdef HAVE_GDK_PIXBUF_H + #include +#endif + +static float rwxold, rwyold; + +#define FACTZ 0.03 /* scaling factor */ + +#ifndef TRUE +#define TRUE 1 /* numeric value for true */ +#endif +#ifndef FALSE +#define FALSE 0 /* numeric value for false */ +#endif + +#define PAD 2.0 /* padding for workstation window */ +#define LWDATR TRUE /* line width capability */ +#define LCLATR TRUE /* line color capability */ +#define LTNATR TRUE /* hard fill capability */ +#define LIMATR TRUE /* bit image capability */ +#define LPTATR FALSE /* mouse point capability */ + +#define MAXWDI 9 /* maximum number of line index */ +#define MAXCLI 255 /* maximum number of line color */ +#define MAXBMP 300 /* maximum number of bitmaps */ + +static int linewidth[MAXWDI] = { 1, 2, 2, 3, 3, 4, 4, 5, 5 }; + +static int iwdidz; /* pen width */ +static int iclidz; /* pen color index */ +static int iwtroz; /* direction of frame */ +static int lclatrz; /* type of screen */ +static int wsxwd, wsywd, wsxmnz, wsxmxz, wsymnz, wsymxz; +static int ixz, iyz, iwz, ihz, ixxz, iyyz, page; /* for image */ +static int posx, posy, wait, wait0, wait1, alternate, dump; +static int nbmap, nn1[MAXBMP], nn2[MAXBMP], nx[MAXBMP], ny[MAXBMP]; +static char dmpfile[80], xtitle[80]; +static char bmline[MAXBMP][260]; + +static int lfirst = TRUE; + +static GdkGC *gc; +static GdkGC *gct; +static GtkWidget *drawing_area = NULL; +static GdkPixmap *pixmap = NULL; + +static int ldclonly = FALSE; + +static GdkColor cx[MAXCLI]; + +/*------------------------- GDK ÀßÄê ------------------------*/ + +void zgupdate() +{ + GdkRectangle update_rect; + + update_rect.x = 0; + update_rect.y = 0; + update_rect.width = drawing_area->allocation.width; + update_rect.height = drawing_area->allocation.height; + + gtk_widget_draw(drawing_area, &update_rect); +} + +void zgsdrw_(d) + GtkWidget *d; +{ + + /* set/reset drawing_area */ + + drawing_area = d; +} + +/*-----------------------------------------------*/ + +gint zg_expose_event(widget, event) + GtkWidget *widget; + GdkEventExpose *event; +{ + + gdk_draw_pixmap(widget->window, + widget->style->fg_gc[GTK_WIDGET_STATE (widget)], + pixmap, + event->area.x, event->area.y, + event->area.x, event->area.y, + event->area.width, event->area.height); + + return FALSE; +} + +GtkWidget * zggdrw_(width, height) + int *width, *height; +{ + GtkWidget * drw; + GtkWidget *window; + GtkWidget *vbox; + + wsxwd = *width + 2 * PAD; /* window width */ + wsywd = *height + 2 * PAD; /* window height */ + wsxmnz = PAD; /* lower-left corner */ + wsymnz = PAD; /* lower-left corner */ + wsxmxz = PAD + *width - 1; /* upper-right corner */ + wsymxz = PAD + *height - 1; /* upper-right corner */ + page = 0; + + gtk_init(0,NULL); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + gtk_window_set_title (GTK_WINDOW (window), xtitle); + + vbox = gtk_hbox_new(FALSE,0); + gtk_container_add(GTK_CONTAINER (window), vbox); + gtk_widget_show(vbox); + + drw = gtk_drawing_area_new(); + + gtk_drawing_area_size(GTK_DRAWING_AREA (drw), wsxwd, wsywd); + gtk_box_pack_start(GTK_BOX (vbox), drw, TRUE, TRUE, 0); + + gtk_widget_show(drw); + + gtk_widget_set_events(drw, + GDK_EXPOSURE_MASK| + GDK_BUTTON_PRESS_MASK| + GDK_KEY_PRESS_MASK); + gtk_signal_connect(GTK_OBJECT (drw), "expose_event", + (GtkSignalFunc) zg_expose_event, NULL); + + gtk_widget_show(window); + + return drw; +} + +GtkWidget * zgqdrw_() +{ + return drawing_area; +} + +void zgspmp_(pmap) + GdkPixmap *pmap; +{ + + /* set/reset pixmap */ + + pixmap = pmap; +} + +GdkPixmap * zggpmp_() +{ + GdkPixmap *pmap; + + pmap = gdk_pixmap_new(drawing_area->window, + drawing_area->allocation.width, + drawing_area->allocation.height, + -1); + + gdk_draw_rectangle(pmap, + drawing_area->style->white_gc, + TRUE, + 0, 0, + drawing_area->allocation.width, + drawing_area->allocation.height); + + return pmap; +} + +GdkPixmap * zgqpmp_() +{ + return pixmap; +} + + +/*------------------------- device ------------------------*/ + +void zgdopn_(width, height, iposx, iposy, lwait, lwait0, lwait1, + lalt, ldump, + clrmap, cbmmap, file, title) + int *width, *height, *iposx, *iposy, *lwait, *lwait0, *lwait1; + int *lalt, *ldump; + char clrmap[], cbmmap[], file[], title[]; +{ + int ncolor, n, m; + + guint16 rx[MAXCLI], gx[MAXCLI], bx[MAXCLI]; + char c[80], cmapz[80], bmapz[80]; + + FILE *stream; + + GdkVisual *vis; + GdkColormap *cmap; + + GdkRectangle update_rect; + GdkEvent *ev; + + posx = *iposx; + posy = *iposy; + wait = *lwait; + wait0 = *lwait0; + wait1 = *lwait1; + alternate = *lalt; + dump = *ldump; + + cfnchr(dmpfile, file, 79); + cfnchr(xtitle, title, 79); + + /* check drawing_area, if not set, stop */ + + if (drawing_area == NULL) { + + ldclonly = TRUE; + + drawing_area = zggdrw_(width,height); + } + + /* read colormap file */ + + cfnchr(cmapz, clrmap, 79); + + if ((stream = fopen(cmapz, "r")) == NULL) { + fprintf(stderr, "*** Error in zgdopn : "); + fprintf(stderr, + "Allocation failed for colormap (%s).\n", cmapz); + exit (1); + } + + fscanf(stream, "%d : %s", &ncolor, c); + for (n = 0; n < ncolor; n++) + fscanf(stream, "%6hd%6hd%6hd : %s", &rx[n], &gx[n], &bx[n], c); + + /* read bitmap file */ + + cfnchr (bmapz, cbmmap, 79); + + if ((stream = fopen(bmapz, "r")) == NULL) { + fprintf(stderr, "*** Error in zgdopn : "); + fprintf(stderr, + "Allocation failed for bitmap (%s).\n", bmapz); + exit (1); + } + + fscanf(stream, "%d", &nbmap); + for (n = 0; n < nbmap; n++) + fscanf(stream, "%4d%4d%3d%3d%s", + &nn1[n], &nn2[n], &nx[n], &ny[n], bmline[n]); + + /* set colormap */ + + vis = gtk_widget_get_visual(drawing_area); + + lclatrz = (vis->type != GDK_VISUAL_STATIC_GRAY); + + if (lclatrz) { + + cmap = gtk_widget_get_colormap(drawing_area); + + for (n = 0; n < MAXCLI; n++) { + + m = n % ncolor; + + cx[n].red = rx[m]; + cx[n].green = gx[m]; + cx[n].blue = bx[m]; + + if (!gdk_colormap_alloc_color(cmap, &cx[n], FALSE, FALSE)) + break; + + } + + if (n < MAXCLI) { + + fprintf (stderr, "*** Warning in zgdopn : "); + fprintf (stderr, "Only %d colors are allocated.\n", n); + + for ( ; n < MAXCLI; n++) + cx[n].pixel = drawing_area->style->black.pixel; + + } + + } else { + cx[0].pixel = drawing_area->style->white.pixel; + for (n = 1; n < MAXCLI; n++) + cx[n].pixel = drawing_area->style->black.pixel; + } + + gc = gdk_gc_new(drawing_area->window); + + if (ldclonly) { + + if (pixmap) + gdk_pixmap_unref(pixmap); + + pixmap = zggpmp_(); + + zgupdate(); + + if (wait0) { + do { + ev = gdk_event_get(); + } while(!(ev && (ev->type == GDK_KEY_PRESS || ev->type == GDK_BUTTON_PRESS))); + } + gtk_main_iteration(); + } else + if (!pixmap) + pixmap = zggpmp_(); +} + +void zgdcls_() +{ + + + /* device closing proc. */ + + GdkEvent *ev; + int next = FALSE; + + if (ldclonly) { + + if (!wait && wait1) { + while (1) { + + zgupdate(); + + do { + ev = gdk_event_get(); + } while(!ev); + + if (ev->type == GDK_KEY_PRESS) { + switch (ev->key.keyval) { + case GDK_space: + next = TRUE; + break; + case GDK_Return: + next = TRUE; + break; + default: + next = FALSE; + } + } + if (ev->type == GDK_BUTTON_PRESS) + next = TRUE; + + if (next) + break; + } + } + } + +} + +/*------------------------- page --------------------------*/ + +void zgpopn_() +{ + + /* background drawing proc. */ + ++page; + gdk_draw_rectangle(pixmap, + drawing_area->style->white_gc, + TRUE, + 0, 0, + drawing_area->allocation.width, + drawing_area->allocation.height); + swiset_("IWIDTH ", &(drawing_area->allocation.width), (ftnlen)7); + swiset_("IHEIGHT", &(drawing_area->allocation.height), (ftnlen)7); +} + +void zgpcls_() +{ + + /* event loop */ + + int next = FALSE; + int dumpz = FALSE; + char cout[64]; + + GdkEvent *ev; + + if (ldclonly) { + + zgupdate(); + if (wait) { + while (1) { + + zgupdate(); + + do { + ev = gdk_event_get(); + } while(!ev); + + if (ev->type == GDK_KEY_PRESS) { + switch (ev->key.keyval) { + case GDK_Return: + next = TRUE; + break; + case GDK_space: + next = TRUE; + break; + case GDK_d: + next = TRUE; + dumpz = TRUE; + break; + case GDK_s: + next = TRUE; + wait = FALSE; + break; + case GDK_q: + gtk_exit(0); + exit(0); + default: + next = FALSE; + } + } + if (ev->type == GDK_BUTTON_PRESS) + next = TRUE; + + if (next) + break; + } + } + if (dump || dumpz) { + +#ifdef HAVE_GDK_PIXBUF_H + sprintf (cout, "%s_%03d.png", dmpfile, page); + gdk_pixbuf_save(gdk_pixbuf_get_from_drawable( + NULL, + pixmap, + NULL, + 0, 0, + 0, 0, + wsxwd, wsywd), + cout, "png", NULL, NULL); +#elif defined(HAVE_GDK_IMLIB_H) + sprintf (cout, "%s_%03d.png", dmpfile, page); + gdk_imlib_save_image(gdk_imlib_create_image_from_drawable( + pixmap, + NULL, + 0, 0, + wsxwd, wsywd), + cout, NULL); +#else + sprintf (cout, "xwd -name %s -out %s_%03d.xwd", xtitle, dmpfile, page); + system (cout); +#endif + + } + } +} + + +/*------------------------- object ------------------------*/ + +void zgoopn_(objname, comment) + char *objname, *comment; +{ + + /* for long-type message? */ + +} + +void zgocls_(objname) + char *objname; +{ + + /* for long-type message? */ + +} + +/*------------------------- line --------------------------*/ + +void zgswdi_(iwdidx) + int *iwdidx; +{ + + /* set line width index */ + + iwdidz = *iwdidx % 10; + + if (iwdidz == 0) + iwdidz = 1; + +} + +void zgscli_(iclidx) + int *iclidx; +{ + + /* set line color index */ + + iclidz = *iclidx % MAXCLI; + + if (iclidz == 0) + iclidz = 1; +} + +void zggopn_() +{ + + /* open graphic segment */ + + gdk_gc_set_foreground(gc, + &cx[iclidz]); + + gdk_gc_set_line_attributes(gc, + linewidth[iwdidz-1], + GDK_LINE_SOLID, + GDK_CAP_ROUND, + GDK_JOIN_BEVEL); +} + +void zggmov_(wx, wy) + float *wx, *wy; +{ + + /* pen-up move */ + + rwxold = *wx; + rwyold = *wy; +} + +void zggplt_(wx, wy) + float *wx, *wy; +{ + int iwxold, iwyold, iwx, iwy; + void zgfint_(); + + /* pen-down move */ + + zgfint_(&rwxold, &rwyold, &iwxold, &iwyold); + zgfint_( wx, wy, &iwx, &iwy ); + + if (iwxold == iwx && iwyold == iwy) + gdk_draw_point(pixmap, gc, iwx, iwy); + else + gdk_draw_line(pixmap, gc, iwxold, iwyold, iwx, iwy); + + rwxold = *wx; + rwyold = *wy; +} + +void zggcls_() +{ + + /* close graphic segment */ + +} + +/*------------------------- tone --------------------------*/ + +void zggton_(np, wpx, wpy, itpat) + int *np, *itpat; + float wpx[], wpy[]; +{ + static int ltfrst = TRUE, ibitold = -1; + static GdkPoint p[256]; + int ipx, ipy, iclr, ibit; + int i, nb; + char bitmap[256]; + + GdkPixmap *pattern; + + void zgbmcv_(), zgfint_(); + + /* hard fill */ + + if (ltfrst) { + gct = gdk_gc_new (drawing_area->window); + + ltfrst = FALSE; + } + + ibit = *itpat % 1000; + iclr = (*itpat / 1000) % MAXCLI; + if (iclr == 0) + iclr = 1; + + gdk_gc_set_foreground (gct, &cx[iclr]); + + if (ibit != ibitold) { + ibitold = ibit; + nb = -1; + if (iwtroz == 1) { + for (i = 0; i < nbmap; i++) + if (ibit == nn1[i]) { + nb = i; + break; + } + } + else { + for (i = 0; i < nbmap; i++) + if (ibit == nn2[i]) { + nb = i; + break; + } + } + if (nb >= 0) { + zgbmcv_(&nx[nb], &ny[nb], bmline[nb], bitmap); + pattern = gdk_bitmap_create_from_data(NULL, bitmap, nx[nb], ny[nb]); + gdk_gc_set_fill(gct, GDK_STIPPLED); + gdk_gc_set_stipple(gct, pattern); + } + else + return; + } + + for (i = 0; i < *np; i++) { + zgfint_(&wpx[i],&wpy[i], &ipx, &ipy); + p[i].x = ipx; + p[i].y = ipy; + } + + gdk_draw_polygon(pixmap, gct, TRUE, p, *np); + +} + +/*------------------------- image -------------------------*/ + +void zgiopn_(iwx, iwy, iwidth, iheight) + int *iwx, *iwy, *iwidth, *iheight; +{ + ixz = *iwx; + iyz = *iwy; + iwz = *iwidth; + ihz = *iheight; + ixxz = ixz; + iyyz = iyz; + printf (" *** image "); +} + +void zgidat_(image, nlen) + int *nlen, image[]; +{ + int i; + + for (i = 0; i < *nlen; i++) { + gdk_gc_set_foreground(gc, &cx[image[i]]); + gdk_draw_point(pixmap, gc, ixxz, iyyz); + ixxz = ixxz + 1; + if (ixxz >= ixz+iwz) { + ixxz = ixz; + iyyz = iyyz + 1; + if (iyyz % 16 == 0) { + printf ("."); + fflush (stdout); + } + } + } + +} + +void zgicls_() +{ + + printf (" end\n"); +} + +/*------------------------- mouse -------------------------*/ + +void zgqpnt_(wx, wy, mb) + float *wx, *wy; + int *mb; +{ + + /* mouse pointer position info. */ + +} + +/*---------------------- transformation -------------------*/ + +void zgfint_(wx, wy, iwx, iwy) + float *wx, *wy; + int *iwx, *iwy; +{ + int dheight; + int dwidth; + + *iwx = *wx + 0.5; + *iwy = drawing_area->allocation.height - *wy + 0.5; +} + +void zgiint_(iwx, iwy, wx, wy) + float *wx, *wy; + int *iwx, *iwy; +{ + *wx = *iwx; + *wy = drawing_area->allocation.height - *iwy; +} + +/*------------------------- inquiry -----------------------*/ + +void zgqwdc_(lwdatr) + int *lwdatr; +{ + + /* inquire line width capability */ + + *lwdatr = LWDATR; +} + +void zgqclc_(lclatr) + int *lclatr; +{ + + /* inquire line color capability */ + + *lclatr = lclatrz; +} + +void zgqtnc_(ltnatr) + int *ltnatr; +{ + + /* inquire hard fill capability */ + + *ltnatr = LTNATR; +} + +void zgqimc_(limatr) + int *limatr; +{ + + /* inquire bit image capability */ + + *limatr = LIMATR; +} + +void zgqptc_(lptatr) + int *lptatr; +{ + + /* inquire mouse point capability */ + + *lptatr = LPTATR; +} + +void zgqrct_(wsxmn, wsxmx, wsymn, wsymx, fact) + float *wsxmn, *wsxmx, *wsymn, *wsymx, *fact; +{ + + /* inquire workstation rectangle */ + + *wsxmn = 0.; + *wsxmx = drawing_area->allocation.width; + *wsymn = 0.; + *wsymx = drawing_area->allocation.height; + *fact = FACTZ; +} + +void zgsrot_(iwtrot) + int *iwtrot; +{ + + /* set frame rotation flag */ + + iwtroz = *iwtrot; +} + +/*---------------------internal function ------------------*/ + +void zgbmcv_(nx, ny, bmline, bitmap) + int *nx, *ny; + char bmline[], bitmap[]; +{ + static int n8 = 8; + int n, nb; + unsigned bx; + + nb = *nx * *ny / n8; + for (n = 0; n < nb; n++){ + sscanf(&bmline[2*n], "%2x", &bx); + bitmap[n] = bx; + } + bitmap[nb] = '\0'; +} +#endif