build: update search paths for solaris cc 28/12528/2
authorMichael Meffie <mmeffie@sinenomine.net>
Sun, 26 Feb 2017 01:33:00 +0000 (20:33 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 27 Feb 2017 01:28:03 +0000 (20:28 -0500)
Move the macros to search for the solaris cc to a separate macro and
update the search paths to keep up with released versions.

Change-Id: Iaba816f1acf5f45d4e147ae517e73949eb8fe949
Reviewed-on: https://gerrit.openafs.org/12528
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

acinclude.m4
src/cf/solaris-cc.m4 [new file with mode: 0644]

index 1e40e9a..1b2007c 100644 (file)
@@ -461,11 +461,7 @@ case $system in
         *-solaris*)
                MKAFS_OSTYPE=SOLARIS
                 AC_MSG_RESULT(sun4)
-               AC_PATH_PROG(SOLARISCC, [cc], ,
-                   [/opt/SUNWspro/bin:/opt/SunStudioExpress/bin:/opt/solarisstudio12.3/bin:/opt/solstudio12.2/bin:/opt/sunstudio12.1/bin])
-               if test "x$SOLARISCC" = "x" ; then
-                   AC_MSG_FAILURE(Could not find the solaris cc program.  Please define the environment variable SOLARISCC to specify the path.)
-               fi
+               SOLARIS_PATH_CC
                SOLARIS_UFSVFS_HAS_DQRWLOCK
                SOLARIS_FS_HAS_FS_ROLLED
                SOLARIS_SOLOOKUP_TAKES_SOCKPARAMS
diff --git a/src/cf/solaris-cc.m4 b/src/cf/solaris-cc.m4
new file mode 100644 (file)
index 0000000..820108e
--- /dev/null
@@ -0,0 +1,15 @@
+AC_DEFUN([SOLARIS_PATH_CC], [
+  AC_PATH_PROG([SOLARISCC], [cc], [],
+    [m4_join([:],
+      [/opt/SUNWspro/bin],
+      [/opt/SunStudioExpress/bin],
+      [/opt/developerstudio12.5/bin],
+      [/opt/solarisstudio12.4/bin],
+      [/opt/solarisstudio12.3/bin],
+      [/opt/solstudio12.2/bin],
+      [/opt/sunstudio12.1/bin])])
+   AS_IF([test "x$SOLARISCC" = "x"],
+      [AC_MSG_FAILURE([m4_join([ ],
+         [Could not find the solaris cc program.],
+         [Please define the environment variable SOLARISCC to specify the path.])])])
+])