octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [changeset] Missing ScreenSize & ScreenPixelsPerInch properties


From: Thomas Treichl
Subject: Re: [changeset] Missing ScreenSize & ScreenPixelsPerInch properties
Date: Thu, 29 Jan 2009 22:06:38 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

John W. Eaton schrieb:
On 29-Jan-2009, Thomas Treichl wrote:

| John W. Eaton schrieb:
| > On 29-Jan-2009, Thomas Treichl wrote:
| > | > | Oooppss, sorry, I expect that your $x_libraries is empty, right? Then "-L " is | > | added to your test and this is not the right way. I need a better idea for | > | this... I removed this changes and created a new changeset just for the Carbon part. | > | > There seem to be two hg changesets in your attachment. I'm confused.
| > Which one are you saying should be applied?
| | I did | | hg export --git 8618 8635 >carbon.changeset | | seems that this is not the way to create a new one?
| How can I merge these two changesets into one changeset and export it?

If you are using mercurial queues, then I think you can do it with
qfold.  Otherwise, check the mercurial wiki:

  http://www.selenic.com/mercurial/wiki/index.cgi/ConcatenatingChangesets

Ok thanks, none did work for me, but it doesn't matter (it's my fault: mercurial is still a very big mystery for me). I did a mouse copy&paste of my changes to a new repo and exported this old/new changeset once again. I hope it works now...

Best regards,

  Thomas
# HG changeset patch
# User Thomas Treichl <address@hidden>
# Date 1233262909 -3600
# Node ID bef8f001032f792df1d4ec22e58042aff73e7eac
# Parent  cbd6545b0d85b21b1b9b1914ce34ba1034092c12
Further improvements for OCTAVE_HAVE_FRAMEWORK and the test for the MacOSX 
Carbon framework.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-29  Thomas Treichl  <address@hidden>
+
+       * aclocal.m4 (OCTAVE_HAVE_FRAMEWORK): Add support for 
+       --with-framework-<name> and replace "$ac_safe" by "$1".
+       * configure.in: Change "have_carbon" with 
+       "have_framework_carbon".
+
 2009-01-28  John W. Eaton  <address@hidden>
 
        * configure.in: Check to see that pcre library has pcre_compile
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1272,25 +1272,37 @@
 AC_LANG_POP(C++)])
 dnl
 dnl Check to see if the compiler and the linker can handle the flags
-dnl "-framework $1" for the given prologue $2 and the given body $3
-dnl of a source file.  Arguments 2 and 3 optionally can also be empty.
-dnl If this test is dnl successful then perform $4, otherwise do $5.
+dnl "-framework $1" for the given prologue $2 and the given body $3 of
+dnl a source file.  Arguments 2 and 3 optionally can also be empty.
+dnl Add options (lower case letters $1) "--with-framework-$1" and
+dnl "--without-framework-$1". If this test is successful then perform
+dnl $4, otherwise do $5.
 dnl
 dnl OCTAVE_HAVE_FRAMEWORK
 AC_DEFUN(OCTAVE_HAVE_FRAMEWORK, [
-  ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'`
   AC_MSG_CHECKING(whether ${LD-ld} accepts -framework $1)
-  AC_CACHE_VAL(octave_cv_framework_$ac_safe, [
+  AC_CACHE_VAL(octave_cv_framework_$1, [
     XLDFLAGS="$LDFLAGS"
     LDFLAGS="$LDFLAGS -framework $1"
+    AC_LANG_PUSH(C++)
     AC_LINK_IFELSE([AC_LANG_PROGRAM([$2], [$3])],
-      eval "octave_cv_framework_$ac_safe=yes",
-      eval "octave_cv_framework_$ac_safe=no")
+      eval "octave_cv_framework_$1=yes",
+      eval "octave_cv_framework_$1=no")
+    AC_LANG_POP(C++)
     LDFLAGS="$XLDFLAGS"
   ])
-  if eval "test \"`echo '$octave_cv_framework_'$ac_safe`\" = yes"; then
+  if test "$octave_cv_framework_$1" = "yes"; then
     AC_MSG_RESULT(yes)
-    [$4]
+    AC_ARG_WITH(framework-m4_tolower($1),
+      [AS_HELP_STRING([--without-framework-m4_tolower($1)], 
+        [don't use framework $1])],
+         with_have_framework=$withval, with_have_framework="yes")
+    if test "$with_have_framework" = "yes"; then
+      [$4]
+    else
+      AC_MSG_NOTICE([framework rejected by --without-framework-m4_tolower($1)])
+      [$5]
+    fi
   else
     AC_MSG_RESULT(no)
     [$5]
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -272,11 +272,11 @@
 
 ### On MacOSX system the Carbon framework is used to determine ScreenSize
 OCTAVE_HAVE_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>], [CGMainDisplayID 
()],
-  [have_carbon="yes"], [have_carbon="no"])
-if test $have_carbon = "yes"; then
+  [have_framework_carbon="yes"], [have_framework_carbon="no"])
+if test $have_framework_carbon = "yes"; then
   AC_DEFINE(HAVE_FRAMEWORK_CARBON, 1, [Define if framework CARBON is 
available.])
-  LDFLAGS="$LDFLAGS -Wl,-framework -Wl,Carbon"
-  AC_MSG_NOTICE([adding -Wl,-framework -Wl,Carbon to LDFLAGS])
+  LIBS="$LIBS -Wl,-framework -Wl,Carbon"
+  AC_MSG_NOTICE([adding -Wl,-framework -Wl,Carbon to LIBS])
 fi
 
 ### On Intel systems with gcc, we may need to compile with -mieee-fp

reply via email to

[Prev in Thread] Current Thread [Next in Thread]