[opus] opus-tools: fix PIE configure test

Christian Weisgerber naddy at mips.inka.de
Wed Jan 27 15:53:57 UTC 2016


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, ...).

Straightforward fix:

--- configure.ac.orig	Thu Jun 12 02:11:24 2014
+++ configure.ac	Wed Jan 27 16:50:22 2016
@@ -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])
-- 
Christian "naddy" Weisgerber                          naddy at mips.inka.de


More information about the opus mailing list