add noelision config option
authorGood Guy <good1.2guy@gmail.com>
Sat, 26 May 2018 03:45:52 +0000 (21:45 -0600)
committerGood Guy <good1.2guy@gmail.com>
Sat, 26 May 2018 03:45:52 +0000 (21:45 -0600)
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/configure.ac

index a179559ff9de5cdd335b0a81775833fe08b290a8..2320f3cd4abba4176b6ccd3c2be4116d1bce88dd 100644 (file)
@@ -417,8 +417,7 @@ CFLAGS += -DUSE_ALPHA
 else
 
 LDFLAGS1 = -export-dynamic
-# avoid the intel lock elision bug, if possible
-LDFLAGS2 = $(lastword $(wildcard /usr/lib/noelision /lib/noelision /usr/lib64/noelision /lib/noelision))
+LDFLAGS2 =
 LINKER = g++ -o $(OUTPUT)
 
 endif
index 374a233ba8ee2b2506757929d16a5c1131f9b14a..72cb4eeb04857afebaa14e6cc7e0d6ccb172fdd8 100644 (file)
@@ -41,6 +41,7 @@ CHECK_WITH([ladspa-dir],[ladspa install dir],[LADSPA_DIR],[auto])
 CHECK_WITH([config-dir],[.bcast config dir],[CONFIG_DIR],[$$HOME/.bcast5])
 CHECK_WITH([browser],[cin_browser path],[CIN_BROWSER],[firefox])
 CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no])
+CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
 
 if test "x$WANT_LV2" != "xno"; then
   if test "x$WANT_LV2UI" != "xno"; then
@@ -790,6 +791,7 @@ echo "  using: with-plugin-dir = $WANT_PLUGIN_DIR"
 echo "  using: with-ladspa-dir = $WANT_LADSPA_DIR"
 echo "  using: with-opencv = $WANT_OPENCV"
 echo "  using: with-git-ffmpeg = $WANT_GIT_FFMPEG"
+echo "  using: with-noelision = $WANT_NOELISION"
 echo ""
 echo "  using: single-user  = $WANT_CINBIN_BUILD"
 echo "  using: static-build = $WANT_STATIC_BUILD"
@@ -815,6 +817,16 @@ if test "x$HAVE_opus" = "xyes"; then
   FFMPEG_EXTRA_CFG+=' --enable-libopus'
 fi
 
+# intel lock elision bugs
+if test "x$WANT_NOELISION" != "xno"; then
+  CFG_RPATH=`ls -1fd 2> /dev/null \
+ /usr/lib/noelision \
+ /lib/noelision \
+ /usr/lib64/noelision \
+ /lib64/noelision \
+  | tail -1`
+fi
+
 AC_SUBST(EXTRA_LIBS)
 AC_SUBST(FFMPEG_EXTRA_CFG)
 AC_SUBST(WANT_X264_HIDEPTH)
@@ -914,6 +926,11 @@ echo "export static_pkgs static_blds shared_libs system_libs"
 echo ""
 
 echo "thirdparty_libraries := \$(static_libs) \$(shared_libs)"
+
+if test "x$CFG_RPATH" != "x"; then
+  echo "libraries+= -Wl,-rpath=$CFG_RPATH"
+fi
+
 echo "libraries += -Wl,--start-group"
 echo "libraries += \$(thirdparty_libraries)"
 echo "libraries += \$(system_libs)"