patches/goffice-01-no-sunmath-lib.diff
author nonsea
Tue, 24 Jun 2008 16:03:04 +0000
changeset 1235 4337d6b3fb42
parent 1233 0d7e552adbcf
child 1241 bae1a57f61a8
permissions -rw-r--r--
2008-06-24 Halton Huo <[email protected]> * SFEgnucash.spec: Add Requires:SFEgoffice BuildRequires:SFEgoffice-devel * base-specs/gnucash.spec: add three new patches * patches/gnucash-01-suncc-function.diff: (added) * patches/gnucash-02-void-return.diff: (added) * patches/gnucash-03-namely-struct.diff: (added) * patches/goffice-01-no-sunmath-lib.diff: (rework)

Index: trunk/configure.in
===================================================================
--- trunk/configure.in	(revision 2123)
+++ trunk/configure.in	(working copy)
@@ -440,7 +440,9 @@
 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`"/.."
+    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 +454,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 +469,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