changeset 23939:fd6b1339689f

build: set FLTK_LIBS properly by splitting FLTK_LDFLAGS * configure.ac: Split the output of fltk-config --ldflags into FLTK_LDFLAGS and FLTK_LIBS by value.
author Mike Miller <mtmiller@octave.org>
date Thu, 24 Aug 2017 14:51:31 -0700
parents e54e13ee99ce
children d260f54d7dde
files configure.ac
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Aug 24 10:55:24 2017 -0700
+++ b/configure.ac	Thu Aug 24 14:51:31 2017 -0700
@@ -1938,7 +1938,18 @@
         ;;
       esac
     done
-    FLTK_LDFLAGS=`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`
+    ## Split -L and -l options into FLTK_LDFLAGS and FLTK_LIBS
+    fltk_ldflags=`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`
+    for fltk_option in $fltk_ldflags; do
+      case $fltk_option in
+        -l*)
+          FLTK_LIBS="$FLTK_LIBS $fltk_option"
+        ;;
+        *)
+          FLTK_LDFLAGS="$FLTK_LDFLAGS $fltk_option"
+        ;;
+      esac
+    done
 
     case $host_os in
       mingw*)