From 463e83481524213c1c72b06a5494106160dd56ab Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Wed, 30 Jan 2013 15:19:56 -0600 Subject: Search for libm regardless of configure flags. Also switch to checking for sin(), since that's what's needed elsewhere. There are places in the code that require sin() from libm. --- aconfigure | 90 +++++++++++++++++++++++++++++------------------------------ aconfigure.ac | 2 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/aconfigure b/aconfigure index 33ed0be..bc4194b 100755 --- a/aconfigure +++ b/aconfigure @@ -3954,6 +3954,51 @@ _ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 +$as_echo_n "checking for sin in -lm... " >&6; } +if test "${ac_cv_lib_m_sin+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sin (); +int +main () +{ +return sin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sin=yes +else + ac_cv_lib_m_sin=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 +$as_echo "$ac_cv_lib_m_sin" >&6; } +if test "x$ac_cv_lib_m_sin" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 $as_echo_n "checking for uuid_generate in -luuid... " >&6; } if ${ac_cv_lib_uuid_uuid_generate+:} false; then : @@ -4739,51 +4784,6 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if floating point is disabled... no" >&5 $as_echo "Checking if floating point is disabled... no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmod in -lm" >&5 -$as_echo_n "checking for fmod in -lm... " >&6; } -if ${ac_cv_lib_m_fmod+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char fmod (); -int -main () -{ -return fmod (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_fmod=yes -else - ac_cv_lib_m_fmod=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fmod" >&5 -$as_echo "$ac_cv_lib_m_fmod" >&6; } -if test "x$ac_cv_lib_m_fmod" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - fi diff --git a/aconfigure.ac b/aconfigure.ac index 9afce8d..642b6a6 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -120,6 +120,7 @@ AC_CHECK_LIB(winmm,puts) AC_CHECK_LIB(socket,puts) AC_CHECK_LIB(rt,puts) AC_CHECK_LIB(nsl,puts) +AC_CHECK_LIB(m,sin) AC_CHECK_LIB(uuid,uuid_generate) AC_CHECK_LIB(uuid,uuid_generate,[ac_has_uuid_lib=1]) @@ -192,7 +193,6 @@ AC_ARG_ENABLE(floating-point, [ AC_DEFINE(PJ_HAS_FLOATING_POINT,1) AC_MSG_RESULT([Checking if floating point is disabled... no]) - AC_CHECK_LIB(m,fmod) ]) -- cgit v1.2.3