summaryrefslogtreecommitdiffstats
path: root/academic/tilem2/patches/add_-lm_to_libs_r661.patch
blob: 771103558fde7755708e0c921bc2b33e688f8102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff --git a/configure b/configure
index cc4e5ad..26af532 100755
--- a/configure
+++ b/configure
@@ -3456,6 +3456,48 @@ fi
 # Checks for libraries
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if ${ac_cv_lib_m_pow+:} 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 pow ();
+int
+main ()
+{
+return pow ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_pow=yes
+else
+  ac_cv_lib_m_pow=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_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = xyes; then :
+   LIBS="-lm $LIBS"
+fi
+
+
+
 
 # GLib and GTK+
 
@@ -3728,8 +3770,7 @@ fi
   save_libs="$LIBS"
   CFLAGS="$CFLAGS $GTK_CFLAGS"
   LIBS="$LIBS $GTK_LIBS"
-
-ac_fn_c_check_func "$LINENO" "gtk_init" "ac_cv_func_gtk_init"
+   ac_fn_c_check_func "$LINENO" "gtk_init" "ac_cv_func_gtk_init"
 if test "x$ac_cv_func_gtk_init" = xyes; then :
    have_gtk=yes
 else
diff --git a/configure.ac b/configure.ac
index 88e2306..456e4c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,8 @@ AC_CHECK_PROG([UPDATE_MIME_DATABASE],
 
 # Checks for libraries
 
+AC_CHECK_LIB(m, pow, [ LIBS="-lm $LIBS" ])
+
 m4_define(with_flags, [
   save_cflags="$CFLAGS"
   save_libs="$LIBS"