1258
|
1 |
Index: trunk/configure.in
|
|
2 |
===================================================================
|
|
3 |
--- trunk/configure.in (revision 2123)
|
|
4 |
+++ trunk/configure.in (working copy)
|
|
5 |
@@ -440,7 +440,12 @@
|
|
6 |
if test $ac_cv_c_long_double = yes; then
|
|
7 |
have_mandatory_funcs=yes
|
|
8 |
need_sunmath=0
|
|
9 |
- sunmathlinkstuff='-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib -lsunmath'
|
|
10 |
+ ss_cc=`which $CC`
|
|
11 |
+ ss_dir=`dirname $ss_cc`"/.."
|
|
12 |
+ if test ! -f $ss_dir/lib/libsunmath.so; then
|
|
13 |
+ ss_dir="/opt/SUNWspro"
|
|
14 |
+ fi
|
|
15 |
+ sunmathlinkstuff="-L$ss_dir/lib -R$ss_dir/lib -lsunmath"
|
|
16 |
for ldfunc in fabsl logl log10l ceill floorl powl isnanl finitel; do
|
|
17 |
AC_CHECK_FUNC($ldfunc,
|
|
18 |
,
|
|
19 |
@@ -452,12 +457,12 @@
|
|
20 |
[ if test $need_sunmath = 0; then
|
|
21 |
# FIXME: better idea?
|
|
22 |
LDFLAGS="$LDFLAGS $sunmathlinkstuff"
|
|
23 |
- sunmathinclude=`ls -d /opt/SUNWspro/*/include/cc | sed '$!d'`
|
|
24 |
+ sunmathinclude=`ls -d $ss_dir/*/include/cc | sed '$!d'`
|
|
25 |
CPPFLAGS="$CPPFLAGS -I$sunmathinclude"
|
|
26 |
fi
|
|
27 |
need_sunmath=1 ],
|
|
28 |
[have_mandatory_funcs=no],
|
|
29 |
- [-L/opt/SUNWspro/lib $GOFFICE_LIBS])])])
|
|
30 |
+ [-L$ss_dir/lib $GOFFICE_LIBS])])])
|
|
31 |
done
|
|
32 |
if test $need_sunmath = 1; then
|
|
33 |
EXTRA_LIBS="$EXTRA_LIBS $sunmathlinkstuff"
|
|
34 |
@@ -467,6 +472,8 @@
|
|
35 |
[AC_MSG_WARN([Long doubles require the $ac_header header.])
|
|
36 |
have_mandatory_funcs=no])
|
|
37 |
fi
|
|
38 |
+ unset ss_cc
|
|
39 |
+ unset ss_dir
|
|
40 |
unset need_sunmath
|
|
41 |
unset sunmathlinkstuff
|
|
42 |
unset sunmathinclude
|