postgresql/config/missing
Peter Eisentraut f03fc94e7d 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.
2000-08-28 11:53:23 +00:00

34 lines
955 B
Bash
Executable File

#! /bin/sh
# 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)
# `missing flex <input> <output>'
input=$2
output=$3
if test -f "$output"; then
echo "\
***
WARNING: \`flex' 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 flex from a GNU mirror site.
***"
echo "touch $output"
touch "$output"
exit 0
else # ! test -f $output
echo "\
***
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
or download an official distribution of PostgreSQL, which contains
pre-packaged flex output.
***"
exit 1
fi
;;
esac