home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / programming / jpegv6 / jpeg-6 / configure < prev    next >
Encoding:
Text File  |  1995-07-25  |  43.0 KB  |  1,599 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.4 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --enable-maxmem[=N]     enable use of temp files, set max mem usage to N MB"
  16. ac_help="$ac_help
  17. "
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40.  
  41. # Initialize some other variables.
  42. subdirs=
  43.  
  44. ac_prev=
  45. for ac_option
  46. do
  47.  
  48.   # If the previous option needs an argument, assign it.
  49.   if test -n "$ac_prev"; then
  50.     eval "$ac_prev=\$ac_option"
  51.     ac_prev=
  52.     continue
  53.   fi
  54.  
  55.   case "$ac_option" in
  56.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  57.   *) ac_optarg= ;;
  58.   esac
  59.  
  60.   # Accept the important Cygnus configure options, so we can diagnose typos.
  61.  
  62.   case "$ac_option" in
  63.  
  64.   -build | --build | --buil | --bui | --bu | --b)
  65.     ac_prev=build ;;
  66.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  67.     build="$ac_optarg" ;;
  68.  
  69.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  70.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  71.     ac_prev=cache_file ;;
  72.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  73.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  74.     cache_file="$ac_optarg" ;;
  75.  
  76.   -disable-* | --disable-*)
  77.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  78.     # Reject names that are not valid shell variable names.
  79.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  80.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  81.     fi
  82.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  83.     eval "enable_${ac_feature}=no" ;;
  84.  
  85.   -enable-* | --enable-*)
  86.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  87.     # Reject names that are not valid shell variable names.
  88.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  89.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  90.     fi
  91.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  92.     case "$ac_option" in
  93.       *=*) ;;
  94.       *) ac_optarg=yes ;;
  95.     esac
  96.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  97.  
  98.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  99.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  100.   | --exec | --exe | --ex)
  101.     ac_prev=exec_prefix ;;
  102.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  103.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  104.   | --exec=* | --exe=* | --ex=*)
  105.     exec_prefix="$ac_optarg" ;;
  106.  
  107.   -gas | --gas | --ga | --g)
  108.     # Obsolete; use --with-gas.
  109.     with_gas=yes ;;
  110.  
  111.   -help | --help | --hel | --he)
  112.     # Omit some internal or obsolete options to make the list less imposing.
  113.     # This message is too long to be a string in the A/UX 3.1 sh.
  114.     cat << EOF
  115. Usage: configure [options] [host]
  116. Options: [defaults in brackets after descriptions]
  117. Configuration:
  118.   --cache-file=FILE       cache test results in FILE
  119.   --help                  print this message
  120.   --no-create             do not create output files
  121.   --quiet, --silent       do not print \`checking...' messages
  122.   --version               print the version of autoconf that created configure
  123. Directory and file names:
  124.   --prefix=PREFIX         install architecture-independent files in PREFIX
  125.                           [$ac_default_prefix]
  126.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  127.                           [same as prefix]
  128.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  129.   --program-prefix=PREFIX prepend PREFIX to installed program names
  130.   --program-suffix=SUFFIX append SUFFIX to installed program names
  131.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  132. Host type:
  133.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  134.   --host=HOST             configure for HOST [guessed]
  135.   --target=TARGET         configure for TARGET [TARGET=HOST]
  136. Features and packages:
  137.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  138.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  139.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  140.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  141.   --x-includes=DIR        X include files are in DIR
  142.   --x-libraries=DIR       X library files are in DIR
  143. --enable and --with options recognized:$ac_help
  144. EOF
  145.     exit 0 ;;
  146.  
  147.   -host | --host | --hos | --ho)
  148.     ac_prev=host ;;
  149.   -host=* | --host=* | --hos=* | --ho=*)
  150.     host="$ac_optarg" ;;
  151.  
  152.   -nfp | --nfp | --nf)
  153.     # Obsolete; use --without-fp.
  154.     with_fp=no ;;
  155.  
  156.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  157.   | --no-cr | --no-c)
  158.     no_create=yes ;;
  159.  
  160.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  161.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  162.     no_recursion=yes ;;
  163.  
  164.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  165.     ac_prev=prefix ;;
  166.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  167.     prefix="$ac_optarg" ;;
  168.  
  169.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  170.   | --program-pre | --program-pr | --program-p)
  171.     ac_prev=program_prefix ;;
  172.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  173.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  174.     program_prefix="$ac_optarg" ;;
  175.  
  176.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  177.   | --program-suf | --program-su | --program-s)
  178.     ac_prev=program_suffix ;;
  179.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  180.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  181.     program_suffix="$ac_optarg" ;;
  182.  
  183.   -program-transform-name | --program-transform-name \
  184.   | --program-transform-nam | --program-transform-na \
  185.   | --program-transform-n | --program-transform- \
  186.   | --program-transform | --program-transfor \
  187.   | --program-transfo | --program-transf \
  188.   | --program-trans | --program-tran \
  189.   | --progr-tra | --program-tr | --program-t)
  190.     ac_prev=program_transform_name ;;
  191.   -program-transform-name=* | --program-transform-name=* \
  192.   | --program-transform-nam=* | --program-transform-na=* \
  193.   | --program-transform-n=* | --program-transform-=* \
  194.   | --program-transform=* | --program-transfor=* \
  195.   | --program-transfo=* | --program-transf=* \
  196.   | --program-trans=* | --program-tran=* \
  197.   | --progr-tra=* | --program-tr=* | --program-t=*)
  198.     program_transform_name="$ac_optarg" ;;
  199.  
  200.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  201.   | -silent | --silent | --silen | --sile | --sil)
  202.     silent=yes ;;
  203.  
  204.   -site | --site | --sit)
  205.     ac_prev=site ;;
  206.   -site=* | --site=* | --sit=*)
  207.     site="$ac_optarg" ;;
  208.  
  209.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  210.     ac_prev=srcdir ;;
  211.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  212.     srcdir="$ac_optarg" ;;
  213.  
  214.   -target | --target | --targe | --targ | --tar | --ta | --t)
  215.     ac_prev=target ;;
  216.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  217.     target="$ac_optarg" ;;
  218.  
  219.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  220.     verbose=yes ;;
  221.  
  222.   -version | --version | --versio | --versi | --vers)
  223.     echo "configure generated by autoconf version 2.4"
  224.     exit 0 ;;
  225.  
  226.   -with-* | --with-*)
  227.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  228.     # Reject names that are not valid shell variable names.
  229.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  230.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  231.     fi
  232.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  233.     case "$ac_option" in
  234.       *=*) ;;
  235.       *) ac_optarg=yes ;;
  236.     esac
  237.     eval "with_${ac_package}='$ac_optarg'" ;;
  238.  
  239.   -without-* | --without-*)
  240.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  241.     # Reject names that are not valid shell variable names.
  242.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  243.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  244.     fi
  245.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  246.     eval "with_${ac_package}=no" ;;
  247.  
  248.   --x)
  249.     # Obsolete; use --with-x.
  250.     with_x=yes ;;
  251.  
  252.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  253.   | --x-incl | --x-inc | --x-in | --x-i)
  254.     ac_prev=x_includes ;;
  255.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  256.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  257.     x_includes="$ac_optarg" ;;
  258.  
  259.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  260.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  261.     ac_prev=x_libraries ;;
  262.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  263.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  264.     x_libraries="$ac_optarg" ;;
  265.  
  266.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  267.     ;;
  268.  
  269.   *=*)
  270.     varname=`echo "$ac_option"|sed -e 's/=.*//'`
  271.     # Reject names that aren't valid shell variable names.
  272.     if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then
  273.       { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; }
  274.     fi
  275.     val="`echo "$ac_option"|sed 's/[^=]*=//'`"
  276.     test -n "$verbose" && echo "    setting shell variable $varname to $val"
  277.     eval "$varname='$val'"
  278.     eval "export $varname" ;;
  279.  
  280.   *) 
  281.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  282.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  283.     fi
  284.     if test "x$nonopt" != xNONE; then
  285.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  286.     fi
  287.     nonopt="$ac_option"
  288.     ;;
  289.  
  290.   esac
  291. done
  292.  
  293. if test -n "$ac_prev"; then
  294.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  295. fi
  296.  
  297. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  298.  
  299. # File descriptor usage:
  300. # 0 standard input
  301. # 1 file creation
  302. # 2 errors and warnings
  303. # 3 some systems may open it to /dev/tty
  304. # 4 used on the Kubota Titan
  305. # 6 checking for... messages and results
  306. # 5 compiler messages saved in config.log
  307. if test "$silent" = yes; then
  308.   exec 6>/dev/null
  309. else
  310.   exec 6>&1
  311. fi
  312. exec 5>./config.log
  313.  
  314. echo "\
  315. This file contains any messages produced by compilers while
  316. running configure, to aid debugging if configure makes a mistake.
  317. " 1>&5
  318.  
  319. # Strip out --no-create and --no-recursion so they do not pile up.
  320. # Also quote any args containing shell metacharacters.
  321. ac_configure_args=
  322. for ac_arg
  323. do
  324.   case "$ac_arg" in
  325.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  326.   | --no-cr | --no-c) ;;
  327.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  328.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  329.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  330.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  331.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  332.   esac
  333. done
  334.  
  335. # NLS nuisances.
  336. # Only set LANG and LC_ALL to C if already set.
  337. # These must not be set unconditionally because not all systems understand
  338. # e.g. LANG=C (notably SCO).
  339. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  340. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  341.  
  342. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  343. rm -rf conftest* confdefs.h
  344. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  345. echo > confdefs.h
  346.  
  347. # A filename unique to this package, relative to the directory that
  348. # configure is in, which we can look for to find out if srcdir is correct.
  349. ac_unique_file=jcmaster.c
  350.  
  351. # Find the source files, if location was not specified.
  352. if test -z "$srcdir"; then
  353.   ac_srcdir_defaulted=yes
  354.   # Try the directory containing this script, then its parent.
  355.   ac_prog=$0
  356.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  357.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  358.   srcdir=$ac_confdir
  359.   if test ! -r $srcdir/$ac_unique_file; then
  360.     srcdir=..
  361.   fi
  362. else
  363.   ac_srcdir_defaulted=no
  364. fi
  365. if test ! -r $srcdir/$ac_unique_file; then
  366.   if test "$ac_srcdir_defaulted" = yes; then
  367.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  368.   else
  369.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  370.   fi
  371. fi
  372. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  373.  
  374. # Prefer explicitly selected file to automatically selected ones.
  375. if test -z "$CONFIG_SITE"; then
  376.   if test "x$prefix" != xNONE; then
  377.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  378.   else
  379.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  380.   fi
  381. fi
  382. for ac_site_file in $CONFIG_SITE; do
  383.   if test -r "$ac_site_file"; then
  384.     echo "loading site script $ac_site_file"
  385.     . "$ac_site_file"
  386.   fi
  387. done
  388.  
  389.  
  390. ac_ext=c
  391. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  392. ac_cpp='$CPP $CPPFLAGS'
  393. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  394. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  395.  
  396. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  397.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  398.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  399.     ac_n= ac_c='
  400. ' ac_t='    '
  401.   else
  402.     ac_n=-n ac_c= ac_t=
  403.   fi
  404. else
  405.   ac_n= ac_c='\c' ac_t=
  406. fi
  407.  
  408.  
  409.  
  410. # Extract the first word of "gcc", so it can be a program name with args.
  411. set dummy gcc; ac_word=$2
  412. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  413. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  414.   echo $ac_n "(cached) $ac_c" 1>&6
  415. else
  416.   if test -n "$CC"; then
  417.   ac_cv_prog_CC="$CC" # Let the user override the test.
  418. else
  419.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  420.   for ac_dir in $PATH; do
  421.     test -z "$ac_dir" && ac_dir=.
  422.     if test -f $ac_dir/$ac_word; then
  423.       ac_cv_prog_CC="gcc"
  424.       break
  425.     fi
  426.   done
  427.   IFS="$ac_save_ifs"
  428.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  429. fi
  430. fi
  431. CC="$ac_cv_prog_CC"
  432. if test -n "$CC"; then
  433.   echo "$ac_t""$CC" 1>&6
  434. else
  435.   echo "$ac_t""no" 1>&6
  436. fi
  437.  
  438.  
  439. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  440. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  441.   echo $ac_n "(cached) $ac_c" 1>&6
  442. else
  443.   cat > conftest.c <<EOF
  444. #ifdef __GNUC__
  445.   yes;
  446. #endif
  447. EOF
  448. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  449.   ac_cv_prog_gcc=yes
  450. else
  451.   ac_cv_prog_gcc=no
  452. fi
  453. fi
  454. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  455. if test $ac_cv_prog_gcc = yes; then
  456.   GCC=yes
  457. else
  458.   GCC=
  459. fi
  460. if test "${CFLAGS+set}" != set; then
  461.   echo $ac_n "checking whether ${CC-cc} accepts -O""... $ac_c" 1>&6
  462. if eval "test \"`echo '$''{'ac_cv_prog_cc_o'+set}'`\" = set"; then
  463.   echo $ac_n "(cached) $ac_c" 1>&6
  464. else
  465.   echo 'int f(){ return 0; }' > conftest.c
  466. if test -z "`${CC-cc} -O -c conftest.c 2>&1`"; then
  467.   ac_cv_prog_cc_o=yes
  468. else
  469.   ac_cv_prog_cc_o=no
  470. fi
  471. rm -f conftest*
  472.  
  473. fi
  474.   echo "$ac_t""$ac_cv_prog_cc_o" 1>&6
  475.   if test $ac_cv_prog_cc_o = yes; then
  476.     CFLAGS="-O"
  477.   else
  478.     CFLAGS=""
  479.   fi
  480. fi
  481.  
  482. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  483. # On Suns, sometimes $CPP names a directory.
  484. if test -n "$CPP" && test -d "$CPP"; then
  485.   CPP=
  486. fi
  487. if test -z "$CPP"; then
  488. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  489.   echo $ac_n "(cached) $ac_c" 1>&6
  490. else
  491.     # This must be in double quotes, not single quotes, because CPP may get
  492.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  493.   CPP="${CC-cc} -E"
  494.   # On the NeXT, cc -E runs the code through the compiler's parser,
  495.   # not just through cpp.
  496.   cat > conftest.$ac_ext <<EOF
  497. #line 498 "configure"
  498. #include "confdefs.h"
  499. #include <assert.h>
  500. Syntax Error
  501. EOF
  502. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  503. ac_err=`grep -v '^ *+' conftest.out`
  504. if test -z "$ac_err"; then
  505.   :
  506. else
  507.   echo "$ac_err" >&5
  508.   rm -rf conftest*
  509.   CPP="${CC-cc} -E -traditional-cpp"
  510.   cat > conftest.$ac_ext <<EOF
  511. #line 512 "configure"
  512. #include "confdefs.h"
  513. #include <assert.h>
  514. Syntax Error
  515. EOF
  516. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  517. ac_err=`grep -v '^ *+' conftest.out`
  518. if test -z "$ac_err"; then
  519.   :
  520. else
  521.   echo "$ac_err" >&5
  522.   rm -rf conftest*
  523.   CPP=/lib/cpp
  524. fi
  525. rm -f conftest*
  526. fi
  527. rm -f conftest*
  528.   ac_cv_prog_CPP="$CPP"
  529. fi
  530.   CPP="$ac_cv_prog_CPP"
  531. else
  532.   ac_cv_prog_CPP="$CPP"
  533. fi
  534. echo "$ac_t""$CPP" 1>&6
  535.  
  536. # If we cannot run a trivial program, we must be cross compiling.
  537. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  538. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  539.   echo $ac_n "(cached) $ac_c" 1>&6
  540. else
  541.   if test "$cross_compiling" = yes; then
  542.   ac_cv_c_cross=yes
  543. else
  544. cat > conftest.$ac_ext <<EOF
  545. #line 546 "configure"
  546. #include "confdefs.h"
  547. main(){return(0);}
  548. EOF
  549. eval $ac_link
  550. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  551.   ac_cv_c_cross=no
  552. else
  553.   ac_cv_c_cross=yes
  554. fi
  555. fi
  556. rm -fr conftest*
  557. fi
  558. cross_compiling=$ac_cv_c_cross
  559. echo "$ac_t""$ac_cv_c_cross" 1>&6
  560.  
  561. echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
  562. if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then
  563.   echo $ac_n "(cached) $ac_c" 1>&6
  564. else
  565.   cat > conftest.$ac_ext <<EOF
  566. #line 567 "configure"
  567. #include "confdefs.h"
  568.  
  569. int testfunction (int arg1, int * arg2); /* check prototypes */
  570. struct methods_struct {        /* check method-pointer declarations */
  571.   int (*error_exit) (char *msgtext);
  572.   int (*trace_message) (char *msgtext);
  573.   int (*another_method) (void);
  574. };
  575. int testfunction (int arg1, int * arg2) /* check definitions */
  576. { return arg2[arg1]; }
  577. int test2function (void)    /* check void arg list */
  578. { return 0; }
  579.  
  580. int main() { return 0; }
  581. int t() {
  582.  
  583. ; return 0; }
  584. EOF
  585. if eval $ac_compile; then
  586.   rm -rf conftest*
  587.   ijg_cv_have_prototypes=yes
  588. else
  589.   rm -rf conftest*
  590.   ijg_cv_have_prototypes=no
  591. fi
  592. rm -f conftest*
  593.  
  594. fi
  595. echo "$ac_t""$ijg_cv_have_prototypes" 1>&6
  596. if test $ijg_cv_have_prototypes = yes; then
  597.   cat >> confdefs.h <<\EOF
  598. #define HAVE_PROTOTYPES 
  599. EOF
  600.  
  601. else
  602.   echo Your compiler does not seem to know about function prototypes.
  603.   echo Perhaps it needs a special switch to enable ANSI C mode.
  604.   echo If so, we recommend running configure like this:
  605.   echo "   ./configure  CC='cc -switch'"
  606.   echo where -switch is the proper switch.
  607. fi
  608. ac_safe=`echo "stddef.h" | tr './\055' '___'`
  609. echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
  610. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  611.   echo $ac_n "(cached) $ac_c" 1>&6
  612. else
  613.   cat > conftest.$ac_ext <<EOF
  614. #line 615 "configure"
  615. #include "confdefs.h"
  616. #include <stddef.h>
  617. EOF
  618. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  619. ac_err=`grep -v '^ *+' conftest.out`
  620. if test -z "$ac_err"; then
  621.   rm -rf conftest*
  622.   eval "ac_cv_header_$ac_safe=yes"
  623. else
  624.   echo "$ac_err" >&5
  625.   rm -rf conftest*
  626.   eval "ac_cv_header_$ac_safe=no"
  627. fi
  628. rm -f conftest*
  629. fi
  630. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  631.   echo "$ac_t""yes" 1>&6
  632.   cat >> confdefs.h <<\EOF
  633. #define HAVE_STDDEF_H 
  634. EOF
  635.  
  636. else
  637.   echo "$ac_t""no" 1>&6
  638. fi
  639.  
  640. ac_safe=`echo "stdlib.h" | tr './\055' '___'`
  641. echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  642. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  643.   echo $ac_n "(cached) $ac_c" 1>&6
  644. else
  645.   cat > conftest.$ac_ext <<EOF
  646. #line 647 "configure"
  647. #include "confdefs.h"
  648. #include <stdlib.h>
  649. EOF
  650. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  651. ac_err=`grep -v '^ *+' conftest.out`
  652. if test -z "$ac_err"; then
  653.   rm -rf conftest*
  654.   eval "ac_cv_header_$ac_safe=yes"
  655. else
  656.   echo "$ac_err" >&5
  657.   rm -rf conftest*
  658.   eval "ac_cv_header_$ac_safe=no"
  659. fi
  660. rm -f conftest*
  661. fi
  662. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  663.   echo "$ac_t""yes" 1>&6
  664.   cat >> confdefs.h <<\EOF
  665. #define HAVE_STDLIB_H 
  666. EOF
  667.  
  668. else
  669.   echo "$ac_t""no" 1>&6
  670. fi
  671.  
  672. ac_safe=`echo "string.h" | tr './\055' '___'`
  673. echo $ac_n "checking for string.h""... $ac_c" 1>&6
  674. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  675.   echo $ac_n "(cached) $ac_c" 1>&6
  676. else
  677.   cat > conftest.$ac_ext <<EOF
  678. #line 679 "configure"
  679. #include "confdefs.h"
  680. #include <string.h>
  681. EOF
  682. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  683. ac_err=`grep -v '^ *+' conftest.out`
  684. if test -z "$ac_err"; then
  685.   rm -rf conftest*
  686.   eval "ac_cv_header_$ac_safe=yes"
  687. else
  688.   echo "$ac_err" >&5
  689.   rm -rf conftest*
  690.   eval "ac_cv_header_$ac_safe=no"
  691. fi
  692. rm -f conftest*
  693. fi
  694. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  695.   echo "$ac_t""yes" 1>&6
  696.   :
  697. else
  698.   echo "$ac_t""no" 1>&6
  699. cat >> confdefs.h <<\EOF
  700. #define NEED_BSD_STRINGS 
  701. EOF
  702.  
  703. fi
  704.  
  705. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  706. cat > conftest.$ac_ext <<EOF
  707. #line 708 "configure"
  708. #include "confdefs.h"
  709.  
  710. #ifdef HAVE_STDDEF_H
  711. #include <stddef.h>
  712. #endif
  713. #ifdef HAVE_STDLIB_H
  714. #include <stdlib.h>
  715. #endif
  716. #include <stdio.h>
  717. #ifdef NEED_BSD_STRINGS
  718. #include <strings.h>
  719. #else
  720. #include <string.h>
  721. #endif
  722. typedef size_t my_size_t;
  723.  
  724. int main() { return 0; }
  725. int t() {
  726.  my_size_t foovar; 
  727. ; return 0; }
  728. EOF
  729. if eval $ac_compile; then
  730.   rm -rf conftest*
  731.   ijg_size_t_ok=yes
  732. else
  733.   rm -rf conftest*
  734.   ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"
  735. fi
  736. rm -f conftest*
  737.  
  738. echo "$ac_t""$ijg_size_t_ok" 1>&6
  739. if test "$ijg_size_t_ok" != yes; then
  740. ac_safe=`echo "sys/types.h" | tr './\055' '___'`
  741. echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6
  742. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  743.   echo $ac_n "(cached) $ac_c" 1>&6
  744. else
  745.   cat > conftest.$ac_ext <<EOF
  746. #line 747 "configure"
  747. #include "confdefs.h"
  748. #include <sys/types.h>
  749. EOF
  750. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  751. ac_err=`grep -v '^ *+' conftest.out`
  752. if test -z "$ac_err"; then
  753.   rm -rf conftest*
  754.   eval "ac_cv_header_$ac_safe=yes"
  755. else
  756.   echo "$ac_err" >&5
  757.   rm -rf conftest*
  758.   eval "ac_cv_header_$ac_safe=no"
  759. fi
  760. rm -f conftest*
  761. fi
  762. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  763.   echo "$ac_t""yes" 1>&6
  764.   cat >> confdefs.h <<\EOF
  765. #define NEED_SYS_TYPES_H 
  766. EOF
  767.  
  768. cat > conftest.$ac_ext <<EOF
  769. #line 770 "configure"
  770. #include "confdefs.h"
  771. #include <sys/types.h>
  772. EOF
  773. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  774.   egrep "size_t" >/dev/null 2>&1; then
  775.   rm -rf conftest*
  776.   ijg_size_t_ok="size_t is in sys/types.h"
  777. else
  778.   rm -rf conftest*
  779.   ijg_size_t_ok=no
  780. fi
  781. rm -f conftest*
  782.  
  783. else
  784.   echo "$ac_t""no" 1>&6
  785. ijg_size_t_ok=no
  786. fi
  787.  
  788. echo "$ac_t""$ijg_size_t_ok" 1>&6
  789. if test "$ijg_size_t_ok" = no; then
  790.   echo Type size_t is not defined in any of the usual places.
  791.   echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
  792. fi
  793. fi
  794. echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6
  795. cat > conftest.$ac_ext <<EOF
  796. #line 797 "configure"
  797. #include "confdefs.h"
  798.  
  799. int main() { return 0; }
  800. int t() {
  801.  unsigned char un_char; 
  802. ; return 0; }
  803. EOF
  804. if eval $ac_compile; then
  805.   rm -rf conftest*
  806.   echo "$ac_t""yes" 1>&6
  807. cat >> confdefs.h <<\EOF
  808. #define HAVE_UNSIGNED_CHAR 
  809. EOF
  810.  
  811. else
  812.   rm -rf conftest*
  813.   echo "$ac_t""no" 1>&6
  814. fi
  815. rm -f conftest*
  816. echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6
  817. cat > conftest.$ac_ext <<EOF
  818. #line 819 "configure"
  819. #include "confdefs.h"
  820.  
  821. int main() { return 0; }
  822. int t() {
  823.  unsigned short un_short; 
  824. ; return 0; }
  825. EOF
  826. if eval $ac_compile; then
  827.   rm -rf conftest*
  828.   echo "$ac_t""yes" 1>&6
  829. cat >> confdefs.h <<\EOF
  830. #define HAVE_UNSIGNED_SHORT 
  831. EOF
  832.  
  833. else
  834.   rm -rf conftest*
  835.   echo "$ac_t""no" 1>&6
  836. fi
  837. rm -f conftest*
  838. echo $ac_n "checking for type void""... $ac_c" 1>&6
  839. cat > conftest.$ac_ext <<EOF
  840. #line 841 "configure"
  841. #include "confdefs.h"
  842.  
  843. /* Caution: a C++ compiler will insist on valid prototypes */
  844. typedef void * void_ptr;    /* check void * */
  845. #ifdef HAVE_PROTOTYPES        /* check ptr to function returning void */
  846. typedef void (*void_func) (int a, int b);
  847. #else
  848. typedef void (*void_func) ();
  849. #endif
  850.  
  851. #ifdef HAVE_PROTOTYPES        /* check void function result */
  852. void test3function (void_ptr arg1, void_func arg2)
  853. #else
  854. void test3function (arg1, arg2)
  855.      void_ptr arg1;
  856.      void_func arg2;
  857. #endif
  858. {
  859.   char * locptr = (char *) arg1; /* check casting to and from void * */
  860.   arg1 = (void *) locptr;
  861.   (*arg2) (1, 2);        /* check call of fcn returning void */
  862. }
  863.  
  864. int main() { return 0; }
  865. int t() {
  866.  
  867. ; return 0; }
  868. EOF
  869. if eval $ac_compile; then
  870.   rm -rf conftest*
  871.   echo "$ac_t""yes" 1>&6
  872. else
  873.   rm -rf conftest*
  874.   echo "$ac_t""no" 1>&6
  875. cat >> confdefs.h <<\EOF
  876. #define void char
  877. EOF
  878.  
  879. fi
  880. rm -f conftest*
  881. echo $ac_n "checking for working const""... $ac_c" 1>&6
  882. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  883.   echo $ac_n "(cached) $ac_c" 1>&6
  884. else
  885.   cat > conftest.$ac_ext <<EOF
  886. #line 887 "configure"
  887. #include "confdefs.h"
  888.  
  889. int main() { return 0; }
  890. int t() {
  891.  
  892. /* Ultrix mips cc rejects this.  */
  893. typedef int charset[2]; const charset x;
  894. /* SunOS 4.1.1 cc rejects this.  */
  895. char const *const *ccp;
  896. char **p;
  897. /* NEC SVR4.0.2 mips cc rejects this.  */
  898. struct point {int x, y;};
  899. static struct point const zero = {0,0};
  900. /* AIX XL C 1.02.0.0 rejects this.
  901.    It does not let you subtract one const X* pointer from another in an arm
  902.    of an if-expression whose if-part is not a constant expression */
  903. const char *g = "string";
  904. ccp = &g + (g ? g-g : 0);
  905. /* HPUX 7.0 cc rejects these. */
  906. ++ccp;
  907. p = (char**) ccp;
  908. ccp = (char const *const *) p;
  909. { /* SCO 3.2v4 cc rejects this.  */
  910.   char *t;
  911.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  912.  
  913.   *t++ = 0;
  914. }
  915. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  916.   int x[] = {25, 17};
  917.   const int *foo = &x[0];
  918.   ++foo;
  919. }
  920. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  921.   typedef const int *iptr;
  922.   iptr p = 0;
  923.   ++p;
  924. }
  925. { /* AIX XL C 1.02.0.0 rejects this saying
  926.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  927.   struct s { int j; const int *ap[3]; };
  928.   struct s *b; b->j = 5;
  929. }
  930. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  931.   const int foo = 10;
  932. }
  933.  
  934. ; return 0; }
  935. EOF
  936. if eval $ac_compile; then
  937.   rm -rf conftest*
  938.   ac_cv_c_const=yes
  939. else
  940.   rm -rf conftest*
  941.   ac_cv_c_const=no
  942. fi
  943. rm -f conftest*
  944.  
  945. fi
  946. echo "$ac_t""$ac_cv_c_const" 1>&6
  947. if test $ac_cv_c_const = no; then
  948.   cat >> confdefs.h <<\EOF
  949. #define const 
  950. EOF
  951.  
  952. fi
  953.  
  954. echo $ac_n "checking for inline""... $ac_c" 1>&6
  955. ijg_cv_inline=""
  956. cat > conftest.$ac_ext <<EOF
  957. #line 958 "configure"
  958. #include "confdefs.h"
  959.  
  960. int main() { return 0; }
  961. int t() {
  962. } inline int foo() { return 0; }
  963. int bar() { return foo();
  964. ; return 0; }
  965. EOF
  966. if eval $ac_compile; then
  967.   rm -rf conftest*
  968.   ijg_cv_inline="inline"
  969. else
  970.   rm -rf conftest*
  971.   cat > conftest.$ac_ext <<EOF
  972. #line 973 "configure"
  973. #include "confdefs.h"
  974.  
  975. int main() { return 0; }
  976. int t() {
  977. } __inline__ int foo() { return 0; }
  978. int bar() { return foo();
  979. ; return 0; }
  980. EOF
  981. if eval $ac_compile; then
  982.   rm -rf conftest*
  983.   ijg_cv_inline="__inline__"
  984. else
  985.   rm -rf conftest*
  986.   cat > conftest.$ac_ext <<EOF
  987. #line 988 "configure"
  988. #include "confdefs.h"
  989.  
  990. int main() { return 0; }
  991. int t() {
  992. } __inline int foo() { return 0; }
  993. int bar() { return foo();
  994. ; return 0; }
  995. EOF
  996. if eval $ac_compile; then
  997.   rm -rf conftest*
  998.   ijg_cv_inline="__inline"
  999. fi
  1000. rm -f conftest*
  1001.  
  1002. fi
  1003. rm -f conftest*
  1004.  
  1005. fi
  1006. rm -f conftest*
  1007. echo "$ac_t""$ijg_cv_inline" 1>&6
  1008. cat >> confdefs.h <<EOF
  1009. #define INLINE $ijg_cv_inline
  1010. EOF
  1011. echo $ac_n "checking for broken incomplete types""... $ac_c" 1>&6
  1012. cat > conftest.$ac_ext <<EOF
  1013. #line 1014 "configure"
  1014. #include "confdefs.h"
  1015.  typedef struct undefined_structure * undef_struct_ptr; 
  1016. int main() { return 0; }
  1017. int t() {
  1018.  
  1019. ; return 0; }
  1020. EOF
  1021. if eval $ac_compile; then
  1022.   rm -rf conftest*
  1023.   echo "$ac_t""ok" 1>&6
  1024. else
  1025.   rm -rf conftest*
  1026.   echo "$ac_t""broken" 1>&6
  1027. cat >> confdefs.h <<\EOF
  1028. #define INCOMPLETE_TYPES_BROKEN 
  1029. EOF
  1030.  
  1031. fi
  1032. rm -f conftest*
  1033. echo $ac_n "checking for short external names""... $ac_c" 1>&6
  1034. cat > conftest.$ac_ext <<EOF
  1035. #line 1036 "configure"
  1036. #include "confdefs.h"
  1037.  
  1038. int possibly_duplicate_function () { return 0; }
  1039. int possibly_dupli_function () { return 1; }
  1040.  
  1041. int main() { return 0; }
  1042. int t() {
  1043.  
  1044. ; return 0; }
  1045. EOF
  1046. if eval $ac_link; then
  1047.   rm -rf conftest*
  1048.   echo "$ac_t""ok" 1>&6
  1049. else
  1050.   rm -rf conftest*
  1051.   echo "$ac_t""short" 1>&6
  1052. cat >> confdefs.h <<\EOF
  1053. #define NEED_SHORT_EXTERNAL_NAMES 
  1054. EOF
  1055.  
  1056. fi
  1057. rm -f conftest*
  1058.  
  1059. echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6
  1060. if test "$cross_compiling" = yes; then
  1061.   echo Assuming that char is signed on target machine.
  1062. echo If it is unsigned, this will be a little bit inefficient.
  1063.  
  1064. else
  1065. cat > conftest.$ac_ext <<EOF
  1066. #line 1067 "configure"
  1067. #include "confdefs.h"
  1068.  
  1069. #ifdef HAVE_PROTOTYPES
  1070. int is_char_signed (int arg)
  1071. #else
  1072. int is_char_signed (arg)
  1073.      int arg;
  1074. #endif
  1075. {
  1076.   if (arg == 189) {        /* expected result for unsigned char */
  1077.     return 0;            /* type char is unsigned */
  1078.   }
  1079.   else if (arg != -67) {    /* expected result for signed char */
  1080.     printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
  1081.     printf("I fear the JPEG software will not work at all.\n\n");
  1082.   }
  1083.   return 1;            /* assume char is signed otherwise */
  1084. }
  1085. char signed_char_check = (char) (-67);
  1086. main() {
  1087.   exit(is_char_signed((int) signed_char_check));
  1088. }
  1089. EOF
  1090. eval $ac_link
  1091. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1092.   echo "$ac_t""no" 1>&6
  1093. cat >> confdefs.h <<\EOF
  1094. #define CHAR_IS_UNSIGNED 
  1095. EOF
  1096.  
  1097. else
  1098.   echo "$ac_t""yes" 1>&6
  1099. fi
  1100. fi
  1101. rm -fr conftest*
  1102. echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6
  1103. if test "$cross_compiling" = yes; then
  1104.   echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6
  1105. else
  1106. cat > conftest.$ac_ext <<EOF
  1107. #line 1108 "configure"
  1108. #include "confdefs.h"
  1109.  
  1110. #ifdef HAVE_PROTOTYPES
  1111. int is_shifting_signed (long arg)
  1112. #else
  1113. int is_shifting_signed (arg)
  1114.      long arg;
  1115. #endif
  1116. /* See whether right-shift on a long is signed or not. */
  1117. {
  1118.   long res = arg >> 4;
  1119.  
  1120.   if (res == -0x7F7E80CL) {    /* expected result for signed shift */
  1121.     return 1;            /* right shift is signed */
  1122.   }
  1123.   /* see if unsigned-shift hack will fix it. */
  1124.   /* we can't just test exact value since it depends on width of long... */
  1125.   res |= (~0L) << (32-4);
  1126.   if (res == -0x7F7E80CL) {    /* expected result now? */
  1127.     return 0;            /* right shift is unsigned */
  1128.   }
  1129.   printf("Right shift isn't acting as I expect it to.\n");
  1130.   printf("I fear the JPEG software will not work at all.\n\n");
  1131.   return 0;            /* try it with unsigned anyway */
  1132. }
  1133. main() {
  1134.   exit(is_shifting_signed(-0x7F7E80B1L));
  1135. }
  1136. EOF
  1137. eval $ac_link
  1138. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1139.   echo "$ac_t""no" 1>&6
  1140. cat >> confdefs.h <<\EOF
  1141. #define RIGHT_SHIFT_IS_UNSIGNED 
  1142. EOF
  1143.  
  1144. else
  1145.   echo "$ac_t""yes" 1>&6
  1146. fi
  1147. fi
  1148. rm -fr conftest*
  1149. echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6
  1150. if test "$cross_compiling" = yes; then
  1151.   echo "$ac_t""Assuming that it does." 1>&6
  1152. else
  1153. cat > conftest.$ac_ext <<EOF
  1154. #line 1155 "configure"
  1155. #include "confdefs.h"
  1156.  
  1157. #include <stdio.h>
  1158. main() {
  1159.   if (fopen("conftestdata", "wb") != NULL)
  1160.     exit(0);
  1161.   exit(1);
  1162. }
  1163. EOF
  1164. eval $ac_link
  1165. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1166.   echo "$ac_t""yes" 1>&6
  1167. else
  1168.   echo "$ac_t""no" 1>&6
  1169. cat >> confdefs.h <<\EOF
  1170. #define DONT_USE_B_MODE 
  1171. EOF
  1172.  
  1173. fi
  1174. fi
  1175. rm -fr conftest*
  1176.  
  1177. # Find a good install program.  We prefer a C program (faster),
  1178. # so one script is as good as another.  But avoid the broken or
  1179. # incompatible versions:
  1180. # SysV /etc/install, /usr/sbin/install
  1181. # SunOS /usr/etc/install
  1182. # IRIX /sbin/install
  1183. # AIX /bin/install
  1184. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  1185. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  1186. # ./install, which can be erroneously created by make from ./install.sh.
  1187. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  1188. if test -z "$INSTALL"; then
  1189. if eval "test \"`echo '$''{'ijg_cv_path_install'+set}'`\" = set"; then
  1190.   echo $ac_n "(cached) $ac_c" 1>&6
  1191. else
  1192.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1193.   for ac_dir in $PATH; do
  1194.     # Account for people who put trailing slashes in PATH elements.
  1195.     case "$ac_dir/" in
  1196.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1197.     *)
  1198.       # OSF1 and SCO ODT 3.0 have their own names for install.
  1199.       for ac_prog in ginstall installbsd scoinst install; do
  1200.         if test -f $ac_dir/$ac_prog; then
  1201.       if test $ac_prog = install &&
  1202.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1203.         # AIX install.  It has an incompatible calling convention.
  1204.         # OSF/1 installbsd also uses dspmsg, but is usable.
  1205.         :
  1206.       else
  1207.         ijg_cv_path_install="$ac_dir/$ac_prog -c"
  1208.         break 2
  1209.       fi
  1210.     fi
  1211.       done
  1212.       ;;
  1213.     esac
  1214.   done
  1215.   IFS="$ac_save_ifs"
  1216.   # As a last resort, use cp
  1217.   test -z "$ijg_cv_path_install" && ijg_cv_path_install="cp"
  1218. fi
  1219.   INSTALL="$ijg_cv_path_install"
  1220. fi
  1221. echo "$ac_t""$INSTALL" 1>&6
  1222.  
  1223. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1224. # It thinks the first close brace ends the variable substitution.
  1225. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1226.  
  1227. if test -z "$INSTALL_DATA"; then
  1228.   if test "$INSTALL" = cp; then
  1229.     INSTALL_DATA='${INSTALL}'
  1230.   else
  1231.     INSTALL_DATA='${INSTALL} -m 644'
  1232.   fi
  1233. fi
  1234.  
  1235. # Extract the first word of "ranlib", so it can be a program name with args.
  1236. set dummy ranlib; ac_word=$2
  1237. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1238. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1239.   echo $ac_n "(cached) $ac_c" 1>&6
  1240. else
  1241.   if test -n "$RANLIB"; then
  1242.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1243. else
  1244.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1245.   for ac_dir in $PATH; do
  1246.     test -z "$ac_dir" && ac_dir=.
  1247.     if test -f $ac_dir/$ac_word; then
  1248.       ac_cv_prog_RANLIB="ranlib"
  1249.       break
  1250.     fi
  1251.   done
  1252.   IFS="$ac_save_ifs"
  1253.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1254. fi
  1255. fi
  1256. RANLIB="$ac_cv_prog_RANLIB"
  1257. if test -n "$RANLIB"; then
  1258.   echo "$ac_t""$RANLIB" 1>&6
  1259. else
  1260.   echo "$ac_t""no" 1>&6
  1261. fi
  1262.  
  1263. MEMORYMGR="jmemnobs.o"
  1264. MAXMEM="no"
  1265. # Check whether --enable-maxmem or --disable-maxmem was given.
  1266. enableval="$enable_maxmem"
  1267. if test -n "$enableval"; then
  1268.   MAXMEM="$enableval"
  1269. fi
  1270.  
  1271. # support --with-maxmem for backwards compatibility with IJG V5.
  1272. # Check whether --with-maxmem or --without-maxmem was given.
  1273. withval="$with_maxmem"
  1274. if test -n "$withval"; then
  1275.   MAXMEM="$withval"
  1276. fi
  1277.  
  1278. if test "x$MAXMEM" = xyes; then
  1279.   MAXMEM=1
  1280. fi
  1281. if test "x$MAXMEM" != xno; then
  1282.   if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
  1283.     { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; }
  1284.   fi
  1285.   DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
  1286. cat >> confdefs.h <<EOF
  1287. #define DEFAULT_MAX_MEM ${DEFAULTMAXMEM}
  1288. EOF
  1289.  
  1290. echo $ac_n "checking for 'tmpfile()'""... $ac_c" 1>&6
  1291. cat > conftest.$ac_ext <<EOF
  1292. #line 1293 "configure"
  1293. #include "confdefs.h"
  1294. #include <stdio.h>
  1295. int main() { return 0; }
  1296. int t() {
  1297.  FILE * tfile = tmpfile(); 
  1298. ; return 0; }
  1299. EOF
  1300. if eval $ac_link; then
  1301.   rm -rf conftest*
  1302.   echo "$ac_t""yes" 1>&6
  1303. MEMORYMGR="jmemansi.o"
  1304. else
  1305.   rm -rf conftest*
  1306.   echo "$ac_t""no" 1>&6
  1307. MEMORYMGR="jmemname.o"
  1308. cat >> confdefs.h <<\EOF
  1309. #define NEED_SIGNAL_CATCHER 
  1310. EOF
  1311. echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6
  1312. cat > conftest.$ac_ext <<EOF
  1313. #line 1314 "configure"
  1314. #include "confdefs.h"
  1315.  
  1316. int main() { return 0; }
  1317. int t() {
  1318.  char fname[80]; mktemp(fname); 
  1319. ; return 0; }
  1320. EOF
  1321. if eval $ac_link; then
  1322.   rm -rf conftest*
  1323.   echo "$ac_t""yes" 1>&6
  1324. else
  1325.   rm -rf conftest*
  1326.   echo "$ac_t""no" 1>&6
  1327. cat >> confdefs.h <<\EOF
  1328. #define NO_MKTEMP 
  1329. EOF
  1330.  
  1331. fi
  1332. rm -f conftest*
  1333.  
  1334. fi
  1335. rm -f conftest*
  1336.  
  1337. fi
  1338.  
  1339. # Prepare to massage makefile.cfg correctly.
  1340. if test $ijg_cv_have_prototypes = yes; then
  1341.   ANSI2KNR=""
  1342.   ISANSICOM="# "
  1343. else
  1344.   ANSI2KNR="ansi2knr"
  1345.   ISANSICOM=""
  1346. fi
  1347. # ansi2knr needs -DBSD if string.h is missing
  1348. if test $ac_cv_header_string_h = no; then
  1349.   ANSI2KNRFLAGS="-DBSD"
  1350. else
  1351.   ANSI2KNRFLAGS=""
  1352. fi
  1353. # Set up -I directives
  1354. if test "x$srcdir" = x.; then
  1355.   INCLUDEFLAGS='-I$(srcdir)'
  1356. else
  1357.   INCLUDEFLAGS='-I. -I$(srcdir)'
  1358. fi
  1359. trap '' 1 2 15
  1360.  
  1361. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1362.  
  1363. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1364. # Let make expand exec_prefix.
  1365. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1366.  
  1367. # Any assignment to VPATH causes Sun make to only execute
  1368. # the first set of double-colon rules, so remove it if not needed.
  1369. # If there is a colon in the path, we need to keep it.
  1370. if test "x$srcdir" = x.; then
  1371.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1372. fi
  1373.  
  1374. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1375.  
  1376. DEFS=-DHAVE_CONFIG_H
  1377.  
  1378. # Without the "./", some shells look in PATH for config.status.
  1379. : ${CONFIG_STATUS=./config.status}
  1380.  
  1381. echo creating $CONFIG_STATUS
  1382. rm -f $CONFIG_STATUS
  1383. cat > $CONFIG_STATUS <<EOF
  1384. #! /bin/sh
  1385. # Generated automatically by configure.
  1386. # Run this file to recreate the current configuration.
  1387. # This directory was configured as follows,
  1388. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1389. #
  1390. # $0 $ac_configure_args
  1391. #
  1392. # Compiler output produced by configure, useful for debugging
  1393. # configure, is in ./config.log if it exists.
  1394.  
  1395. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1396. for ac_option
  1397. do
  1398.   case "\$ac_option" in
  1399.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1400.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1401.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1402.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1403.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  1404.     exit 0 ;;
  1405.   -help | --help | --hel | --he | --h)
  1406.     echo "\$ac_cs_usage"; exit 0 ;;
  1407.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1408.   esac
  1409. done
  1410.  
  1411. ac_given_srcdir=$srcdir
  1412.  
  1413. trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1414.  
  1415. # Protect against being on the right side of a sed subst in config.status. 
  1416. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1417.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1418. $ac_vpsub
  1419. $extrasub
  1420. s%@CFLAGS@%$CFLAGS%g
  1421. s%@CPPFLAGS@%$CPPFLAGS%g
  1422. s%@CXXFLAGS@%$CXXFLAGS%g
  1423. s%@DEFS@%$DEFS%g
  1424. s%@LDFLAGS@%$LDFLAGS%g
  1425. s%@LIBS@%$LIBS%g
  1426. s%@exec_prefix@%$exec_prefix%g
  1427. s%@prefix@%$prefix%g
  1428. s%@program_transform_name@%$program_transform_name%g
  1429. s%@CC@%$CC%g
  1430. s%@CPP@%$CPP%g
  1431. s%@INSTALL@%$INSTALL%g
  1432. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1433. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1434. s%@RANLIB@%$RANLIB%g
  1435. s%@MEMORYMGR@%$MEMORYMGR%g
  1436. s%@ANSI2KNR@%$ANSI2KNR%g
  1437. s%@ISANSICOM@%$ISANSICOM%g
  1438. s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g
  1439. s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g
  1440.  
  1441. CEOF
  1442. EOF
  1443. cat >> $CONFIG_STATUS <<EOF
  1444.  
  1445. CONFIG_FILES=\${CONFIG_FILES-"Makefile:makefile.cfg"}
  1446. EOF
  1447. cat >> $CONFIG_STATUS <<\EOF
  1448. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1449.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1450.   case "$ac_file" in
  1451.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1452.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1453.   *) ac_file_in="${ac_file}.in" ;;
  1454.   esac
  1455.  
  1456.   # Adjust relative srcdir, etc. for subdirectories.
  1457.  
  1458.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1459.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1460.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1461.     # The file is in a subdirectory.
  1462.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1463.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1464.     # A "../" for each directory in $ac_dir_suffix.
  1465.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1466.   else
  1467.     ac_dir_suffix= ac_dots=
  1468.   fi
  1469.  
  1470.   case "$ac_given_srcdir" in
  1471.   .)  srcdir=.
  1472.       if test -z "$ac_dots"; then top_srcdir=.
  1473.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1474.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1475.   *) # Relative path.
  1476.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1477.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1478.   esac
  1479.  
  1480.   echo creating "$ac_file"
  1481.   rm -f "$ac_file"
  1482.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1483.   case "$ac_file" in
  1484.   *Makefile*) ac_comsub="1i\\
  1485. # $configure_input" ;;
  1486.   *) ac_comsub= ;;
  1487.   esac
  1488.   sed -e "$ac_comsub
  1489. s%@configure_input@%$configure_input%g
  1490. s%@srcdir@%$srcdir%g
  1491. s%@top_srcdir@%$top_srcdir%g
  1492. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1493. fi; done
  1494. rm -f conftest.subs
  1495.  
  1496. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1497. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1498. #
  1499. # ac_d sets the value in "#define NAME VALUE" lines.
  1500. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1501. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1502. ac_dC='\3'
  1503. ac_dD='%g'
  1504. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1505. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1506. ac_uB='\([     ]\)%\1#\2define\3'
  1507. ac_uC=' '
  1508. ac_uD='\4%g'
  1509. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1510. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1511. ac_eB='$%\1#\2define\3'
  1512. ac_eC=' '
  1513. ac_eD='%g'
  1514.  
  1515. CONFIG_HEADERS=${CONFIG_HEADERS-"jconfig.h:jconfig.cfg"}
  1516. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1517.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1518.   case "$ac_file" in
  1519.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1520.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1521.   *) ac_file_in="${ac_file}.in" ;;
  1522.   esac
  1523.  
  1524.   echo creating $ac_file
  1525.  
  1526.   rm -f conftest.frag conftest.in conftest.out
  1527.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1528.  
  1529. EOF
  1530.  
  1531. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1532. # the proper values into config.h.in to produce config.h.  And first:
  1533. # Protect against being on the right side of a sed subst in config.status. 
  1534. # Protect against being in an unquoted here document in config.status.
  1535. rm -f conftest.vals
  1536. cat > conftest.hdr <<\EOF
  1537. s/[\\&%]/\\&/g
  1538. s%[\\$`]%\\&%g
  1539. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1540. s%ac_d%ac_u%gp
  1541. s%ac_u%ac_e%gp
  1542. EOF
  1543. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1544. rm -f conftest.hdr
  1545.  
  1546. # This sed command replaces #undef with comments.  This is necessary, for
  1547. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1548. # on some systems where configure will not decide to define it.
  1549. cat >> conftest.vals <<\EOF
  1550. EOF
  1551.  
  1552. # Break up conftest.vals because some shells have a limit on
  1553. # the size of here documents, and old seds have small limits too.
  1554. # Maximum number of lines to put in a single here document.
  1555. ac_max_here_lines=12
  1556.  
  1557. rm -f conftest.tail
  1558. while :
  1559. do
  1560.   ac_lines=`grep -c . conftest.vals`
  1561.   # grep -c gives empty output for an empty file on some AIX systems.
  1562.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1563.   # Write a limited-size here document to conftest.frag.
  1564.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1565.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1566.   echo 'CEOF
  1567.   sed -f conftest.frag conftest.in > conftest.out
  1568.   rm -f conftest.in
  1569.   mv conftest.out conftest.in
  1570. ' >> $CONFIG_STATUS
  1571.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1572.   rm -f conftest.vals
  1573.   mv conftest.tail conftest.vals
  1574. done
  1575. rm -f conftest.vals
  1576.  
  1577. cat >> $CONFIG_STATUS <<\EOF
  1578.   rm -f conftest.frag conftest.h
  1579.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1580.   cat conftest.in >> conftest.h
  1581.   rm -f conftest.in
  1582.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1583.     echo "$ac_file is unchanged"
  1584.     rm -f conftest.h
  1585.   else
  1586.     rm -f $ac_file
  1587.     mv conftest.h $ac_file
  1588.   fi
  1589. fi; done
  1590.  
  1591.  
  1592.  
  1593. exit 0
  1594. EOF
  1595. chmod +x $CONFIG_STATUS
  1596. rm -fr confdefs* $ac_clean_files
  1597. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1598.  
  1599.