Skip to content

Commit

Permalink
revert math library check
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Sep 10, 2023
1 parent 1a52f3f commit 4dde2a6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
38 changes: 28 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5126,7 +5126,7 @@ MAGICK_PATCHLEVEL_VERSION=94

MAGICK_VERSION=6.9.12-94

MAGICK_GIT_REVISION=101d01aa2:20230910
MAGICK_GIT_REVISION=1a52f3f21:20230910


# Substitute library versioning
Expand Down Expand Up @@ -26169,28 +26169,46 @@ fi
# Find math library
#
MATH_LIBS=''
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
printf %s "checking for sqrt in -lm... " >&6; }
if test ${ac_cv_lib_m_sqrt+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */


#include <math.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. */
char sqrt ();
int
main (void)
{

double x = sqrt(2.0);

return sqrt ();
;
return 0;
}

_ACEOF
if ac_fn_c_try_compile "$LINENO"
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_m_sqrt=yes
else $as_nop
ac_cv_lib_m_sqrt=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; }
if test "x$ac_cv_lib_m_sqrt" = xyes
then :
MATH_LIBS="-lm"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

LIBS="$MATH_LIBS $LIBS"


Expand Down
8 changes: 1 addition & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1060,13 +1060,7 @@ AC_FUNC_STRERROR_R
# Find math library
#
MATH_LIBS=''
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <math.h>
]], [[
double x = sqrt(2.0);
]])
], [MATH_LIBS="-lm"], [])
AC_CHECK_LIB([m],[sqrt],[MATH_LIBS="-lm"],[])
LIBS="$MATH_LIBS $LIBS"
AC_SUBST([MATH_LIBS])

Expand Down

0 comments on commit 4dde2a6

Please sign in to comment.