llvm.org GIT mirror llvm / 3484a99
Make sure that libm is used during config tests so that ceil, floor, and friends are actually detected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25454 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 14 years ago
3 changed file(s) with 77 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
449449
450450 dnl libelf is for sparc only; we can ignore it if we don't have it
451451 AC_CHECK_LIB(elf, elf_begin)
452
452 AC_CHECK_LIB(m,sin)
453453
454454 dnl lt_dlopen may be required for plugin support.
455455 AC_SEARCH_LIBS(lt_dlopen,ltdl,AC_DEFINE([HAVE_LT_DLOPEN],[1],
2498024980 fi
2498124981
2498224982
24983 echo "$as_me:$LINENO: checking for sin in -lm" >&5
24984 echo $ECHO_N "checking for sin in -lm... $ECHO_C" >&6
24985 if test "${ac_cv_lib_m_sin+set}" = set; then
24986 echo $ECHO_N "(cached) $ECHO_C" >&6
24987 else
24988 ac_check_lib_save_LIBS=$LIBS
24989 LIBS="-lm $LIBS"
24990 cat >conftest.$ac_ext <<_ACEOF
24991 /* confdefs.h. */
24992 _ACEOF
24993 cat confdefs.h >>conftest.$ac_ext
24994 cat >>conftest.$ac_ext <<_ACEOF
24995 /* end confdefs.h. */
24996
24997 /* Override any gcc2 internal prototype to avoid an error. */
24998 #ifdef __cplusplus
24999 extern "C"
25000 #endif
25001 /* We use char because int might match the return type of a gcc2
25002 builtin and then its argument prototype would still apply. */
25003 char sin ();
25004 int
25005 main ()
25006 {
25007 sin ();
25008 ;
25009 return 0;
25010 }
25011 _ACEOF
25012 rm -f conftest.$ac_objext conftest$ac_exeext
25013 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
25014 (eval $ac_link) 2>conftest.er1
25015 ac_status=$?
25016 grep -v '^ *+' conftest.er1 >conftest.err
25017 rm -f conftest.er1
25018 cat conftest.err >&5
25019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25020 (exit $ac_status); } &&
25021 { ac_try='test -z "$ac_c_werror_flag"
25022 || test ! -s conftest.err'
25023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25024 (eval $ac_try) 2>&5
25025 ac_status=$?
25026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25027 (exit $ac_status); }; } &&
25028 { ac_try='test -s conftest$ac_exeext'
25029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
25030 (eval $ac_try) 2>&5
25031 ac_status=$?
25032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25033 (exit $ac_status); }; }; then
25034 ac_cv_lib_m_sin=yes
25035 else
25036 echo "$as_me: failed program was:" >&5
25037 sed 's/^/| /' conftest.$ac_ext >&5
25038
25039 ac_cv_lib_m_sin=no
25040 fi
25041 rm -f conftest.err conftest.$ac_objext \
25042 conftest$ac_exeext conftest.$ac_ext
25043 LIBS=$ac_check_lib_save_LIBS
25044 fi
25045 echo "$as_me:$LINENO: result: $ac_cv_lib_m_sin" >&5
25046 echo "${ECHO_T}$ac_cv_lib_m_sin" >&6
25047 if test $ac_cv_lib_m_sin = yes; then
25048 cat >>confdefs.h <<_ACEOF
25049 #define HAVE_LIBM 1
25050 _ACEOF
25051
25052 LIBS="-lm $LIBS"
25053
25054 fi
25055
2498325056
2498425057 echo "$as_me:$LINENO: checking for library containing lt_dlopen" >&5
2498525058 echo $ECHO_N "checking for library containing lt_dlopen... $ECHO_C" >&6
170170
171171 /* Define to 1 if you have the `elf' library (-lelf). */
172172 #undef HAVE_LIBELF
173
174 /* Define to 1 if you have the `m' library (-lm). */
175 #undef HAVE_LIBM
173176
174177 /* Define to 1 if you have the `pthread' library (-lpthread). */
175178 #undef HAVE_LIBPTHREAD