Bug#882538: jpeg-6b configure.in (etc.) reconstruction

Adam Sampson ats at offog.org
Thu Mar 8 17:39:05 UTC 2018


This sounded like an interesting software archeology problem...

Tom Lane of IJG posted a slightly later version of jpeg's configure.in
and associated files to the UnixOS2 mailing list in 2004:
http://unix.os2site.com/pub/list/unixos2/2004/03/2004Mar31000402.txt
> Let's see ... configure is built like this:
> 
> configure: configure.in sed.cfg aclocal.m4
>         autoconf configure.in | sed -f sed.cfg >configure
>         chmod +x configure

I've lightly modified the files he posted so that they exactly reproduce
the configure script in jpeg-6b, which is what's bundled in outguess and
various other packages, when built with autoconf 2.12. The modified
files are attached; you also need libtool.m4 from libtool 1.2.

-- 
Adam Sampson <ats at offog.org>                         <http://offog.org/>
-------------- next part --------------
dnl IJG auto-configuration source file. [reconstructed 2018]
dnl Process this file with autoconf to produce a configure script.
AC_INIT(jcmaster.c)
AC_CONFIG_HEADER(jconfig.h:jconfig.cfg)
dnl
dnl do these first since other macros rely on them
AC_PROG_CC
AC_PROG_CPP
dnl
dnl See if compiler supports prototypes.
AC_MSG_CHECKING(for function prototypes)
AC_CACHE_VAL(ijg_cv_have_prototypes,
[AC_TRY_COMPILE([
int testfunction (int arg1, int * arg2); /* check prototypes */
struct methods_struct {		/* check method-pointer declarations */
  int (*error_exit) (char *msgtext);
  int (*trace_message) (char *msgtext);
  int (*another_method) (void);
};
int testfunction (int arg1, int * arg2) /* check definitions */
{ return arg2[arg1]; }
int test2function (void)	/* check void arg list */
{ return 0; }
], [ ], ijg_cv_have_prototypes=yes, ijg_cv_have_prototypes=no)])
AC_MSG_RESULT($ijg_cv_have_prototypes)
if test $ijg_cv_have_prototypes = yes; then
  AC_DEFINE(HAVE_PROTOTYPES,)
else
  echo Your compiler does not seem to know about function prototypes.
  echo Perhaps it needs a special switch to enable ANSI C mode.
  echo If so, we recommend running configure like this:
  echo "   ./configure  CC='cc -switch'"
  echo where -switch is the proper switch.
fi
dnl
dnl check header files
AC_CHECK_HEADER(stddef.h, AC_DEFINE(HAVE_STDDEF_H,))
AC_CHECK_HEADER(stdlib.h, AC_DEFINE(HAVE_STDLIB_H,))
AC_CHECK_HEADER(string.h,, AC_DEFINE(NEED_BSD_STRINGS,))
dnl See whether type size_t is defined in any ANSI-standard places;
dnl if not, perhaps it is defined in <sys/types.h>.
AC_MSG_CHECKING(for size_t)
AC_TRY_COMPILE([
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
#ifdef NEED_BSD_STRINGS
#include <strings.h>
#else
#include <string.h>
#endif
typedef size_t my_size_t;
], [ my_size_t foovar; ], ijg_size_t_ok=yes,
[ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"])
AC_MSG_RESULT($ijg_size_t_ok)
if test "$ijg_size_t_ok" != yes; then
AC_CHECK_HEADER(sys/types.h, [AC_DEFINE(NEED_SYS_TYPES_H,)
AC_EGREP_CPP(size_t, [#include <sys/types.h>],
[ijg_size_t_ok="size_t is in sys/types.h"], ijg_size_t_ok=no)],
ijg_size_t_ok=no)
AC_MSG_RESULT($ijg_size_t_ok)
if test "$ijg_size_t_ok" = no; then
  echo Type size_t is not defined in any of the usual places.
  echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
fi
fi
dnl
dnl check compiler characteristics
AC_MSG_CHECKING(for type unsigned char)
AC_TRY_COMPILE(, [ unsigned char un_char; ],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_UNSIGNED_CHAR,)], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for type unsigned short)
AC_TRY_COMPILE(, [ unsigned short un_short; ],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_UNSIGNED_SHORT,)], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for type void)
AC_TRY_COMPILE([
/* Caution: a C++ compiler will insist on valid prototypes */
typedef void * void_ptr;	/* check void * */
#ifdef HAVE_PROTOTYPES		/* check ptr to function returning void */
typedef void (*void_func) (int a, int b);
#else
typedef void (*void_func) ();
#endif

#ifdef HAVE_PROTOTYPES		/* check void function result */
void test3function (void_ptr arg1, void_func arg2)
#else
void test3function (arg1, arg2)
     void_ptr arg1;
     void_func arg2;
#endif
{
  char * locptr = (char *) arg1; /* check casting to and from void * */
  arg1 = (void *) locptr;
  (*arg2) (1, 2);		/* check call of fcn returning void */
}
], [ ], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
AC_DEFINE(void,char)])

AC_C_CONST
dnl check for non-broken inline under various spellings
AC_MSG_CHECKING(for inline)
ijg_cv_inline=""
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
int bar() { return foo();], ijg_cv_inline="__inline__",
AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
int bar() { return foo();], ijg_cv_inline="__inline",
AC_TRY_COMPILE(, [} inline int foo() { return 0; }
int bar() { return foo();], ijg_cv_inline="inline")))
AC_MSG_RESULT($ijg_cv_inline)
AC_DEFINE_UNQUOTED(INLINE,$ijg_cv_inline)
dnl we cannot check for bogus warnings, but at least we can check for errors
AC_MSG_CHECKING(for broken incomplete types)
AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
AC_MSG_RESULT(ok),
[AC_MSG_RESULT(broken)
AC_DEFINE(INCOMPLETE_TYPES_BROKEN,)])
dnl test whether global names are unique to at least 15 chars
AC_MSG_CHECKING(for short external names)
AC_TRY_LINK([
int possibly_duplicate_function () { return 0; }
int possibly_dupli_function () { return 1; }
], [ ], AC_MSG_RESULT(ok), [AC_MSG_RESULT(short)
AC_DEFINE(NEED_SHORT_EXTERNAL_NAMES,)])
dnl
dnl run-time checks
AC_MSG_CHECKING(to see if char is signed)
AC_TRY_RUN([
#ifdef HAVE_PROTOTYPES
int is_char_signed (int arg)
#else
int is_char_signed (arg)
     int arg;
#endif
{
  if (arg == 189) {		/* expected result for unsigned char */
    return 0;			/* type char is unsigned */
  }
  else if (arg != -67) {	/* expected result for signed char */
    printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
    printf("I fear the JPEG software will not work at all.\n\n");
  }
  return 1;			/* assume char is signed otherwise */
}
char signed_char_check = (char) (-67);
main() {
  exit(is_char_signed((int) signed_char_check));
}], [AC_MSG_RESULT(no)
AC_DEFINE(CHAR_IS_UNSIGNED,)], AC_MSG_RESULT(yes),
[echo Assuming that char is signed on target machine.
echo If it is unsigned, this will be a little bit inefficient.
])
dnl
AC_MSG_CHECKING(to see if right shift is signed)
AC_TRY_RUN([
#ifdef HAVE_PROTOTYPES
int is_shifting_signed (long arg)
#else
int is_shifting_signed (arg)
     long arg;
#endif
/* See whether right-shift on a long is signed or not. */
{
  long res = arg >> 4;

  if (res == -0x7F7E80CL) {	/* expected result for signed shift */
    return 1;			/* right shift is signed */
  }
  /* see if unsigned-shift hack will fix it. */
  /* we can't just test exact value since it depends on width of long... */
  res |= (~0L) << (32-4);
  if (res == -0x7F7E80CL) {	/* expected result now? */
    return 0;			/* right shift is unsigned */
  }
  printf("Right shift isn't acting as I expect it to.\n");
  printf("I fear the JPEG software will not work at all.\n\n");
  return 0;			/* try it with unsigned anyway */
}
main() {
  exit(is_shifting_signed(-0x7F7E80B1L));
}], [AC_MSG_RESULT(no)
AC_DEFINE(RIGHT_SHIFT_IS_UNSIGNED,)], AC_MSG_RESULT(yes),
AC_MSG_RESULT(Assuming that right shift is signed on target machine.))
dnl
AC_MSG_CHECKING(to see if fopen accepts b spec)
AC_TRY_RUN([
#include <stdio.h>
main() {
  if (fopen("conftestdata", "wb") != NULL)
    exit(0);
  exit(1);
}], AC_MSG_RESULT(yes), [AC_MSG_RESULT(no)
AC_DEFINE(DONT_USE_B_MODE,)],
AC_MSG_RESULT(Assuming that it does.))
dnl
dnl system services
AC_PROG_INSTALL
AC_PROG_RANLIB

# Decide whether to use libtool,
# and if so whether to build shared, static, or both flavors of library.
LTSHARED="no"
AC_ARG_ENABLE(shared,
[  --enable-shared         build shared library using GNU libtool],
LTSHARED="$enableval")
LTSTATIC="no"
AC_ARG_ENABLE(static,
[  --enable-static         build static library using GNU libtool],
LTSTATIC="$enableval")
if test "x$LTSHARED" != xno  -o  "x$LTSTATIC" != xno; then
  USELIBTOOL="yes"
  LIBTOOL="./libtool"
  O="lo"
  A="la"
  LN='$(LIBTOOL) --mode=link $(CC)'
  INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
  INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
else
  USELIBTOOL="no"
  LIBTOOL=""
  O="o"
  A="a"
  LN='$(CC)'
  INSTALL_LIB="$INSTALL_DATA"
fi
AC_SUBST(LIBTOOL)
AC_SUBST(O)
AC_SUBST(A)
AC_SUBST(LN)
AC_SUBST(INSTALL_LIB)

# Configure libtool if needed.
if test $USELIBTOOL = yes; then
  disable_shared=
  disable_static=
  if test "x$LTSHARED" = xno; then
    disable_shared="--disable-shared"
  fi
  if test "x$LTSTATIC" = xno; then
    disable_static="--disable-static"
  fi
  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
fi

# Select memory manager depending on user input.
# If no "-enable-maxmem", use jmemnobs
MEMORYMGR='jmemnobs.$(O)'
MAXMEM="no"
AC_ARG_ENABLE(maxmem,
[  --enable-maxmem[=N]     enable use of temp files, set max mem usage to N MB],
MAXMEM="$enableval")
[# support --with-maxmem for backwards compatibility with IJG V5.]
AC_ARG_WITH(maxmem, , MAXMEM="$withval")
if test "x$MAXMEM" = xyes; then
  MAXMEM=1
fi
if test "x$MAXMEM" != xno; then
changequote(, )dnl
  if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
changequote([, ])dnl
    AC_MSG_ERROR(non-numeric argument to --enable-maxmem)
  fi
  DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
AC_DEFINE_UNQUOTED(DEFAULT_MAX_MEM, ${DEFAULTMAXMEM})
AC_MSG_CHECKING([for 'tmpfile()'])
AC_TRY_LINK([#include <stdio.h>], [ FILE * tfile = tmpfile(); ],
[AC_MSG_RESULT(yes)
MEMORYMGR='jmemansi.$(O)'],
[AC_MSG_RESULT(no)
dnl if tmpfile is not present, must use jmemname.
MEMORYMGR='jmemname.$(O)'
AC_DEFINE(NEED_SIGNAL_CATCHER,)
AC_MSG_CHECKING([for 'mktemp()'])
AC_TRY_LINK(, [ char fname[80]; mktemp(fname); ], AC_MSG_RESULT(yes),
[AC_MSG_RESULT(no)
AC_DEFINE(NO_MKTEMP,)])])
fi
AC_SUBST(MEMORYMGR)

# Extract the library version ID from jpeglib.h.
AC_MSG_CHECKING([libjpeg version number])
[JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`]
AC_MSG_RESULT($JPEG_LIB_VERSION)
AC_SUBST(JPEG_LIB_VERSION)

# Prepare to massage makefile.cfg correctly.
if test $ijg_cv_have_prototypes = yes; then
  A2K_DEPS=""
  COM_A2K="# "
else
  A2K_DEPS="ansi2knr"
  COM_A2K=""
fi
AC_SUBST(A2K_DEPS)
AC_SUBST(COM_A2K)
# ansi2knr needs -DBSD if string.h is missing
if test $ac_cv_header_string_h = no; then
  ANSI2KNRFLAGS="-DBSD"
else
  ANSI2KNRFLAGS=""
fi
AC_SUBST(ANSI2KNRFLAGS)
dnl
# Substitutions to enable or disable libtool-related stuff
if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
  COM_LT=""
else
  COM_LT="# "
fi
AC_SUBST(COM_LT)
if test "x$LTSHARED" != xno; then
  FORCE_INSTALL_LIB="install-lib"
else
  FORCE_INSTALL_LIB=""
fi
AC_SUBST(FORCE_INSTALL_LIB)
dnl
# Set up -I directives
if test "x$srcdir" = x.; then
  INCLUDEFLAGS='-I$(srcdir)'
else
  INCLUDEFLAGS='-I. -I$(srcdir)'
fi
AC_SUBST(INCLUDEFLAGS)
dnl
AC_OUTPUT(Makefile:makefile.cfg)
-------------- next part --------------
dnl [reconstructed 2018]
undefine([AC_CACHE_LOAD])
AC_DEFUN(AC_CACHE_LOAD,[])
undefine([AC_CACHE_SAVE])
AC_DEFUN(AC_CACHE_SAVE,[])
dnl
dnl version 2.12 AC_INIT_PARSE_ARGS(),
dnl modified to recognize options of form VAR=val
dnl
undefine([AC_INIT_PARSE_ARGS])
AC_DEFUN(AC_INIT_PARSE_ARGS,
[
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
dnl Installation directory options.
dnl These are left unexpanded so users can "make install exec_prefix=/foo"
dnl and all the variables that are supposed to be based on exec_prefix
dnl by default will actually change.
dnl Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
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"
    ac_prev=
    continue
  fi

  case "$ac_option" in
changequote(, )dnl
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
changequote([, ])dnl
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$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" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
changequote(, )dnl
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
changequote([, ])dnl
      AC_MSG_ERROR($ac_feature: invalid feature name)
    fi
    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/=.*//'`
    # Reject names that are not valid shell variable names.
changequote(, )dnl
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
changequote([, ])dnl
      AC_MSG_ERROR($ac_feature: invalid feature name)
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    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
changequote(, )dnl
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
changequote([, ])dnl
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$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" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    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" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    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_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    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-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-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    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" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version AC_ACVERSION"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
changequote(, )dnl
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
changequote([, ])dnl
      AC_MSG_ERROR($ac_package: invalid package name)
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
changequote(, )dnl
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
changequote([, ])dnl
      AC_MSG_ERROR($ac_package: invalid package name)
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    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-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" ;;

  -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
    ;;

dnl begin tgl addition
  *=*)
    varname=`echo "$ac_option"|sed -e 's/=.*//'`
    # Reject names that aren't valid shell variable names.
changequote(, )dnl
    if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then
changequote([, ])dnl
      AC_MSG_ERROR([$varname: invalid shell variable name])
    fi
changequote(, )dnl
    val="`echo "$ac_option"|sed 's/[^=]*=//'`"
changequote([, ])dnl
    test -n "$verbose" && echo "	setting shell variable $varname to $val"
    eval "$varname='$val'"
    eval "export $varname" ;;
dnl end tgl addition

  *)
changequote(, )dnl
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
changequote([, ])dnl
      AC_MSG_WARN($ac_option: invalid host type)
    fi
    if test "x$nonopt" != xNONE; then
      AC_MSG_ERROR(can only configure for one host and one target at a time)
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
fi
])
dnl
dnl version 2.12 AC_PROG_CC, modified so that default CFLAGS is set more
dnl appropriately; specifically, default is -O2 for gcc and -O otherwise.
dnl
undefine([AC_PROG_CC])
AC_DEFUN(AC_PROG_CC,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
fi

AC_PROG_CC_WORKS
AC_PROG_CC_GNU

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  test "${CFLAGS+set}" = set || CFLAGS="-O2"
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-O"
fi
])
dnl
dnl Include libtool macros (currently using libtool 1.2)
dnl
sinclude(libtool.m4)dnl
-------------- next part --------------
# Hack autoconf 2.1 configure script:
#
# Disable the conversion of #undef's to comments.
/^s%^\[ 	\]\*#\[ 	\]\*undef\[ 	\]\[ 	\]\*\[a-zA-Z_\]\[a-zA-Z_0-9\]\*%\/\* \& \*\/%/d


More information about the forensics-devel mailing list