add_-lm_to_libs_r661.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. diff --git a/configure b/configure
  2. index cc4e5ad..26af532 100755
  3. --- a/configure
  4. +++ b/configure
  5. @@ -3456,6 +3456,48 @@ fi
  6. # Checks for libraries
  7. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
  8. +$as_echo_n "checking for pow in -lm... " >&6; }
  9. +if ${ac_cv_lib_m_pow+:} false; then :
  10. + $as_echo_n "(cached) " >&6
  11. +else
  12. + ac_check_lib_save_LIBS=$LIBS
  13. +LIBS="-lm $LIBS"
  14. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  15. +/* end confdefs.h. */
  16. +
  17. +/* Override any GCC internal prototype to avoid an error.
  18. + Use char because int might match the return type of a GCC
  19. + builtin and then its argument prototype would still apply. */
  20. +#ifdef __cplusplus
  21. +extern "C"
  22. +#endif
  23. +char pow ();
  24. +int
  25. +main ()
  26. +{
  27. +return pow ();
  28. + ;
  29. + return 0;
  30. +}
  31. +_ACEOF
  32. +if ac_fn_c_try_link "$LINENO"; then :
  33. + ac_cv_lib_m_pow=yes
  34. +else
  35. + ac_cv_lib_m_pow=no
  36. +fi
  37. +rm -f core conftest.err conftest.$ac_objext \
  38. + conftest$ac_exeext conftest.$ac_ext
  39. +LIBS=$ac_check_lib_save_LIBS
  40. +fi
  41. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
  42. +$as_echo "$ac_cv_lib_m_pow" >&6; }
  43. +if test "x$ac_cv_lib_m_pow" = xyes; then :
  44. + LIBS="-lm $LIBS"
  45. +fi
  46. +
  47. +
  48. +
  49. # GLib and GTK+
  50. @@ -3728,8 +3770,7 @@ fi
  51. save_libs="$LIBS"
  52. CFLAGS="$CFLAGS $GTK_CFLAGS"
  53. LIBS="$LIBS $GTK_LIBS"
  54. -
  55. -ac_fn_c_check_func "$LINENO" "gtk_init" "ac_cv_func_gtk_init"
  56. + ac_fn_c_check_func "$LINENO" "gtk_init" "ac_cv_func_gtk_init"
  57. if test "x$ac_cv_func_gtk_init" = xyes; then :
  58. have_gtk=yes
  59. else
  60. diff --git a/configure.ac b/configure.ac
  61. index 88e2306..456e4c7 100644
  62. --- a/configure.ac
  63. +++ b/configure.ac
  64. @@ -37,6 +37,8 @@ AC_CHECK_PROG([UPDATE_MIME_DATABASE],
  65. # Checks for libraries
  66. +AC_CHECK_LIB(m, pow, [ LIBS="-lm $LIBS" ])
  67. +
  68. m4_define(with_flags, [
  69. save_cflags="$CFLAGS"
  70. save_libs="$LIBS"