forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-pda/libplist: Simplify configure test for fmin
libimobiledevice/libplist#168 Package-Manager: Portage-3.0.2, Repoman-2.3.23 Bug: https://bugs.gentoo.org/736866 Signed-off-by: Jeroen Roovers <[email protected]>
- Loading branch information
Jeroen Roovers
committed
Aug 13, 2020
1 parent
596902c
commit 04014b1
Showing
3 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -79,19 +79,7 @@ | ||
esac | ||
AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | ||
|
||
-# Check if we need libm for fmin | ||
-CACHED_CFLAGS="$CFLAGS" | ||
-CFLAGS="-O0" | ||
-AC_CACHE_CHECK(if fmin is a builtin function, ac_cv_fmin_builtin, | ||
- AC_TRY_LINK([ | ||
- #include <math.h> | ||
- #include <float.h> | ||
- ], [ | ||
- double val = 3.1415f * 0.55555f; | ||
- double diff = fmin(val, DBL_MAX); | ||
- if (diff > 0) return 1; | ||
- ], ac_cv_fmin_builtin=yes, ac_cv_fmin_builtin=no)) | ||
-CFLAGS="$CACHED_CFLAGS" | ||
+AC_SEARCH_LIBS([fmin],[m]) | ||
|
||
# Check if struct tm has a tm_gmtoff member | ||
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, | ||
@@ -153,10 +141,6 @@ | ||
AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS") | ||
GLOBAL_LDFLAGS="$PTHREAD_LIBS" | ||
|
||
-if test "x$ac_cv_fmin_builtin" != "xyes"; then | ||
- GLOBAL_LDFLAGS+=" -lm" | ||
-fi | ||
- | ||
AC_ARG_ENABLE(debug, | ||
AS_HELP_STRING([--enable-debug], | ||
[build debug message output code (default is no)]), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters