summaryrefslogtreecommitdiffstats
path: root/contrib/amd/config.guess.long
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-09-02 15:27:38 +0000
committermbr <mbr@FreeBSD.org>2003-09-02 15:27:38 +0000
commitccc3812476e334ade5336aa157187088e2026fd3 (patch)
tree145d47d9a3a320657d00eb40dd30cbcaa83fe8a8 /contrib/amd/config.guess.long
parent4dd2d26a989ad3499b4e38ca2a1a4faf7bedabd7 (diff)
parent7d0df748b4c59651751f156e408f856a02073b69 (diff)
downloadFreeBSD-src-ccc3812476e334ade5336aa157187088e2026fd3.zip
FreeBSD-src-ccc3812476e334ade5336aa157187088e2026fd3.tar.gz
This commit was generated by cvs2svn to compensate for changes in r119679,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/amd/config.guess.long')
-rwxr-xr-xcontrib/amd/config.guess.long47
1 files changed, 47 insertions, 0 deletions
diff --git a/contrib/amd/config.guess.long b/contrib/amd/config.guess.long
new file mode 100755
index 0000000..24ace2e
--- /dev/null
+++ b/contrib/amd/config.guess.long
@@ -0,0 +1,47 @@
+#!/bin/sh
+# generate long version of output from config.guess
+# part of am-utils-6.x
+# Erez Zadok <ezk@cs.columbia.edu>
+#
+#set -x
+
+# find a single word that prints the version number of the release
+getver () {
+ l=`head $1`
+ set $l
+ for i in $*
+ do
+ case "$i" in
+ # look for one digit followed by a sequence of non-spaces
+ # so it'll catch 7.3 as well as 2.1AW
+ *[0-9]* ) echo $i; return ;;
+ esac
+ done
+}
+
+if test "x$GCONFIG" = "x" ; then
+ # find dirname of this script
+ base=`echo $0 | sed 's/\/[^\/]*$//' 2>/dev/null`
+ PATH=$base:$PATH
+ export PATH
+ GCONFIG=`config.guess || echo unknown-config`
+fi
+case "${GCONFIG}" in
+ *linux* )
+ GCONFIG=`echo ${GCONFIG} | sed -e 's/i.86/i386/' -e 's/linux-gnu/linux/'`
+ if test -f /etc/redhat-release ; then
+ long=`getver /etc/redhat-release`
+ echo ${GCONFIG}-rh${long}
+ exit 0
+ elif test -f /etc/SuSE-release ; then
+ long=`getver /etc/SuSE-release`
+ echo ${GCONFIG}-suse${long}
+ exit 0
+ else
+ echo ${GCONFIG}
+ fi
+ ;;
+ * ) echo ${GCONFIG}
+ ;;
+esac
+exit 0
OpenPOWER on IntegriCloud