Fix #if defs

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@13593 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-05-04 19:39:47 +00:00
parent f8317037d5
commit 6233fb4e20
8 changed files with 38 additions and 92 deletions

View file

@ -1,3 +1,11 @@
2002-05-04 Adam Fedor <fedor@gnu.org>
* configure.ac: Improved check for XShm.h
* Headers/x11/wraster.h: Use HAVE_X11_EXTENSIONS_XSHM_H
* Source/x11/XIMInputServer.m: Fix #if for USE_XIM (patch from
alexander@malmberg.org)
* Source/xlib/XGContext.m: Idem for HAVE_XFT
2002-05-03 Adam Fedor <fedor@gnu.org>
* GNUmakefile.postamble: Remove '/' in

View file

@ -46,7 +46,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef XSHM
#ifdef HAVE_X11_EXTENSIONS_XSHM_H
#include <X11/extensions/XShm.h>
#endif

View file

@ -95,7 +95,7 @@
encoding = [NSString defaultCStringEncoding];
}
#if USE_XIM
#ifdef USE_XIM
if ([self ximInit: dpy] == NO)
{
NSLog(@"Unable to initialize XIM, using standard keyboard events");
@ -289,7 +289,7 @@
return;
/* Make sure we have an ic for this window */
#if USE_XIM
#ifdef USE_XIM
if (windev->ic == NULL)
{
windev->ic = [self ximCreateIC: windev->ident];

View file

@ -44,7 +44,7 @@
#include "xlib/XGGState.h"
#include "xlib/xrtools.h"
#if HAVE_XFT
#ifdef HAVE_XFT
#include "xlib/XftFontInfo.h"
#endif
@ -76,7 +76,7 @@
[NSGraphicsContext setDefaultContextClass: [XGContext class]];
[GSFontEnumerator setDefaultClass: [XGFontEnumerator class]];
#if HAVE_XFT
#ifdef HAVE_XFT
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"GSFontAntiAlias"])
{
fontClass = [XftFontInfo class];

View file

@ -283,6 +283,7 @@
for (i = 0; i < available; i++)
{
char *name = fonts[i];
NSDebugLLog(@"Fonts", @"%s", name);
NS_DURING
[self processFont: name];

View file

@ -54,6 +54,9 @@
/* Define to 1 if you have the <wraster.h> header file. */
#undef HAVE_WRASTER_H
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
#undef HAVE_X11_EXTENSIONS_XSHM_H
/* Define if you have the Xft library */
#undef HAVE_XFT
@ -81,8 +84,5 @@
/* Define if you have libwraster */
#undef WITH_WRASTER
/* Define for XShm support */
#undef XSHM
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING

101
configure vendored
View file

@ -5021,23 +5021,21 @@ fi
save_CPPFLAGS=${CPPFLAGS}
CPPFLAGS="$CPPFLAGS $GRAPHIC_CFLAGS"
if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
for ac_header in X11/extensions/XShm.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking X11/extensions/XShm.h usability" >&5
echo $ECHO_N "checking X11/extensions/XShm.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
$ac_includes_default
#include <X11/extensions/XShm.h>
#include <X11/Xlib.h>
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@ -5051,85 +5049,24 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_header_compiler=no
eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking X11/extensions/XShm.h presence" >&5
echo $ECHO_N "checking X11/extensions/XShm.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <X11/extensions/XShm.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc in
yes:no )
{ echo "$as_me:$LINENO: WARNING: X11/extensions/XShm.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: X11/extensions/XShm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: X11/extensions/XShm.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: X11/extensions/XShm.h: proceeding with the preprocessor's result" >&2;};;
no:yes )
{ echo "$as_me:$LINENO: WARNING: X11/extensions/XShm.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: X11/extensions/XShm.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: X11/extensions/XShm.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: X11/extensions/XShm.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: X11/extensions/XShm.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: X11/extensions/XShm.h: proceeding with the preprocessor's result" >&2;};;
esac
echo "$as_me:$LINENO: checking for X11/extensions/XShm.h" >&5
echo $ECHO_N "checking for X11/extensions/XShm.h... $ECHO_C" >&6
if test "${ac_cv_header_X11_extensions_XShm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_header_X11_extensions_XShm_h=$ac_header_preproc
fi
echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_XShm_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_XShm_h" >&6
fi
if test $ac_cv_header_X11_extensions_XShm_h = yes; then
cat >>confdefs.h <<\_ACEOF
#define XSHM
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
CPPFLAGS="$save_CPPFLAGS"

View file

@ -347,8 +347,8 @@ fi
save_CPPFLAGS=${CPPFLAGS}
CPPFLAGS="$CPPFLAGS $GRAPHIC_CFLAGS"
AC_CHECK_HEADER(X11/extensions/XShm.h, AC_DEFINE(XSHM,,
[Define for XShm support]))
AC_CHECK_HEADERS(X11/extensions/XShm.h,,,
[#include <X11/Xlib.h>])
CPPFLAGS="$save_CPPFLAGS"
#--------------------------------------------------------------------