summaryrefslogtreecommitdiffstats
path: root/Templates/cxxconfigure.in
diff options
context:
space:
mode:
Diffstat (limited to 'Templates/cxxconfigure.in')
-rw-r--r--Templates/cxxconfigure.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/Templates/cxxconfigure.in b/Templates/cxxconfigure.in
index 4529e0d..d1a891e 100644
--- a/Templates/cxxconfigure.in
+++ b/Templates/cxxconfigure.in
@@ -11,6 +11,28 @@ save_CXXFLAGS=$CXXFLAGS
AC_PROG_CXX
+# Step 1: set the variable "system" to hold the name and version number
+# for the system. This can usually be done via the "uname" command, but
+# there are a few systems, like Next, where this doesn't work.
+
+AC_MSG_CHECKING([system version (for dynamic loading)])
+if test -f /usr/lib/NextStep/software_version; then
+ system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
+else
+ system=`uname -s`-`uname -r`
+ if test "$?" -ne 0 ; then
+ AC_MSG_RESULT([unknown (can't find uname command)])
+ system=unknown
+ else
+ # Special check for weird MP-RAS system (uname returns weird
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+ system=MP-RAS-`awk '{print $3}' /etc/.relid'`
+ fi
+ AC_MSG_RESULT($system)
+ fi
+fi
# restore the flags specified by the user and get rid of any flags
# found by autoconf (we do not want -02 -g by default)