goffice r2128 - trunk



Author: haltonhuo
Date: Wed Jun 25 16:05:56 2008
New Revision: 2128
URL: http://svn.gnome.org/viewvc/goffice?rev=2128&view=rev

Log:

2008-06-25  Halton Huo <halton huo sun com>

	* configure.in: adapt suncc not installed under /opt/SUNWspro,
	fixes #539930



Modified:
   trunk/ChangeLog
   trunk/configure.in

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Jun 25 16:05:56 2008
@@ -440,7 +440,12 @@
 if test $ac_cv_c_long_double = yes; then
     have_mandatory_funcs=yes
     need_sunmath=0
-    sunmathlinkstuff='-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib -lsunmath'
+    ss_cc=`which $CC`
+    ss_dir=`dirname $ss_cc`"/.."
+    if test ! -f $ss_dir/lib/libsunmath.so; then
+        ss_dir="/opt/SUNWspro"
+    fi
+    sunmathlinkstuff="-L$ss_dir/lib -R$ss_dir/lib -lsunmath"
     for ldfunc in fabsl logl log10l ceill floorl powl isnanl finitel; do
 	    AC_CHECK_FUNC($ldfunc,
 		  ,
@@ -452,12 +457,12 @@
 			  [ if test $need_sunmath = 0; then
 				# FIXME: better idea?
 				LDFLAGS="$LDFLAGS $sunmathlinkstuff"
-				sunmathinclude=`ls -d /opt/SUNWspro/*/include/cc | sed '$!d'`
+				sunmathinclude=`ls -d $ss_dir/*/include/cc | sed '$!d'`
 				CPPFLAGS="$CPPFLAGS -I$sunmathinclude"
 			    fi
 			    need_sunmath=1 ],
 			  [have_mandatory_funcs=no],
-			  [-L/opt/SUNWspro/lib $GOFFICE_LIBS])])])
+			  [-L$ss_dir/lib $GOFFICE_LIBS])])])
     done
     if test $need_sunmath = 1; then
 	EXTRA_LIBS="$EXTRA_LIBS $sunmathlinkstuff"
@@ -467,6 +472,8 @@
 			 [AC_MSG_WARN([Long doubles require the $ac_header header.])
 			  have_mandatory_funcs=no])
     fi
+    unset ss_cc
+    unset ss_dir
     unset need_sunmath
     unset sunmathlinkstuff
     unset sunmathinclude



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]