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: Fri, 30 Jan 2009 22:44:56 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

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

| Ok, here is my second changeset. *Note* that I also made a small change to the | test of X11, I added "-L$x_libraries" to AC_CHECK_LIB as the 5th argument | because if I use --x-libraries=/usr/X11R6/lib for configure then this option is | currently ignored and the test then fails because XrmInitialize is not found. I | hope this was the right thing to do?! | | I compiled both ways, both do work very well (the Carbon compiled test with | normal Desktop, X11 under X1.app). If somebody wants to compile without | framework Carbon support then a typical line would look like | | ./configure --without-framework-carbon --x-includes=/usr/X11R6/include | --x-libraries=/usr/X11R6/lib | | a typical output then for this line is | | checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
|    checking for XrmInitialize in -lX11... yes
|    checking whether ld accepts -framework Carbon... yes
|    configure: framework rejected by --without-framework-carbon

OK, I tried this patch and now I see

checking for X... libraries , headers checking for XrmInitialize in -lX11... no
  checking whether ld accepts -framework Carbon... no

and no X11 libraries show up in the summary output.  Without the
patch, I see

checking for X... libraries , headers checking for XrmInitialize in -lX11... yes
  checking whether ld accepts -framework Carbon... no

and the summary output was

X11 include flags: X11 libraries: -lX11

so something is not quite right.


I attached my play script configure.in (test from my virtual Linux box and my Mac are include as comments at the bottom) to this email. If this is the right thing then please consider the second file as the changeset.


| > | (b) Turn off empty output of configuration summary if Carbon is used, eg.
| > | | > | X11 include flags:
| > |    X11 libraries:
| > | | > | and turn on output about Carbon framework instead, eg. | > | | > | Carbon libraries: -Wl,-framework -Wl,Carbon | > | > I don't think this part is really necessary, so I'd say omit it. | | Yes ok.

I meant the part about removing the empty X11 include and library
flags.  It would be OK to put the Carbon libraries in the summary if
they are stored in a separate variable.  But I see that you are
currently adding them to LIBS, so in that case I don't think a
separate line is needed.

I may come back to this idea somewhen the next days, is $(CARBON_LIBS) okay?

  Thomas
AC_INIT
AC_REVISION($Revision: 1.0 $)
AC_PREREQ(2.57)
AC_CONFIG_HEADER(config.h)

AC_PATH_X
if test "$have_x"; then
  AC_DEFINE(HAVE_X_WINDOWS, 1, [Define if you have X11])

  if test $x_includes != "NONE"; then
    X11_INCFLAGS="$x_includes"
  fi
  AC_SUBST(X11_INCFLAGS)

  if test -z $x_libraries; then
    AC_CHECK_LIB(X11, XrmInitialize, [X11_LIBS=-lX11], [X11_LIBS=])
  elif test $x_libraries != "NONE"; then
    AC_CHECK_LIB(X11, XrmInitialize, 
      [X11_LIBS="-L$x_libraries -lX11"], [X11_LIBS=], "-L$x_libraries")
  fi
  AC_SUBST(X11_LIBS)
fi

AC_MSG_NOTICE([
  X11 include flags:    $X11_INCFLAGS
  X11 libraries:        $X11_LIBS
])

AC_OUTPUT

# On Linux (before and now): autoheader && autoconf && ./configure
#   checking for X... libraries , headers 
#   checking for XrmInitialize in -lX11... yes
#   configure:
#     X11 include flags:    
#     X11 libraries:        -lX11

# On Linux (before): autoheader && autoconf && ./configure --without-x
#   checking for X... disabled
#   checking for XrmInitialize in -lX11... yes
#   configure:
#     X11 include flags:    NONE
#     X11 libraries:        -lX11

# On Linux (now): autoheader && autoconf && ./configure --without-x
#   checking for X... disabled
#   configure:
#     X11 include flags:    
#     X11 libraries:        

# On Mac (before): autoheader && autoconf && ./configure
#   checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
#   checking for XrmInitialize in -lX11... no
#   configure:
#     X11 include flags:    /usr/X11R6/include
#     X11 libraries:        

# On Mac (now): autoheader && autoconf && ./configure
#   checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
#   checking for XrmInitialize in -lX11... yes
#   configure:
#     X11 include flags:    /usr/X11R6/include
#     X11 libraries:        -L/usr/X11R6/lib -lX11

# On Mac (before): autoheader && autoconf && ./configure --without-x
#   checking for X... disabled
#   checking for XrmInitialize in -lX11... no
#   configure:
#     X11 include flags:    NONE
#     X11 libraries:        

# On Mac (now): autoheader && autoconf && ./configure --without-x
#   checking for X... disabled
#   configure:
#     X11 include flags:    
#     X11 libraries:        
# HG changeset patch
# User Thomas Treichl <address@hidden>
# Date 1233351758 -3600
# Node ID 29e12afa2789a4a78e50a46a5a658b3745334553
# Parent  06f5dd901f301c7f87127004846d410046f26623
Fix test for X11 if "--without-x" is given.

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-30  Thomas Treichl  <address@hidden>
+
+       * configure.in: Fix test for X11 if "--without-x" is given.
+
 2009-01-30  Marco Atzeri  <address@hidden>
 
        * configure.in (SHLLIBPRE, SHLBINPRE): Fix definitions for Cygwin.
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -263,10 +263,17 @@
 if test "$have_x"; then
   AC_DEFINE(HAVE_X_WINDOWS, 1, [Define if you have X11])
 
-  X11_INCFLAGS="$x_includes"
+  if test $x_includes != "NONE"; then
+    X11_INCFLAGS="$x_includes"
+  fi
   AC_SUBST(X11_INCFLAGS)
 
-  AC_CHECK_LIB(X11, XrmInitialize, [X11_LIBS=-lX11], [X11_LIBS=])
+  if test -z $x_libraries; then
+    AC_CHECK_LIB(X11, XrmInitialize, [X11_LIBS=-lX11], [X11_LIBS=])
+  elif test $x_libraries != "NONE"; then
+    AC_CHECK_LIB(X11, XrmInitialize, 
+      [X11_LIBS="-L$x_libraries -lX11"], [X11_LIBS=], "-L$x_libraries")
+  fi
   AC_SUBST(X11_LIBS)
 fi
 

reply via email to

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