]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix so that AR/AROPTIONS can be overridden on the configure command line when
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 9 Dec 2006 23:43:54 +0000 (23:43 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sat, 9 Dec 2006 23:43:54 +0000 (23:43 +0000)
using Sun CC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/aclocal/bakefile.m4
configure
configure.in

index bb18976ac6eca84c3a62517ecbf50452585b60df..944b485467b2cfcc046d614518e686695daa116c 100644 (file)
@@ -601,9 +601,9 @@ AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
         dnl Sun C++ compiler requires special way of creating static libs;
         dnl see here for more details:
         dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863
-        AR=$CXX
+        AR=${AR:-"$CXX"}
         AC_SUBST(AR)
-        AROPTIONS="-xar -o"
+        AROPTIONS=${AROPTIONS:-"-xar -o"}
     else
         AC_CHECK_TOOL(AR, ar, ar)
         AROPTIONS=rcu
index eb6e32d6c87af528dc614619b5ea8c201871c89d..b7b63f37c78dfb2f44affd5e5ffd5f3ca752b3ee 100755 (executable)
--- a/configure
+++ b/configure
@@ -15219,7 +15219,8 @@ else
 fi
 
 
-if test -n "$ac_tool_prefix"; then
+if test "x$SUNCXX" != xyes; then
+    if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -15298,10 +15299,11 @@ else
   AR="$ac_cv_prog_AR"
 fi
 
-if test "x$AR" = "x" ; then
-    { { echo "$as_me:$LINENO: error: ar is needed to build wxWidgets" >&5
+    if test "x$AR" = "x" ; then
+        { { echo "$as_me:$LINENO: error: ar is needed to build wxWidgets" >&5
 echo "$as_me: error: ar is needed to build wxWidgets" >&2;}
    { (exit 1); exit 1; }; }
+    fi
 fi
 
 # Find a good install program.  We prefer a C program (faster),
@@ -47931,9 +47933,9 @@ fi
 
 
     if test "x$SUNCXX" = "xyes"; then
-                                AR=$CXX
+                                AR=${AR:-"$CXX"}
 
-        AROPTIONS="-xar -o"
+        AROPTIONS=${AROPTIONS:-"-xar -o"}
     else
         if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
index b2f0e97e4027087a3ae91ad8d8f247c6da026316..a4bc9210a87eff2ac8adfcc146353d750c5383e7 100644 (file)
@@ -1465,9 +1465,13 @@ AC_PROG_RANLIB
 
 dnl ar command
 dnl   defines AR with the appropriate command
-AC_CHECK_TOOL(AR, ar)
-if test "x$AR" = "x" ; then
-    AC_MSG_ERROR([ar is needed to build wxWidgets])
+dnl 
+dnl For Sun CC AC_BAKEFILE below sets AR to the compiler itself.
+if test "x$SUNCXX" != xyes; then
+    AC_CHECK_TOOL(AR, ar)
+    if test "x$AR" = "x" ; then
+        AC_MSG_ERROR([ar is needed to build wxWidgets])
+    fi
 fi
 
 dnl install checks