changeset 18352:c460566106f0 stable

configure.ac: Find Qt libs in framework option for Macs (bug #41236) * configure.ac: On Darwin OS only, look for Qt libraries in Framework directory. * src/Makefile.am: Add missing line continuation to octave_cli_LDADD definition list.
author Michael C. Grant <mcg@cvxr.com>
date Thu, 23 Jan 2014 14:37:43 -0800
parents 50505bf88b82
children b5a83c383008 cc0ea287d0c7
files configure.ac src/Makefile.am
diffstat 2 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Jan 23 16:14:50 2014 -0500
+++ b/configure.ac	Thu Jan 23 14:37:43 2014 -0800
@@ -183,13 +183,13 @@
       mingw* | msdosmsvc)
         sepchar=';' ;;
     esac
-    ;;
+  ;;
   no)
     AC_MSG_ERROR([You are required to define a path separation character])
     ;;
   *)
     sepchar=$with_sepchar
-    ;;
+  ;;
 esac
 AC_SUBST(sepchar)
 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'],
@@ -2304,7 +2304,7 @@
   msdosmsvc | mingw*)
     AC_CHECK_FUNCS([setvbuf], [],
                    [AC_MSG_ERROR([Missing function required to build Octave])])
-    ;;
+  ;;
 esac
 
 ## Cygwin kluge for getrusage.
@@ -2723,6 +2723,15 @@
     QT_LDFLAGS="`$PKG_CONFIG --libs-only-L QtCore QtGui QtNetwork`"
     QT_LIBS="`$PKG_CONFIG --libs-only-l QtCore QtGui QtNetwork`"
 
+    case $host_os in
+      *darwin*)
+        ## Qt might be installed in framework
+        QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
+        QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
+        AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes || test -n $QT_LDFLAGS])
+      ;;
+    esac
+
     ## Check for Qt4
     if ! `$PKG_CONFIG --atleast-version=4.0.0 QtCore`; then
       warn_gui="Qt >= 4.0.0 not found -- disabling GUI"
@@ -2809,7 +2818,7 @@
           AC_CHECK_FUNCS([setvbuf], [win32_terminal=yes],
             [warn_gui="setvbuf not found -- disabling GUI"
              build_gui=no])
-          ;;
+        ;;
         *)
           AC_CHECK_HEADERS([pty.h libutil.h util.h])
           AC_SEARCH_LIBS([openpty], [util],
@@ -2817,7 +2826,7 @@
           AC_CHECK_FUNCS([chmod chown ftruncate mmap munmap], [],
             [AC_MSG_ERROR([At least one of chmod, chown, ftruncate, mmap, and munmap not found -- disabling GUI])
              build_gui=no])
-          ;;
+        ;;
       esac
     fi
   fi
--- a/src/Makefile.am	Thu Jan 23 16:14:50 2014 -0500
+++ b/src/Makefile.am	Thu Jan 23 14:37:43 2014 -0800
@@ -87,7 +87,7 @@
 octave_cli_SOURCES = main-cli.cc
 
 octave_cli_LDADD = \
-  $(OCTAVE_CORE_LIBS)
+  $(OCTAVE_CORE_LIBS) \
   $(OCTAVE_LINK_DEPS)
 
 octave_cli_LDFLAGS = \