Search
lxdream.org :: lxdream :: r1284:0db0a5e72698
lxdream 0.9.1
released Jun 29
Download Now
changeset1284:0db0a5e72698
parent1283:2cbafe321d6f
child1285:f72cfb134a87
authornkeynes
dateTue Apr 17 21:35:38 2012 +1000 (7 years ago)
Check for sqrt() in libm if needed (required on some platforms)
Baesd on patch from guinux, thanks!
configure
configure.in
1.1 --- a/configure Tue Mar 27 17:39:05 2012 +1000
1.2 +++ b/configure Tue Apr 17 21:35:38 2012 +1000
1.3 @@ -689,6 +689,7 @@
1.4 ANDROID_SDK_VERSION
1.5 ANDROID_NDK_VERSION
1.6 ANDROID_GDBSERVER
1.7 +GDB
1.8 GUI_ANDROID_TRUE
1.9 GUI_ANDROID_FALSE
1.10 CC
1.11 @@ -2747,6 +2748,7 @@
1.12 CPP="$ANDROID_NDK_BIN/${host_alias}-cpp"
1.13 LD="$ANDROID_NDK_BIN/${host_alias}-ld"
1.14 AR="$ANDROID_NDK_BIN/${host_alias}-ar"
1.15 + GDB="$ANDROID_NDK_BIN/${host_alias}-gdb"
1.16 RANLIB="$ANDROID_NDK_BIN/${host_alias}-ranlib"
1.17 STRIP="$ANDROID_NDK_BIN/${host_alias}-strip"
1.18 OBJDUMP="$ANDROID_NDK_BIN/${host_alias}-objdump"
1.19 @@ -2761,6 +2763,7 @@
1.20
1.21
1.22
1.23 +
1.24 ANDROID_BUILD=yes
1.25 cross_compiling=yes
1.26 fi
1.27 @@ -10830,6 +10833,78 @@
1.28 fi
1.29
1.30
1.31 +
1.32 +{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
1.33 +echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
1.34 +if test "${ac_cv_lib_m_sqrt+set}" = set; then
1.35 + echo $ECHO_N "(cached) $ECHO_C" >&6
1.36 +else
1.37 + ac_check_lib_save_LIBS=$LIBS
1.38 +LIBS="-lm $LIBS"
1.39 +cat >conftest.$ac_ext <<_ACEOF
1.40 +/* confdefs.h. */
1.41 +_ACEOF
1.42 +cat confdefs.h >>conftest.$ac_ext
1.43 +cat >>conftest.$ac_ext <<_ACEOF
1.44 +/* end confdefs.h. */
1.45 +
1.46 +/* Override any GCC internal prototype to avoid an error.
1.47 + Use char because int might match the return type of a GCC
1.48 + builtin and then its argument prototype would still apply. */
1.49 +#ifdef __cplusplus
1.50 +extern "C"
1.51 +#endif
1.52 +char sqrt ();
1.53 +int
1.54 +main ()
1.55 +{
1.56 +return sqrt ();
1.57 + ;
1.58 + return 0;
1.59 +}
1.60 +_ACEOF
1.61 +rm -f conftest.$ac_objext conftest$ac_exeext
1.62 +if { (ac_try="$ac_link"
1.63 +case "(($ac_try" in
1.64 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1.65 + *) ac_try_echo=$ac_try;;
1.66 +esac
1.67 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
1.68 + (eval "$ac_link") 2>conftest.er1
1.69 + ac_status=$?
1.70 + grep -v '^ *+' conftest.er1 >conftest.err
1.71 + rm -f conftest.er1
1.72 + cat conftest.err >&5
1.73 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1.74 + (exit $ac_status); } && {
1.75 + test -z "$ac_c_werror_flag" ||
1.76 + test ! -s conftest.err
1.77 + } && test -s conftest$ac_exeext &&
1.78 + $as_test_x conftest$ac_exeext; then
1.79 + ac_cv_lib_m_sqrt=yes
1.80 +else
1.81 + echo "$as_me: failed program was:" >&5
1.82 +sed 's/^/| /' conftest.$ac_ext >&5
1.83 +
1.84 + ac_cv_lib_m_sqrt=no
1.85 +fi
1.86 +
1.87 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
1.88 + conftest$ac_exeext conftest.$ac_ext
1.89 +LIBS=$ac_check_lib_save_LIBS
1.90 +fi
1.91 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
1.92 +echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
1.93 +if test $ac_cv_lib_m_sqrt = yes; then
1.94 + cat >>confdefs.h <<_ACEOF
1.95 +#define HAVE_LIBM 1
1.96 +_ACEOF
1.97 +
1.98 + LIBS="-lm $LIBS"
1.99 +
1.100 +fi
1.101 +
1.102 +
1.103 if test "x$with_gtk" = "xno"; then
1.104
1.105 pkg_failed=no
1.106 @@ -16784,6 +16859,7 @@
1.107 ANDROID_SDK_VERSION!$ANDROID_SDK_VERSION$ac_delim
1.108 ANDROID_NDK_VERSION!$ANDROID_NDK_VERSION$ac_delim
1.109 ANDROID_GDBSERVER!$ANDROID_GDBSERVER$ac_delim
1.110 +GDB!$GDB$ac_delim
1.111 GUI_ANDROID_TRUE!$GUI_ANDROID_TRUE$ac_delim
1.112 GUI_ANDROID_FALSE!$GUI_ANDROID_FALSE$ac_delim
1.113 CC!$CC$ac_delim
1.114 @@ -16804,7 +16880,6 @@
1.115 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
1.116 CPP!$CPP$ac_delim
1.117 CC!$CC$ac_delim
1.118 -CFLAGS!$CFLAGS$ac_delim
1.119 _ACEOF
1.120
1.121 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
1.122 @@ -16846,6 +16921,7 @@
1.123 ac_delim='%!_!# '
1.124 for ac_last_try in false false false false false :; do
1.125 cat >conf$$subs.sed <<_ACEOF
1.126 +CFLAGS!$CFLAGS$ac_delim
1.127 CPPFLAGS!$CPPFLAGS$ac_delim
1.128 CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
1.129 ac_ct_CC_FOR_BUILD!$ac_ct_CC_FOR_BUILD$ac_delim
1.130 @@ -16942,7 +17018,6 @@
1.131 BUILD_SYSTEST_TRUE!$BUILD_SYSTEST_TRUE$ac_delim
1.132 BUILD_SYSTEST_FALSE!$BUILD_SYSTEST_FALSE$ac_delim
1.133 BUILD_ARMTEST_TRUE!$BUILD_ARMTEST_TRUE$ac_delim
1.134 -BUILD_ARMTEST_FALSE!$BUILD_ARMTEST_FALSE$ac_delim
1.135 _ACEOF
1.136
1.137 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
1.138 @@ -16984,6 +17059,7 @@
1.139 ac_delim='%!_!# '
1.140 for ac_last_try in false false false false false :; do
1.141 cat >conf$$subs.sed <<_ACEOF
1.142 +BUILD_ARMTEST_FALSE!$BUILD_ARMTEST_FALSE$ac_delim
1.143 LXDREAM_LIBS!$LXDREAM_LIBS$ac_delim
1.144 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
1.145 USE_NLS!$USE_NLS$ac_delim
1.146 @@ -17006,7 +17082,7 @@
1.147 LTLIBOBJS!$LTLIBOBJS$ac_delim
1.148 _ACEOF
1.149
1.150 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
1.151 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
1.152 break
1.153 elif $ac_last_try; then
1.154 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
2.1 --- a/configure.in Tue Mar 27 17:39:05 2012 +1000
2.2 +++ b/configure.in Tue Apr 17 21:35:38 2012 +1000
2.3 @@ -224,6 +224,9 @@
2.4 echo "Zlib (libz.so) could not be found, but is required."
2.5 exit 1])
2.6
2.7 +dnl Check for libm (optional, required on some platforms)
2.8 +AC_CHECK_LIB(m, sqrt)
2.9 +
2.10 if test "x$with_gtk" = "xno"; then
2.11 dnl Check for GLIB only
2.12 PKG_CHECK_MODULES(GLIB, glib-2.0)
.