head	1.7;
access;
symbols
	REL9_0_0:1.7
	REL9_1_ALPHA1:1.7
	REL9_0_RC1:1.7
	REL9_0_BETA4:1.7
	REL9_0_STABLE:1.7.0.4
	REL9_0_BETA3:1.7
	REL9_0_BETA2:1.7
	REL7_4_29:1.3
	REL8_0_25:1.3
	REL8_1_21:1.3
	REL8_2_17:1.4
	REL8_3_11:1.4
	REL8_4_4:1.5
	REL9_0_BETA1:1.7
	REL9_0_ALPHA5_BRANCH:1.7.0.2
	REL9_0_ALPHA5:1.7
	REL7_4_28:1.3
	REL8_0_24:1.3
	REL8_1_20:1.3
	REL8_2_16:1.4
	REL8_3_10:1.4
	REL8_4_3:1.5
	REL9_0_ALPHA4:1.5
	REL9_0_ALPHA4_BRANCH:1.5.0.10
	REL8_5_ALPHA3:1.5
	REL8_5_ALPHA3_BRANCH:1.5.0.8
	REL7_4_27:1.3
	REL8_0_23:1.3
	REL8_1_19:1.3
	REL8_2_15:1.4
	REL8_3_9:1.4
	REL8_4_2:1.5
	REL8_5_ALPHA2:1.5
	REL8_5_ALPHA2_BRANCH:1.5.0.6
	REL7_4_26:1.3
	REL8_0_22:1.3
	REL8_1_18:1.3
	REL8_2_14:1.4
	REL8_3_8:1.4
	REL8_4_1:1.5
	REL8_5_ALPHA1:1.5
	REL8_5_ALPHA1_BRANCH:1.5.0.4
	REL8_4_STABLE:1.5.0.2
	REL8_4_0:1.5
	REL8_4_RC2:1.4
	REL8_4_RC1:1.4
	REL8_4_BETA2:1.4
	REL8_4_BETA1:1.4
	REL7_4_25:1.3
	REL8_0_21:1.3
	REL8_1_17:1.3
	REL8_2_13:1.4
	REL8_3_7:1.4
	REL7_4_24:1.3
	REL8_0_20:1.3
	REL8_1_16:1.3
	REL8_2_12:1.4
	REL8_3_6:1.4
	REL7_4_23:1.3
	REL8_0_19:1.3
	REL8_1_15:1.3
	REL8_2_11:1.4
	REL8_3_5:1.4
	REL7_4_22:1.3
	REL8_0_18:1.3
	REL8_1_14:1.3
	REL8_2_10:1.4
	REL8_3_4:1.4
	REL7_4_21:1.3
	REL8_0_17:1.3
	REL8_1_13:1.3
	REL8_2_9:1.4
	REL8_3_3:1.4
	REL7_4_20:1.3
	REL8_0_16:1.3
	REL8_1_12:1.3
	REL8_2_8:1.4
	REL8_3_2:1.4
	REL8_2_7:1.4
	REL8_3_1:1.4
	REL8_3_STABLE:1.4.0.4
	REL8_3_0:1.4
	REL8_3_RC2:1.4
	REL7_3_21:1.3
	REL7_4_19:1.3
	REL8_0_15:1.3
	REL8_1_11:1.3
	REL8_2_6:1.4
	REL8_3_RC1:1.4
	REL8_3_BETA4:1.4
	REL8_3_BETA3:1.4
	REL8_3_BETA2:1.4
	REL8_3_BETA1:1.4
	REL7_3_20:1.3
	REL7_4_18:1.3
	REL8_0_14:1.3
	REL8_1_10:1.3
	REL8_2_5:1.4
	REL7_3_19:1.3
	REL7_4_17:1.3
	REL8_0_13:1.3
	REL8_1_9:1.3
	REL8_2_4:1.4
	REL8_0_12:1.3
	REL8_1_8:1.3
	REL8_2_3:1.4
	REL7_3_18:1.3
	REL7_4_16:1.3
	REL8_0_11:1.3
	REL8_1_7:1.3
	REL8_2_2:1.4
	REL8_0_10:1.3
	REL8_1_6:1.3
	REL8_2_1:1.4
	REL7_4_15:1.3
	REL7_3_17:1.3
	REL8_2_STABLE:1.4.0.2
	REL8_2_0:1.4
	REL8_2_RC1:1.4
	REL8_2_BETA3:1.4
	REL8_2_BETA2:1.4
	REL8_1_5:1.3
	REL8_0_9:1.3
	REL7_4_14:1.3
	REL7_3_16:1.3
	REL8_2_BETA1:1.4
	REL7_3_15:1.3
	REL7_4_13:1.3
	REL8_0_8:1.3
	REL8_1_4:1.3
	REL7_3_14:1.3
	REL7_4_12:1.3
	REL8_0_7:1.3
	REL8_1_3:1.3
	REL7_3_13:1.3
	REL7_4_11:1.3
	REL8_0_6:1.3
	REL8_1_2:1.3
	REL7_3_12:1.3
	REL7_4_10:1.3
	REL8_0_5:1.3
	REL8_1_1:1.3
	REL8_1_STABLE:1.3.0.16
	REL8_1_0:1.3
	REL8_1_0RC1:1.3
	REL8_1_0BETA4:1.3
	REL8_1_0BETA3:1.3
	REL7_3_11:1.3
	REL7_4_9:1.3
	REL8_0_4:1.3
	REL8_1_0BETA2:1.3
	REL8_1_0BETA1:1.3
	REL7_2_8:1.3
	REL7_3_10:1.3
	REL7_4_8:1.3
	REL8_0_3:1.3
	REL8_0_2:1.3
	REL7_2_7:1.3
	REL7_3_9:1.3
	REL7_4_7:1.3
	REL8_0_1:1.3
	REL8_0_STABLE:1.3.0.14
	REL8_0_0:1.3.0.12
	REL8_0_0RC5:1.3
	REL8_0_0RC4:1.3
	REL8_0_0RC3:1.3
	REL8_0_0RC2:1.3
	REL8_0_0RC1:1.3
	REL8_0_0BETA5:1.3
	REL8_0_0BETA4:1.3
	REL7_4_6:1.3
	REL7_3_8:1.3
	REL7_2_6:1.3
	REL8_0_0BETA3:1.3
	REL8_0_0BETA2:1.3
	REL7_2_5:1.3
	REL7_4_5:1.3
	REL7_3_7:1.3
	REL7_4_4:1.3
	REL8_0_0BETA1:1.3
	REL7_4_3:1.3
	REL7_4_2:1.3
	REL7_3_6:1.3
	REL7_4_1:1.3
	REL7_3_5:1.3
	REL7_4:1.3
	REL7_4_RC2:1.3
	REL7_4_STABLE:1.3.0.10
	REL7_4_RC1:1.3
	REL7_4_BETA5:1.3
	REL7_4_BETA4:1.3
	REL7_4_BETA3:1.3
	REL7_4_BETA2:1.3
	WIN32_DEV:1.3.0.8
	REL7_4_BETA1:1.3
	REL7_3_4:1.3
	REL7_3_2:1.3
	REL7_2_4:1.3
	REL7_3_STABLE:1.3.0.6
	REL7_2_3:1.3
	REL7_2_STABLE:1.3.0.4
	REL7_2:1.3
	REL7_2_RC2:1.3
	REL7_2_RC1:1.3
	REL7_2_BETA5:1.3
	REL7_2_BETA4:1.3
	REL7_2_BETA3:1.3
	REL7_2_BETA2:1.3
	REL7_2_BETA1:1.3
	REL7_1_2:1.3
	REL7_1_STABLE:1.3.0.2
	REL7_1_BETA:1.2
	REL7_1_BETA3:1.2
	REL7_1_BETA2:1.2
	REL7_1:1.3;
locks; strict;
comment	@# @;


1.7
date	2010.02.22.21.16.50;	author momjian;	state Exp;
branches;
next	1.6;

1.6
date	2010.02.22.18.02.06;	author momjian;	state Exp;
branches;
next	1.5;

1.5
date	2009.06.23.03.46.00;	author tgl;	state Exp;
branches;
next	1.4;

1.4
date	2006.03.11.04.38.28;	author momjian;	state Exp;
branches;
next	1.3;

1.3
date	2001.02.10.22.31.42;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.28.11.53.13;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2000.06.10.18.01.35;	author petere;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Revert configure warning to use "official distribution".
@
text
@#! /bin/sh

# $PostgreSQL: pgsql/config/missing,v 1.6 2010/02/22 18:02:06 momjian Exp $

# This is *not* the GNU `missing' script, although it is similar in
# concept. You can call it from the makefiles to get consistent
# behavior when certain utility programs are missing.

case $1 in
    flex|bison)
        # `missing flex|bison <input> <output>'
        input=$2
        output=$3
        if test -f "$output"; then
            echo "\
***
WARNING: \`$1' is missing on your system. You should only need it
if you changed the file \`$input'; these changes will not take effect.
You can get $1 from a GNU mirror site.
***" >&2
            echo "touch $output"
            touch "$output"
            exit 0
        else # ! test -f $output
            echo "\
***
ERROR: \`$1' is missing on your system. It is needed to create the
file \`$output'. You can either get $1 from a GNU mirror site
or download an official distribution of PostgreSQL, which contains
pre-packaged $1 output.
***" >&2
            exit 1
        fi
        ;;

    perl)
        # `missing perl'
        echo "\
***
ERROR: Perl is missing on your system. It is needed unless you are building
from an unmodified official distribution of PostgreSQL.
***" >&2
        exit 1
        ;;

    *)
        # `missing something-or-other'
        echo "\
***
ERROR: \`$1' is missing on your system.
***" >&2
        exit 1
        ;;
esac
@


1.6
log
@Use the term "bundled distribution" instead of "official distribution" in
configure warnings.
@
text
@d3 1
a3 1
# $PostgreSQL: pgsql/config/missing,v 1.5 2009/06/23 03:46:00 tgl Exp $
d29 1
a29 1
or download an bundled distribution of PostgreSQL, which contains
d41 1
a41 1
from an unmodified bundled distribution of PostgreSQL.
@


1.5
log
@Fix the makefiles to fail cleanly if Perl is needed but not present.  This
used to work as intended, but got broken some time ago (a quoted empty string
is not an empty string), and got broken some more by the changes to generate
ecpg's preproc.y automatically.  Given all the unprotected uses of $(PERL)
elsewhere, it seems best to make use of the $(missing) script rather than
trying to ensure each such use is protected individually.  Also fix various
bits of documentation that omitted to mention Perl as a requirement for
building from a CVS pull.  Per a complaint from Robert Haas.
@
text
@d3 1
a3 1
# $PostgreSQL: pgsql/config/missing,v 1.4 2006/03/11 04:38:28 momjian Exp $
d29 1
a29 1
or download an official distribution of PostgreSQL, which contains
d41 1
a41 1
from an unmodified official distribution of PostgreSQL.
@


1.4
log
@Add CVS tag lines to files that were lacking them.
@
text
@d3 1
a3 1
# $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.314 2006/03/07 02:54:23 momjian Exp $
d20 1
a20 1
***"
d31 1
a31 1
***"
d35 19
@


1.3
log
@Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages
to users.  (Same way flex has been handled for a while.)
@
text
@d3 2
@


1.2
log
@New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
@
text
@d8 2
a9 2
    flex)
        # `missing flex <input> <output>'
d15 1
a15 1
WARNING: \`flex' is missing on your system. You should only need it
d17 1
a17 1
You can get flex from a GNU mirror site.
d25 2
a26 2
ERROR: \`flex' is missing on your system. It is needed to create the
file \`$output'. You can either get flex from a GNU mirror site
d28 1
a28 1
pre-packaged flex output.
@


1.1
log
@Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
@
text
@a1 3
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@@iro.umontreal.ca>, 1996.
d3 30
a32 29
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.

if test $# -eq 0; then
  echo 1>&2 "Try \`$0 --help' for more information"
  exit 1
fi

run=:

case "$1" in
--run)
  # Try to run requested program, and just exit if it succeeds.
  run=
  shift
  "$@@" && exit 0
  ;;
a33 230

# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in

  -h|--h|--he|--hel|--help)
    echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...

Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.

Options:
  -h, --help      display this help and exit
  -v, --version   output version information and exit
  --run           try to run the given command, and emulate it if it fails

Supported PROGRAM values:
  aclocal      touch file \`aclocal.m4'
  autoconf     touch file \`configure'
  autoheader   touch file \`config.h.in'
  automake     touch all \`Makefile.in' files
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
  flex         create \`lex.yy.c', if possible, from existing .c
  help2man     touch the output file
  lex          create \`lex.yy.c', if possible, from existing .c
  makeinfo     touch the output file
  tar          try tar, gnutar, gtar, then tar without non-portable flags
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
    ;;

  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
    echo "missing 0.3 - GNU automake"
    ;;

  -*)
    echo 1>&2 "$0: Unknown \`$1' option"
    echo 1>&2 "Try \`$0 --help' for more information"
    exit 1
    ;;

  aclocal)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified \`acinclude.m4' or \`configure.in'.  You might want
         to install the \`Automake' and \`Perl' packages.  Grab them from
         any GNU archive site."
    touch aclocal.m4
    ;;

  autoconf)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified \`configure.in'.  You might want to install the
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
         archive site."
    touch configure
    ;;

  autoheader)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified \`acconfig.h' or \`configure.in'.  You might want
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
         from any GNU archive site."
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
    test -z "$files" && files="config.h"
    touch_files=
    for f in $files; do
      case "$f" in
      *:*) touch_files="$touch_files "`echo "$f" |
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
      *) touch_files="$touch_files $f.in";;
      esac
    done
    touch $touch_files
    ;;

  automake)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
         You might want to install the \`Automake' and \`Perl' packages.
         Grab them from any GNU archive site."
    find . -type f -name Makefile.am -print |
	   sed 's/\.am$/.in/' |
	   while read f; do touch "$f"; done
    ;;

  bison|yacc)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified a \`.y' file.  You may need the \`Bison' package
         in order for those modifications to take effect.  You can get
         \`Bison' from any GNU archive site."
    rm -f y.tab.c y.tab.h
    if [ $# -ne 1 ]; then
        eval LASTARG="\${$#}"
	case "$LASTARG" in
	*.y)
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" y.tab.c
	    fi
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" y.tab.h
	    fi
	  ;;
	esac
    fi
    if [ ! -f y.tab.h ]; then
	echo >y.tab.h
    fi
    if [ ! -f y.tab.c ]; then
	echo 'main() { return 0; }' >y.tab.c
    fi
    ;;

  lex|flex)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified a \`.l' file.  You may need the \`Flex' package
         in order for those modifications to take effect.  You can get
         \`Flex' from any GNU archive site."
    rm -f lex.yy.c
    if [ $# -ne 1 ]; then
        eval LASTARG="\${$#}"
	case "$LASTARG" in
	*.l)
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
	    if [ -f "$SRCFILE" ]; then
	         cp "$SRCFILE" lex.yy.c
	    fi
	  ;;
	esac
    fi
    if [ ! -f lex.yy.c ]; then
	echo 'main() { return 0; }' >lex.yy.c
    fi
    ;;

  help2man)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
	 you modified a dependancy of a manual page.  You may need the
	 \`Help2man' package in order for those modifications to take
	 effect.  You can get \`Help2man' from any GNU archive site."

    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
    if test -z "$file"; then
	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
    fi
    if [ -f "$file" ]; then
	touch $file
    else
	test -z "$file" || exec >$file
	echo ".ab help2man is required to generate this page"
	exit 1
    fi
    ;;

  makeinfo)
    echo 1>&2 "\
WARNING: \`$1' is missing on your system.  You should only need it if
         you modified a \`.texi' or \`.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy \`make' (AIX,
         DU, IRIX).  You might want to install the \`Texinfo' package or
         the \`GNU make' package.  Grab either from any GNU archive site."
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
    if test -z "$file"; then
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
      file=`sed -n '/^@@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
    fi
    touch $file
    ;;

  tar)
    shift
    if test -n "$run"; then
      echo 1>&2 "ERROR: \`tar' requires --run"
      exit 1
    fi

    # We have already tried tar in the generic part.
    # Look for gnutar/gtar before invocation to avoid ugly error
    # messages.
    if (gnutar --version > /dev/null 2>&1); then
       gnutar ${1+"$@@"} && exit 0
    fi
    if (gtar --version > /dev/null 2>&1); then
       gtar ${1+"$@@"} && exit 0
    fi
    firstarg="$1"
    if shift; then
	case "$firstarg" in
	*o*)
	    firstarg=`echo "$firstarg" | sed s/o//`
	    tar "$firstarg" ${1+"$@@"} && exit 0
	    ;;
	esac
	case "$firstarg" in
	*h*)
	    firstarg=`echo "$firstarg" | sed s/h//`
	    tar "$firstarg" ${1+"$@@"} && exit 0
	    ;;
	esac
    fi

    echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
         You may want to install GNU tar or Free paxutils, or check the
         command line arguments."
    exit 1
    ;;

  *)
    echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
         system.  You might have modified some files without having the
         proper tools for further handling them.  Check the \`README' file,
         it often tells you about the needed prerequirements for installing
         this package.  You may also peek at any GNU archive site, in case
         some other package would contain this missing \`$1' program."
    exit 1
    ;;
esac

exit 0
@
