ref: dbea7e606341b301daeb401010453cc4764ad321
parent: aa7e018239cc1f56ab8e43af782f80668166be1c
author: Christian Weisgerber <naddy@mips.inka.de>
date: Wed Jan 27 10:53:57 EST 2016
Fix PIE configure test In opus-tools, the current PIE configure test assumes that the opus headers have been installed under the default header search path of the compiler. This isn't necessarily the case (/usr/local, /opt, ...). Use the detected opus include location instead. Signed-off-by: Ralph Giles <giles@thaumas.net>
--- a/configure.ac
+++ b/configure.ac
@@ -261,11 +261,11 @@
saved_CFLAGS="$CFLAGS"
saved_LDFLAGS="$LDFLAGS"
saved_LIBS="$LIBS"
- CFLAGS="$CFLAGS -fPIE"
+ CFLAGS="$CFLAGS $OPUS_CFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
LIBS="$LIBS $OPUS_LIBS"
AC_MSG_CHECKING([for PIE support])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <opus/opus.h>]],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <opus.h>]],
[[OpusDecoder *dec = opus_decoder_create(48000, 2, 0L)]])],
[ AC_MSG_RESULT([yes]) ],
[ AC_MSG_RESULT([no])