Blob Blame History Raw
Patch by Robert Scheck <robert@fedoraproject.org> for xfce4-sensors-plugin >= 1.0.0, which adds
the missing (former implicit) linking to libm. It corrects the typo with the missing backslash in
the Makefile.am as well to get linking to libxfce4panel and libsensors again. As implicit linking
can be dangerous, Fedora has changed this behaviour. For more information have a look to Red Hat
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=564840

--- xfce4-sensors-plugin-1.0.0/configure.in			2010-03-27 16:12:11.000000000 +0100
+++ xfce4-sensors-plugin-1.0.0/configure.in.dso			2010-06-04 01:38:29.000000000 +0200
@@ -276,6 +276,9 @@
 AC_CHECK_LIB(nsl, kstat_open, SOLLIBS="$SOLLIBS -linet_ntop", SOLLIBS="$SOLLIBS")
 AC_SUBST(SOLLIBS)
 
+AC_CHECK_LIB(m, ceilf, LIBM="-lm", AC_MSG_ERROR(Missing working libm math lib))
+AC_SUBST(LIBM)
+
 dnl **************************************
 dnl *** Substitute version information ***
 dnl **************************************
--- xfce4-sensors-plugin-1.0.0/panel-plugin/Makefile.am		2009-11-06 12:02:11.000000000 +0100
+++ xfce4-sensors-plugin-1.0.0/panel-plugin/Makefile.am.dso	2010-06-04 01:39:38.000000000 +0200
@@ -28,10 +28,11 @@
 # @GLIB_CFLAGS@
 
 xfce4_sensors_plugin_LDFLAGS = 								\
-	$(top_builddir)/lib/libxfce4sensors.la
+	$(top_builddir)/lib/libxfce4sensors.la								\
 	@LIBXFCE4PANEL_LIBS@											 \
 	@SOLLIBS@														\
-	@LIBSENSORS_LDFLAGS@
+	@LIBSENSORS_LDFLAGS@											 \
+	@LIBM@
 
 #	@GTK_LIBS@ \
 # @GLIB_LIBS@
--- xfce4-sensors-plugin-1.0.0/configure			2010-03-27 16:12:32.000000000 +0100
+++ xfce4-sensors-plugin-1.0.0/configure.dso			2010-06-04 01:44:43.000000000 +0200
@@ -787,6 +787,7 @@
 GTK_VERSION
 PKG_CONFIG
 LIBXFCE4SENSORS_VERINFO
+LIBM
 SOLLIBS
 PLATFORM_CFLAGS
 HAVE_SYSFS_ACPI_FALSE
@@ -5779,13 +5780,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5782: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5783: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5785: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5786: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5788: output\"" >&5)
+  (eval echo "\"\$as_me:5789: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -6990,7 +6991,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6993 "configure"' > conftest.$ac_ext
+  echo '#line 6994 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8248,11 +8249,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8251: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8252: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8255: \$? = $ac_status" >&5
+   echo "$as_me:8256: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8587,11 +8588,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8590: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8591: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8594: \$? = $ac_status" >&5
+   echo "$as_me:8595: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8692,11 +8693,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8695: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8696: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8699: \$? = $ac_status" >&5
+   echo "$as_me:8700: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8747,11 +8748,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8750: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8751: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8754: \$? = $ac_status" >&5
+   echo "$as_me:8755: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11131,7 +11132,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11134 "configure"
+#line 11135 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11227,7 +11228,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11230 "configure"
+#line 11231 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12973,6 +12974,50 @@
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceilf in -lm" >&5
+$as_echo_n "checking for ceilf in -lm... " >&6; }
+if test "${ac_cv_lib_m_ceilf+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 ceilf ();
+int
+main ()
+{
+return ceilf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_ceilf=yes
+else
+  ac_cv_lib_m_ceilf=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_ceilf" >&5
+$as_echo "$ac_cv_lib_m_ceilf" >&6; }
+if test "x$ac_cv_lib_m_ceilf" = x""yes; then :
+  LIBM="-lm"
+else
+  as_fn_error "Missing working libm math lib" "$LINENO" 5
+fi
+
+
+
 LIBXFCE4SENSORS_VERINFO=1:0:0
 

--- xfce4-sensors-plugin-1.0.0/panel-plugin/Makefile.in		2010-03-27 16:12:30.000000000 +0100
+++ xfce4-sensors-plugin-1.0.0/panel-plugin/Makefile.in.dso	2010-06-04 01:39:58.000000000 +0200
@@ -302,8 +302,11 @@
 #	@GTK_CFLAGS@ \
 # @GLIB_CFLAGS@
 xfce4_sensors_plugin_LDFLAGS = \
-	$(top_builddir)/lib/libxfce4sensors.la
-
+	$(top_builddir)/lib/libxfce4sensors.la								\
+	@LIBXFCE4PANEL_LIBS@											 \
+	@SOLLIBS@														\
+	@LIBSENSORS_LDFLAGS@											 \
+	@LIBM@
 
 #	@GTK_LIBS@ \
 # @GLIB_LIBS@