forked from pool/spandsp
Jan Engelhardt
6b5b9b218e
OBS-URL: https://build.opensuse.org/package/show/network:telephony/spandsp?expand=0&rev=21
105 lines
2.5 KiB
Diff
105 lines
2.5 KiB
Diff
From: Jan Engelhardt <jengelh@medozas.de>
|
|
Date: 2011-07-17 16:15:32.890081276 +0200
|
|
Upstream: tbd
|
|
|
|
build: fix lrint detection
|
|
|
|
The configure test puts -lm into the wrong place.
|
|
|
|
configure:16102: gcc -o conftest -lm conftest.c >&5
|
|
/tmp/ccZ8dPRc.o: In function `main':
|
|
conftest.c:(.text+0xd): undefined reference to `lrint'
|
|
conftest.c:(.text+0x1f): undefined reference to `lrint'
|
|
collect2: ld returned 1 exit status
|
|
|
|
"-lm" is a library, not a CFLAG.
|
|
|
|
---
|
|
config/ax_c99_features.m4 | 24 ++++++++++++------------
|
|
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
|
|
Index: spandsp-0.0.6/config/ax_c99_features.m4
|
|
===================================================================
|
|
--- spandsp-0.0.6.orig/config/ax_c99_features.m4
|
|
+++ spandsp-0.0.6/config/ax_c99_features.m4
|
|
@@ -47,8 +47,8 @@ AC_DEFUN([AX_C99_FUNC_LRINT],
|
|
[AC_CACHE_CHECK(for lrint,
|
|
ac_cv_c99_lrint,
|
|
[
|
|
-lrint_save_CFLAGS=$CFLAGS
|
|
-CFLAGS="-lm"
|
|
+lrint_save_LIBS="$LIBS"
|
|
+LIBS="-lm"
|
|
AC_TRY_LINK([
|
|
#define _ISOC9X_SOURCE 1
|
|
#define _ISOC99_SOURCE 1
|
|
@@ -58,7 +58,7 @@ AC_TRY_LINK([
|
|
#include <math.h>
|
|
], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
|
|
|
|
-CFLAGS=$lrint_save_CFLAGS
|
|
+LIBS="$lrint_save_LIBS"
|
|
|
|
])
|
|
|
|
@@ -84,8 +84,8 @@ AC_DEFUN([AX_C99_FUNC_LRINTF],
|
|
[AC_CACHE_CHECK(for lrintf,
|
|
ac_cv_c99_lrintf,
|
|
[
|
|
-lrintf_save_CFLAGS=$CFLAGS
|
|
-CFLAGS="-lm"
|
|
+lrintf_save_LIBS="$LIBS"
|
|
+LIBS="-lm"
|
|
AC_TRY_LINK([
|
|
#define _ISOC9X_SOURCE 1
|
|
#define _ISOC99_SOURCE 1
|
|
@@ -95,7 +95,7 @@ AC_TRY_LINK([
|
|
#include <math.h>
|
|
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
|
|
|
|
-CFLAGS=$lrintf_save_CFLAGS
|
|
+libs="$lrintf_save_LIBS"
|
|
|
|
])
|
|
|
|
@@ -121,8 +121,8 @@ AC_DEFUN([AX_C99_FUNC_LLRINT],
|
|
[AC_CACHE_CHECK(for llrint,
|
|
ac_cv_c99_llrint,
|
|
[
|
|
-llrint_save_CFLAGS=$CFLAGS
|
|
-CFLAGS="-lm"
|
|
+llrint_save_LIBS="$LIBS"
|
|
+LIBS="-lm"
|
|
AC_TRY_LINK([
|
|
#define ISOC9X_SOURCE 1
|
|
#define _ISOC99_SOURCE 1
|
|
@@ -132,7 +132,7 @@ AC_TRY_LINK([
|
|
#include <math.h>
|
|
], long long int x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
|
|
|
|
-CFLAGS=$llrint_save_CFLAGS
|
|
+LIBS="$llrint_save_LIBS"
|
|
|
|
])
|
|
|
|
@@ -159,8 +159,8 @@ AC_DEFUN([AX_C99_FUNC_LLRINTF],
|
|
[AC_CACHE_CHECK(for llrintf,
|
|
ac_cv_c99_llrintf,
|
|
[
|
|
-llrintf_save_CFLAGS=$CFLAGS
|
|
-CFLAGS="-lm"
|
|
+llrintf_save_LIBS="$LIBS"
|
|
+LIBS="-lm"
|
|
AC_TRY_LINK([
|
|
#define _ISOC9X_SOURCE 1
|
|
#define _ISOC99_SOURCE 1
|
|
@@ -170,7 +170,7 @@ AC_TRY_LINK([
|
|
#include <math.h>
|
|
], long long int x ; x = llrintf(3.14159) ;, ac_cv_c99_llrintf=yes, ac_cv_c99_llrintf=no)
|
|
|
|
-CFLAGS=$llrintf_save_CFLAGS
|
|
+LIBS="$llrintf_save_LIBS"
|
|
|
|
])
|
|
|