mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-21 02:41:15 +00:00
* configure.ac: Rewrite, avoid setting vars unecessarily. Use
pkg-config if possible. Switch back to xlib/winlib when other backends don't satisfy dependancies. * config.make, config.h: Update to match. * GNUmakefile (SUBPROJECTS): Add Fonts * Fonts: New folder with default nfont * Source/x11/GNUmakefile: Remove unneeded file. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20783 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
716fa5212a
commit
aa0a031904
36 changed files with 12635 additions and 1227 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2005-02-22 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Rewrite, avoid setting vars unecessarily. Use
|
||||
pkg-config if possible. Switch back to xlib/winlib when other backends
|
||||
don't satisfy dependancies.
|
||||
* config.make, config.h: Update to match.
|
||||
* GNUmakefile (SUBPROJECTS): Add Fonts
|
||||
* Fonts: New folder with default nfont
|
||||
|
||||
* Source/x11/GNUmakefile: Remove unneeded file.
|
||||
|
||||
2005-02-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/x11/XGServerWindow.m (-setalpha::): Support for window
|
||||
|
|
40
Fonts/GNUmakefile
Normal file
40
Fonts/GNUmakefile
Normal file
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# Resources makefile for GNUstep Back Library
|
||||
# Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# Written by: Adam Fedor <fedor@doc.com>
|
||||
# Date: Feb 2005
|
||||
#
|
||||
# This file is part of the GNUstep Back Library.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
||||
|
||||
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
|
||||
|
||||
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../back.make
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
|
||||
#RESOURCE_SET_NAME = back-resources
|
||||
back-resources_RESOURCE_FILES_INSTALL_DIR = Library/Fonts
|
||||
back-resources_RESOURCE_FILES = $(FONT_INSTALL_FILES)
|
||||
|
||||
FONT_INSTALL_FILES = Helvetica.nfont
|
||||
|
||||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
|
||||
-include GNUmakefile.postamble
|
||||
|
66
Fonts/GNUmakefile.postamble
Normal file
66
Fonts/GNUmakefile.postamble
Normal file
|
@ -0,0 +1,66 @@
|
|||
#
|
||||
# GNUmakefile.postamble
|
||||
#
|
||||
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
#
|
||||
# Written: Adam Fedor <fedor@gnu.org>
|
||||
# Date: Oct 2000
|
||||
#
|
||||
# This file is part of the GNUstep Base Library.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Things to do before compiling
|
||||
# before-all::
|
||||
|
||||
# Things to do after compiling
|
||||
# after-all::
|
||||
|
||||
# Things to do before installing
|
||||
# before-install::
|
||||
|
||||
# Things to do after installing
|
||||
after-install::
|
||||
for file in $(FONT_INSTALL_FILES); do \
|
||||
($(TAR) cfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $$file) | (cd $(GNUSTEP_SYSTEM_ROOT)/$(back-resources_RESOURCE_FILES_INSTALL_DIR); $(TAR) xf -) ;\
|
||||
done
|
||||
|
||||
# Things to do before uninstalling
|
||||
before-uninstall::
|
||||
for file in $(FONT_INSTALL_FILES); do \
|
||||
rm -rf $(GNUSTEP_SYSTEM_ROOT)/$(back-resources_RESOURCE_FILES_INSTALL_DIR)/$$file;\
|
||||
done
|
||||
|
||||
# Things to do after uninstalling
|
||||
# after-uninstall::
|
||||
|
||||
# Things to do before cleaning
|
||||
# before-clean::
|
||||
|
||||
# Things to do after cleaning
|
||||
# after-clean::
|
||||
|
||||
# Things to do before distcleaning
|
||||
# before-distclean::
|
||||
|
||||
# Things to do after distcleaning
|
||||
# after-distclean::
|
||||
|
||||
# Things to do before checking
|
||||
# before-check::
|
||||
|
||||
# Things to do after checking
|
||||
# after-check::
|
37
Fonts/Helvetica.nfont/FontInfo.plist
Normal file
37
Fonts/Helvetica.nfont/FontInfo.plist
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
Version = 2;
|
||||
Foundry = "URW";
|
||||
Faces =
|
||||
(
|
||||
{
|
||||
PostScriptName = "Helvetica";
|
||||
Name = "Regular";
|
||||
Files = ("n019003l.pfb","n019003l.pfm","n019003l.afm");
|
||||
},
|
||||
{
|
||||
PostScriptName = "Helvetica-Bold";
|
||||
Name = "Bold";
|
||||
Files = ("n019004l.pfb","n019004l.pfm","n019004l.afm");
|
||||
},
|
||||
{
|
||||
PostScriptName = "Helvetica-Italic";
|
||||
Name = "Italic";
|
||||
Files = ("n019023l.pfb","n019023l.pfm","n019023l.afm");
|
||||
},
|
||||
{
|
||||
PostScriptName = "Helvetica-BoldItalic";
|
||||
Name = "Bold Italic";
|
||||
Files = ("n019024l.pfb","n019024l.pfm","n019024l.afm");
|
||||
},
|
||||
{
|
||||
PostScriptName = "Helvetica-Oblique";
|
||||
Name = "Oblique";
|
||||
Files = ("n019023l.pfb","n019023l.pfm","n019023l.afm");
|
||||
},
|
||||
{
|
||||
PostScriptName = "Helvetica-BoldOblique";
|
||||
Name = "Bold Oblique";
|
||||
Files = ("n019024l.pfb","n019024l.pfm","n019024l.afm");
|
||||
}
|
||||
);
|
||||
}
|
1341
Fonts/Helvetica.nfont/n019003l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019003l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019003l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019003l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019003l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019003l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019004l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019004l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019004l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019004l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019004l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019004l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019023l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019023l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019023l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019023l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019023l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019023l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019024l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019024l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019024l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019024l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019024l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019024l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019043l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019043l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019043l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019043l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019043l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019043l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019044l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019044l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019044l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019044l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019044l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019044l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019063l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019063l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019063l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019063l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019063l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019063l.pfm
Normal file
Binary file not shown.
1341
Fonts/Helvetica.nfont/n019064l.afm
Normal file
1341
Fonts/Helvetica.nfont/n019064l.afm
Normal file
File diff suppressed because it is too large
Load diff
BIN
Fonts/Helvetica.nfont/n019064l.pfb
Normal file
BIN
Fonts/Helvetica.nfont/n019064l.pfb
Normal file
Binary file not shown.
BIN
Fonts/Helvetica.nfont/n019064l.pfm
Normal file
BIN
Fonts/Helvetica.nfont/n019064l.pfm
Normal file
Binary file not shown.
|
@ -40,7 +40,7 @@ include ./Version
|
|||
#
|
||||
# The list of subproject directories
|
||||
#
|
||||
SUBPROJECTS = Source Tools
|
||||
SUBPROJECTS = Source Fonts Tools
|
||||
|
||||
-include GNUmakefile.preamble
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ x11_C_FILES = \
|
|||
xdnd.c
|
||||
else
|
||||
x11_C_FILES = \
|
||||
StdCmap.c \
|
||||
context.c \
|
||||
convert.c \
|
||||
raster.c \
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
/* $XConsortium: StdCmap.c,v 1.14 94/04/17 20:16:14 rws Exp $ */
|
||||
|
||||
/*
|
||||
|
||||
Copyright (c) 1989 X Consortium
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of the X Consortium shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from the X Consortium.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: Donna Converse, MIT X Consortium
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include "x11/StdCmap.h"
|
||||
|
||||
#define lowbit(x) ((x) & (~(x) + 1))
|
||||
|
||||
static Status valid_args(); /* argument restrictions */
|
||||
|
||||
/*
|
||||
* To create any one standard colormap, use XmuStandardColormap().
|
||||
*
|
||||
* Create a standard colormap for the given screen, visualid, and visual
|
||||
* depth, with the given red, green, and blue maximum values, with the
|
||||
* given standard property name. Return a pointer to an XStandardColormap
|
||||
* structure which describes the newly created colormap, upon success.
|
||||
* Upon failure, return NULL.
|
||||
*
|
||||
* XmuStandardColormap() calls XmuCreateColormap() to create the map.
|
||||
*
|
||||
* Resources created by this function are not made permanent; that is the
|
||||
* caller's responsibility.
|
||||
*/
|
||||
|
||||
XStandardColormap *XmuStandardColormap(dpy, screen, visualid, depth, property,
|
||||
cmap, red_max, green_max, blue_max)
|
||||
Display *dpy; /* specifies X server connection */
|
||||
int screen; /* specifies display screen */
|
||||
VisualID visualid; /* identifies the visual type */
|
||||
unsigned int depth; /* identifies the visual type */
|
||||
Atom property; /* a standard colormap property */
|
||||
Colormap cmap; /* specifies colormap ID or None */
|
||||
unsigned long red_max, green_max, blue_max; /* allocations */
|
||||
{
|
||||
XStandardColormap *stdcmap;
|
||||
Status status;
|
||||
XVisualInfo vinfo_template, *vinfo;
|
||||
long vinfo_mask;
|
||||
int n;
|
||||
|
||||
/* Match the required visual information to an actual visual */
|
||||
vinfo_template.visualid = visualid;
|
||||
vinfo_template.screen = screen;
|
||||
vinfo_template.depth = depth;
|
||||
vinfo_mask = VisualIDMask | VisualScreenMask | VisualDepthMask;
|
||||
if ((vinfo = XGetVisualInfo(dpy, vinfo_mask, &vinfo_template, &n)) == NULL)
|
||||
return 0;
|
||||
|
||||
/* Check the validity of the combination of visual characteristics,
|
||||
* allocation, and colormap property. Create an XStandardColormap
|
||||
* structure.
|
||||
*/
|
||||
|
||||
if (! valid_args(vinfo, red_max, green_max, blue_max, property)
|
||||
|| ((stdcmap = XAllocStandardColormap()) == NULL)) {
|
||||
XFree((char *) vinfo);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Fill in the XStandardColormap structure */
|
||||
|
||||
if (cmap == DefaultColormap(dpy, screen)) {
|
||||
/* Allocating out of the default map, cannot use XFreeColormap() */
|
||||
Window win = XCreateWindow(dpy, RootWindow(dpy, screen), 1, 1, 1, 1,
|
||||
0, 0, InputOnly, vinfo->visual,
|
||||
(unsigned long) 0,
|
||||
(XSetWindowAttributes *)NULL);
|
||||
stdcmap->killid = (XID) XCreatePixmap(dpy, win, 1, 1, depth);
|
||||
XDestroyWindow(dpy, win);
|
||||
stdcmap->colormap = cmap;
|
||||
} else {
|
||||
stdcmap->killid = ReleaseByFreeingColormap;
|
||||
stdcmap->colormap = XCreateColormap(dpy, RootWindow(dpy, screen),
|
||||
vinfo->visual, AllocNone);
|
||||
}
|
||||
stdcmap->red_max = red_max;
|
||||
stdcmap->green_max = green_max;
|
||||
stdcmap->blue_max = blue_max;
|
||||
if (property == XA_RGB_GRAY_MAP)
|
||||
stdcmap->red_mult = stdcmap->green_mult = stdcmap->blue_mult = 1;
|
||||
else if (vinfo->class == TrueColor || vinfo->class == DirectColor) {
|
||||
stdcmap->red_mult = lowbit(vinfo->red_mask);
|
||||
stdcmap->green_mult = lowbit(vinfo->green_mask);
|
||||
stdcmap->blue_mult = lowbit(vinfo->blue_mask);
|
||||
} else {
|
||||
stdcmap->red_mult = (red_max > 0)
|
||||
? (green_max + 1) * (blue_max + 1) : 0;
|
||||
stdcmap->green_mult = (green_max > 0) ? blue_max + 1 : 0;
|
||||
stdcmap->blue_mult = (blue_max > 0) ? 1 : 0;
|
||||
}
|
||||
stdcmap->base_pixel = 0; /* base pixel may change */
|
||||
stdcmap->visualid = vinfo->visualid;
|
||||
|
||||
/* Make the colormap */
|
||||
|
||||
status = XmuCreateColormap(dpy, stdcmap);
|
||||
|
||||
/* Clean up */
|
||||
|
||||
XFree((char *) vinfo);
|
||||
if (!status) {
|
||||
|
||||
/* Free the colormap or the pixmap, if we created one */
|
||||
if (stdcmap->killid == ReleaseByFreeingColormap)
|
||||
XFreeColormap(dpy, stdcmap->colormap);
|
||||
else if (stdcmap->killid != None)
|
||||
XFreePixmap(dpy, stdcmap->killid);
|
||||
|
||||
XFree((char *) stdcmap);
|
||||
return (XStandardColormap *) NULL;
|
||||
}
|
||||
return stdcmap;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
static Status valid_args(vinfo, red_max, green_max, blue_max, property)
|
||||
XVisualInfo *vinfo; /* specifies visual */
|
||||
unsigned long red_max, green_max, blue_max; /* specifies alloc */
|
||||
Atom property; /* specifies property name */
|
||||
{
|
||||
unsigned long ncolors; /* number of colors requested */
|
||||
|
||||
/* Determine that the number of colors requested is <= map size */
|
||||
|
||||
if ((vinfo->class == DirectColor) || (vinfo->class == TrueColor)) {
|
||||
unsigned long mask;
|
||||
|
||||
mask = vinfo->red_mask;
|
||||
while (!(mask & 1))
|
||||
mask >>= 1;
|
||||
if (red_max > mask)
|
||||
return 0;
|
||||
mask = vinfo->green_mask;
|
||||
while (!(mask & 1))
|
||||
mask >>= 1;
|
||||
if (green_max > mask)
|
||||
return 0;
|
||||
mask = vinfo->blue_mask;
|
||||
while (!(mask & 1))
|
||||
mask >>= 1;
|
||||
if (blue_max > mask)
|
||||
return 0;
|
||||
} else if (property == XA_RGB_GRAY_MAP) {
|
||||
ncolors = red_max + green_max + blue_max + 1;
|
||||
if (ncolors > vinfo->colormap_size)
|
||||
return 0;
|
||||
} else {
|
||||
ncolors = (red_max + 1) * (green_max + 1) * (blue_max + 1);
|
||||
if (ncolors > vinfo->colormap_size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Determine that the allocation and visual make sense for the property */
|
||||
|
||||
switch (property)
|
||||
{
|
||||
case XA_RGB_DEFAULT_MAP:
|
||||
if (red_max == 0 || green_max == 0 || blue_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
case XA_RGB_RED_MAP:
|
||||
if (red_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
case XA_RGB_GREEN_MAP:
|
||||
if (green_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
case XA_RGB_BLUE_MAP:
|
||||
if (blue_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
case XA_RGB_BEST_MAP:
|
||||
if (red_max == 0 || green_max == 0 || blue_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
case XA_RGB_GRAY_MAP:
|
||||
if (red_max == 0 || blue_max == 0 || green_max == 0)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
22
config.h.in
22
config.h.in
|
@ -23,12 +23,24 @@
|
|||
/* Define if you have FcPatternCreate */
|
||||
#undef HAVE_FC
|
||||
|
||||
/* Define if you have glitz */
|
||||
#undef HAVE_GLITZ_GLX
|
||||
|
||||
/* Define if you have the glx library */
|
||||
#undef HAVE_GLX
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `Xext' library (-lXext). */
|
||||
#undef HAVE_LIBXEXT
|
||||
|
||||
/* Define to 1 if you have the `Xft' library (-lXft). */
|
||||
#undef HAVE_LIBXFT
|
||||
|
||||
/* Define to 1 if you have the `Xmu' library (-lXmu). */
|
||||
#undef HAVE_LIBXMU
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
|
@ -62,7 +74,7 @@
|
|||
/* Define if you have XftDrawStringUtf8 */
|
||||
#undef HAVE_UTF8
|
||||
|
||||
/* Define to 1 if you have the <wraster.h> header file. */
|
||||
/* Define to 0 as we don't use wraster anymore */
|
||||
#undef HAVE_WRASTER_H
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
|
||||
|
@ -89,13 +101,13 @@
|
|||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to enable glitz support */
|
||||
#undef USE_GLITZ
|
||||
|
||||
/* Define to enable XIM support */
|
||||
#undef USE_XIM
|
||||
|
||||
/* Define if you have libwraster */
|
||||
#undef WITH_WRASTER
|
||||
|
||||
/* Define if you have X11/extensions/XShm.h */
|
||||
/* Define if you have X11 XShm extensions */
|
||||
#undef XSHM
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
WITH_WRASTER=@WITH_WRASTER@
|
||||
WITH_XFT=@WITH_XFT@
|
||||
WITH_GLITZ=@WITH_GLITZ@
|
||||
|
||||
GRAPHIC_LIBS=@GRAPHIC_LIBS@
|
||||
GRAPHIC_CFLAGS=@GRAPHIC_CFLAGS@
|
||||
GRAPHIC_LFLAGS=@GRAPHIC_LFLAGS@
|
||||
GRAPHIC_LIBS=@LIBS@
|
||||
GRAPHIC_CFLAGS=@CPPFLAGS@
|
||||
GRAPHIC_LFLAGS=@LDFLAGS@
|
||||
X_PRE_LIBS=@X_PRE_LIBS@
|
||||
|
||||
BUILD_SERVER=@BUILD_SERVER@
|
||||
|
|
288
configure.ac
288
configure.ac
|
@ -23,6 +23,8 @@
|
|||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
|
||||
builtin(include, pkg.m4)dnl
|
||||
|
||||
AC_INIT
|
||||
AC_PREREQ(2.57)
|
||||
AC_CONFIG_SRCDIR([back.make.in])
|
||||
|
@ -32,9 +34,6 @@ if test -z "$GNUSTEP_SYSTEM_ROOT"; then
|
|||
AC_MSG_ERROR([You must run the GNUstep.sh script before configuring])
|
||||
fi
|
||||
|
||||
GRAPHIC_CFLAGS="$CPPFLAGS"
|
||||
GRAPHIC_LFLAGS="$LDFLAGS"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use config.guess, config.sub and install-sh provided by gnustep-make
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -50,6 +49,9 @@ AC_CANONICAL_TARGET([])
|
|||
# The following is so that headers and custom libraries
|
||||
# in the GNUstep root are used before the standard ones
|
||||
#--------------------------------------------------------------------
|
||||
GRAPHIC_CFLAGS="$CPPFLAGS"
|
||||
GRAPHIC_LFLAGS="$LDFLAGS"
|
||||
|
||||
# Set location of GNUstep dirs for later use
|
||||
GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers
|
||||
if test "$GNUSTEP_FLATTENED" = yes; then
|
||||
|
@ -84,30 +86,18 @@ if test "x$no_x" = xyes; then
|
|||
fi
|
||||
|
||||
if test $set_x_paths = yes; then
|
||||
GRAPHIC_CFLAGS="$GRAPHIC_CFLAGS $X_CFLAGS"
|
||||
GRAPHIC_LFLAGS="$GRAPHIC_LFLAGS $X_LIBS"
|
||||
GRAPHIC_LIBS="$X_EXTRA_LIBS"
|
||||
GRAPHIC_CFLAGS="$X_CFLAGS $GRAPHIC_CFLAGS"
|
||||
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
|
||||
# Note: Don't include $X_LIBS in LDFLAGS as it may conflict with
|
||||
# other libraries installed in /sw, /sw/lib/freetyp2/lib
|
||||
#GRAPHIC_LFLAGS="$X_LIBS $GRAPHIC_LFLAGS"
|
||||
# But do include it here just to find the extra x libraries
|
||||
LDFLAGS="$X_LIBS $LDFLAGS"
|
||||
LIBS="-lX11 $X_EXTRA_LIBS $LIBS"
|
||||
|
||||
lib_save_header=${CPPFLAGS}
|
||||
lib_save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
AC_CHECK_LIB(Xext, main, have_xext=1, have_xext=0)
|
||||
if test $have_xext = 1; then
|
||||
GRAPHIC_LIBS="-lX11 -lXext ${GRAPHIC_LIBS}"
|
||||
else
|
||||
GRAPHIC_LIBS="-lX11 ${GRAPHIC_LIBS}"
|
||||
fi
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
AC_CHECK_LIB(Xmu, main, have_xmu=1, have_xmu=0)
|
||||
CPPFLAGS="${lib_save_header}"
|
||||
LIBS="${lib_save_libs}"
|
||||
if test $have_xmu = 1; then
|
||||
GRAPHIC_LIBS="-lXmu ${GRAPHIC_LIBS}"
|
||||
fi
|
||||
fi
|
||||
if test -r $x_includes/X11/DPS; then
|
||||
GRAPHIC_CFLAGS="-I$x_includes/X11 $GRAPHIC_CFLAGS"
|
||||
AC_CHECK_LIB(Xext, main)
|
||||
AC_CHECK_LIB(Xmu, main)
|
||||
LIBS="$X_LIBS $LIBS"
|
||||
fi
|
||||
AC_SUBST(X_PRE_LIBS)
|
||||
|
||||
|
@ -129,62 +119,82 @@ fi
|
|||
# Find for DPS
|
||||
#--------------------------------------------------------------------
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS="${CPPFLAGS} ${GRAPHIC_CFLAGS}"
|
||||
if test -r $x_includes/X11/DPS; then
|
||||
CPPFLAGS="-I$x_includes/X11 $CPPFLAGS"
|
||||
fi
|
||||
AC_CHECK_HEADERS([DPS/dpsclient.h DPS/dpsNXargs.h])
|
||||
CPPFLAGS="${save_CPPFLAGS}"
|
||||
if test $ac_cv_header_DPS_dpsNXargs_h = no; then
|
||||
CPPFLAGS="${save_CPPFLAGS}"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# freetype libraries
|
||||
#--------------------------------------------------------------------
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
|
||||
FREETYPE_LIBS="`freetype-config --libs`"
|
||||
FREETYPE_CFLAGS="`freetype-config --cflags`"
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${FREETYPE_CFLAGS}"
|
||||
LIBS="${LIBS} ${FREETYPE_LIBS}"
|
||||
|
||||
AC_CHECK_LIB(freetype, main, have_freetype=yes, have_freetype=no)
|
||||
if test "$have_freetype" = yes; then
|
||||
have_freetype=no
|
||||
if test x"$FREETYPE_LIBS" != x; then
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS="${CPPFLAGS} ${FREETYPE_CFLAGS}"
|
||||
AC_CHECK_HEADER(ft2build.h,have_freetype=yes, have_freetype=no)
|
||||
CPPFLAGS="${save_CPPFLAGS}"
|
||||
fi
|
||||
if test "$have_freetype" = yes; then
|
||||
GRAPHIC_CFLAGS="$GRAPHIC_CFLAGS $FREETYPE_CFLAGS"
|
||||
GRAPHIC_LIBS="$FREETYPE_LIBS $GRAPHIC_LIBS"
|
||||
fi
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Extended font support & UTF8 support
|
||||
#--------------------------------------------------------------------
|
||||
WITH_XFT=no
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
AC_CHECK_LIB(Xft, XftFontOpen, have_xft=yes, have_xft=no)
|
||||
AC_CHECK_HEADER(X11/Xft/Xft.h)
|
||||
if test "$have_xft" = yes -a "$ac_cv_header_X11_Xft_Xft_h" = yes; then
|
||||
GRAPHIC_LIBS="-lXft ${GRAPHIC_LIBS}"
|
||||
PKG_XFT=no
|
||||
PKG_CHECK_MODULES(XFT, xft, WITH_XFT=yes, WITH_XFT=no)
|
||||
|
||||
if test WITH_XFT = no; then
|
||||
# pkg-config failed for some reason, Check the old way?
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
save_LIBS=${LIBS}
|
||||
if test $have_freetype = yes; then
|
||||
LIBS="$FREETYPE_LIBS $LIBS"
|
||||
CPPFLAGS="$FREETYPE_CFLAGS $CPPFLAGS"
|
||||
fi
|
||||
AC_CHECK_LIB(Xft, XftFontOpen)
|
||||
AC_CHECK_HEADER(X11/Xft/Xft.h)
|
||||
if test "$ac_cv_lib_Xft_XftFontOpen" = yes -a "$ac_cv_header_X11_Xft_Xft_h" = yes; then
|
||||
WITH_XFT=yes
|
||||
XFT_LIBS="-lXft $FREETYPE_LIBS"
|
||||
XFT_CFLAGS="$FREETYPE_CFLAGS"
|
||||
fi
|
||||
CPPFLAGS=${save_CPPFLAGS}
|
||||
LIBS=${save_LIBS}
|
||||
else
|
||||
WITH_XFT=yes
|
||||
PKG_XFT=yes
|
||||
fi
|
||||
|
||||
if test $WITH_XFT = yes; then
|
||||
# Now add in some extra defines depending on what we have.
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
save_LIBS=${LIBS}
|
||||
CPPFLAGS="$XFT_CFLAGS $CPPFLAGS"
|
||||
LIBS="$XFT_LIBS $LIBS"
|
||||
AC_DEFINE(HAVE_XFT,1,[Define if you have the Xft library])
|
||||
AC_CHECK_LIB(Xft, XftDrawStringUtf8, have_utf8=yes, have_utf8=no)
|
||||
if test "$have_utf8" = yes; then
|
||||
AC_DEFINE(HAVE_UTF8,1,[Define if you have XftDrawStringUtf8])
|
||||
fi
|
||||
AC_CHECK_LIB(Xft, XftPatternGetString, have_xftpgs=yes, have_xftpgs=no)
|
||||
AC_CHECK_LIB(fontconfig, FcPatternCreate, have_fc=yes, have_fc=no)
|
||||
AC_CHECK_HEADER(fontconfig/fontconfig.h)
|
||||
if test "$have_fc" = yes -a "$ac_cv_header_fontconfig_fontconfig_h" = yes; then
|
||||
GRAPHIC_LIBS="-lfontconfig ${GRAPHIC_LIBS}"
|
||||
# fontconfig is likely to be included if we found xft via pkg-config, so
|
||||
# don't include it twice
|
||||
if test $PKG_XFT = no; then
|
||||
XFT_LIBS="${XFT_LIBS} -lfontconfig"
|
||||
fi
|
||||
AC_DEFINE(HAVE_FC,1,[Define if you have FcPatternCreate])
|
||||
fi
|
||||
CPPFLAGS=${save_CPPFLAGS}
|
||||
LIBS=${save_LIBS}
|
||||
fi
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
AC_SUBST(WITH_XFT)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -195,10 +205,6 @@ AC_ARG_ENABLE(glx,
|
|||
[ --disable-glx Disable GLX support],,
|
||||
enable_glx=yes)
|
||||
if test "x$enable_glx" = "xyes"; then
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
AC_CHECK_LIB(GL, glXMakeContextCurrent, have_glx=yes, have_glx=no)
|
||||
AC_CHECK_HEADER(GL/glx.h)
|
||||
AC_MSG_CHECKING([for GLX_RGBA_TYPE])
|
||||
|
@ -210,14 +216,12 @@ if test "x$enable_glx" = "xyes"; then
|
|||
], have_glx_rgba=yes, have_glx_rgba=no)
|
||||
AC_MSG_RESULT([$have_glx_rgba])
|
||||
if test "$have_glx" = yes -a "$ac_cv_header_GL_glx_h" = yes -a "$have_glx_rgba" = yes; then
|
||||
GRAPHIC_LIBS="-lGL ${GRAPHIC_LIBS}"
|
||||
LIBS="-lGL ${LIBS}"
|
||||
WITH_GLX=yes
|
||||
AC_DEFINE(HAVE_GLX,1,[Define if you have the glx library])
|
||||
fi
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
AC_SUBST(WITH_GLX)
|
||||
fi
|
||||
AC_SUBST(WITH_GLX)
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -235,8 +239,6 @@ fi
|
|||
#--------------------------------------------------------------------
|
||||
AC_HAVE_FUNCS(usleep)
|
||||
|
||||
save_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS="$CPPFLAGS $GRAPHIC_CFLAGS"
|
||||
have_xshm=no
|
||||
AC_CHECK_HEADERS(X11/extensions/XShm.h,
|
||||
have_xshm=yes,,
|
||||
|
@ -245,15 +247,10 @@ AC_CHECK_FUNCS(shmctl)
|
|||
if test "$ac_cv_header_X11_extensions_XShm_h" = yes -a "$ac_cv_func_shmctl" = yes; then
|
||||
AC_DEFINE(XSHM,1,[Define if you have X11 XShm extensions])
|
||||
fi
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Window's graphics library
|
||||
#--------------------------------------------------------------------
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
AC_CHECK_LIB(gdi32, main, have_gdi32=yes, have_gdi32=no)
|
||||
if test "$have_gdi32" = yes; then
|
||||
WIN32_LIBS="-lgdi32"
|
||||
|
@ -262,108 +259,68 @@ AC_CHECK_LIB(msimg32, main, have_msimg32=yes, have_msimg32=no)
|
|||
if test "$have_msimg32" = yes; then
|
||||
WIN32_LIBS="${WIN32_LIBS} -lmsimg32"
|
||||
fi
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# libart graphics libraries
|
||||
#--------------------------------------------------------------------
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
|
||||
LIBART_LIBS="`libart2-config --libs`"
|
||||
LIBART_CFLAGS="`libart2-config --cflags`"
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${LIBART_CFLAGS}"
|
||||
LIBS="${LIBS} ${LIBART_LIBS}"
|
||||
|
||||
AC_CHECK_LIB(art_lgpl_2, main, have_libart_lgpl_2=yes, have_libart_lgpl_2=no)
|
||||
if test "$have_libart_lgpl_2" = yes; then
|
||||
AC_CHECK_HEADER(libart_lgpl/libart.h,have_libart_lgpl_2=yes, have_libart_lgpl_2=no)
|
||||
AC_MSG_CHECKING([for libart2])
|
||||
LIBART_VERSION="`libart2-config --version 2>/dev/null`"
|
||||
if test x"$LIBART_VERSION" = x; then
|
||||
LIBART_VERSION="none"
|
||||
fi
|
||||
if test "$have_libart_lgpl_2" = yes; then
|
||||
GRAPHIC_LIBS="$LIBART_LIBS $GRAPHIC_LIBS"
|
||||
GRAPHIC_CFLAGS="$LIBART_CFLAGS $GRAPHIC_CFLAGS"
|
||||
AC_MSG_RESULT([$LIBART_VERSION])
|
||||
LIBART_LIBS="`libart2-config --libs 2>/dev/null`"
|
||||
LIBART_CFLAGS="`libart2-config --cflags 2>/dev/null`"
|
||||
|
||||
if test x"$LIBART_LIBS" = x; then
|
||||
# No libart2-config, is there any point in checking for individual libs?
|
||||
AC_CHECK_LIB(art_lgpl_2, main, have_libart=yes, have_libart=no)
|
||||
if test "$have_libart" = yes; then
|
||||
AC_CHECK_HEADER(libart_lgpl/libart.h,have_libart=yes, have_libart=no)
|
||||
fi
|
||||
if test "$have_libart" = yes; then
|
||||
LIBART_LIBS="-lart_lgpl_2"
|
||||
fi
|
||||
else
|
||||
have_libart=yes
|
||||
fi
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Cairo graphics libraries
|
||||
#--------------------------------------------------------------------
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
|
||||
CAIRO_LIBS="`pkg-config --libs cairo`"
|
||||
CAIRO_CFLAGS="`pkg-config --cflags cairo`"
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${CAIRO_CFLAGS}"
|
||||
LIBS="${LIBS} ${CAIRO_LIBS}"
|
||||
|
||||
AC_CHECK_HEADER(cairo.h,have_cairo=yes, have_cairo=no)
|
||||
|
||||
if test "$have_cairo" = yes; then
|
||||
GRAPHIC_LIBS="$CAIRO_LIBS $GRAPHIC_LIBS"
|
||||
GRAPHIC_CFLAGS="$CAIRO_CFLAGS $GRAPHIC_CFLAGS"
|
||||
fi
|
||||
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
PKG_CHECK_MODULES(CAIRO, cairo, have_cairo=yes, have_cairo=no)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Glitz-GLX libraries
|
||||
#--------------------------------------------------------------------
|
||||
WITH_GLITZ=no
|
||||
AC_ARG_ENABLE(glx,
|
||||
[ --disable-glx Disable GLX support],,
|
||||
enable_glx=yes)
|
||||
|
||||
if test "x$enable_glx" = "xyes"; then
|
||||
AC_ARG_ENABLE(glitz,
|
||||
[ --disable-glitz Disable Glitz support],,
|
||||
enable_glitz=yes)
|
||||
|
||||
if test "x$enable_glitz" = "xyes"; then
|
||||
WITH_GLITZ=yes
|
||||
save_header=${CPPFLAGS}
|
||||
save_libs=${LIBS}
|
||||
CPPFLAGS="${GRAPHIC_CFLAGS} ${GRAPHIC_LFLAGS} ${CPPFLAGS}"
|
||||
LIBS="${GRAPHIC_LIBS} ${LIBS}"
|
||||
|
||||
GLITZ_GLX_LIBS="`pkg-config --libs glitz-glx`"
|
||||
GLITZ_GLX_CFLAGS="`pkg-config --cflags glitz-glx`"
|
||||
|
||||
CPPFLAGS="${CPPFLAGS} ${GLITZ_GLX_CFLAGS}"
|
||||
LIBS="${LIBS} ${GLITZ_GLX_LIBS}"
|
||||
|
||||
AC_CHECK_HEADER(glitz-glx.h,have_glitz_glx=yes, have_glitz_glx=no)
|
||||
|
||||
if test "$have_glitz_glx" = yes; then
|
||||
GRAPHIC_LIBS="$GLITZ_GLX_LIBS $GRAPHIC_LIBS"
|
||||
GRAPHIC_CFLAGS="$GLITZ_GLX_CFLAGS $GRAPHIC_CFLAGS"
|
||||
PKG_CHECK_MODULES(GLITZ, glitz-glx, have_glitz_glx=yes, have_glitz_glx=no)
|
||||
AC_CHECK_HEADER(glitz-glx.h,have_glitz_glx_h=yes, have_glitz_glx_h=no)
|
||||
if test "$have_glitz_glx" = yes -a "$have_glitz_glx_h" = yes; then
|
||||
LIBS="$GLITZ_LIBS $LIBS"
|
||||
GRAPHIC_CFLAGS="$GLITZ_CFLAGS $GRAPHIC_CFLAGS"
|
||||
AC_DEFINE(HAVE_GLITZ_GLX,1,[Define if you have glitz])
|
||||
fi
|
||||
|
||||
CPPFLAGS="${save_header}"
|
||||
LIBS="${save_libs}"
|
||||
AC_SUBST(WITH_GLITZ)
|
||||
AC_DEFINE(HAVE_GLITZ_GLX,1,[Define if you have glitz])
|
||||
AC_DEFINE(USE_GLITZ,1,[Define to enable glitz support])
|
||||
fi
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Set definitions
|
||||
#--------------------------------------------------------------------
|
||||
WITH_WRASTER=no
|
||||
AC_SUBST(WITH_WRASTER)
|
||||
AC_SUBST(GRAPHIC_LIBS)
|
||||
AC_SUBST(GRAPHIC_CFLAGS)
|
||||
AC_SUBST(GRAPHIC_LFLAGS)
|
||||
AC_DEFINE(HAVE_WRASTER_H,0,[Define to 0 as we don't use wraster anymore])
|
||||
|
||||
# Revert to previous flags (removing added GNUstep flags)
|
||||
CPPFLAGS=${GRAPHIC_CFLAGS}
|
||||
LDFLAGS=${GRAPHIC_LFLAGS}
|
||||
#--------------------------------------------------------------------
|
||||
# Which projects should we build?
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -384,38 +341,65 @@ AC_ARG_ENABLE(graphics,
|
|||
BUILD_SERVER=$enable_server
|
||||
BUILD_GRAPHICS="$enable_graphics"
|
||||
AC_MSG_CHECKING(Backend Server)
|
||||
AC_SUBST(BUILD_SERVER)
|
||||
AC_DEFINE_UNQUOTED(BUILD_SERVER,SERVER_$BUILD_SERVER,
|
||||
[Define to type of window server to build])
|
||||
AC_MSG_RESULT($BUILD_SERVER)
|
||||
|
||||
AC_MSG_CHECKING(Backend Graphics)
|
||||
AC_SUBST(BUILD_GRAPHICS)
|
||||
AC_DEFINE_UNQUOTED(BUILD_GRAPHICS,$BUILD_GRAPHICS,
|
||||
[Define to type of graphics context to build])
|
||||
AC_MSG_RESULT($BUILD_GRAPHICS)
|
||||
|
||||
if test x"$BUILD_GRAPHICS" = "xxdps"; then
|
||||
GRAPHIC_LIBS="-ldpstk -ldps -lpsres -lXt $X_PRE_LIBS $GRAPHIC_LIBS"
|
||||
CPPFLAGS="-I$x_includes/X11 $CPPFLAGS"
|
||||
LIBS="-ldpstk -ldps -lpsres -lXt $X_PRE_LIBS $LIBS"
|
||||
elif test x"$BUILD_GRAPHICS" = "xart"; then
|
||||
if test "$have_freetype" = no; then
|
||||
AC_MSG_ERROR([can't find freetype, required for graphics=art!])
|
||||
AC_MSG_WARN([can't find freetype, required for graphics=art])
|
||||
BUILD_GRAPHICS=xlib
|
||||
fi
|
||||
if test "$have_libart_lgpl_2" = no; then
|
||||
AC_MSG_ERROR([can't find libart, required for graphics=art!])
|
||||
if test "$have_libart" = no; then
|
||||
AC_MSG_WARN([can't find libart, required for graphics=art])
|
||||
BUILD_GRAPHICS=xlib
|
||||
fi
|
||||
if test $BUILD_GRAPHICS = xlib; then
|
||||
if test $BUILD_SERVER = win32; then
|
||||
BUILD_GRAPHICS=winlib
|
||||
fi
|
||||
AC_MSG_NOTICE([Switching to $BUILD_GRAPHICS])
|
||||
else
|
||||
LIBS="$LIBART_LIBS $FREETYPE_LIBS $LIBS"
|
||||
CPPFLAGS="$LIBART_CFLAGS $FREETYPE_CFLAGS $CPPFLAGS"
|
||||
fi
|
||||
elif test x"$BUILD_GRAPHICS" = "xwinlib"; then
|
||||
GRAPHIC_LIBS="$WIN32_LIBS $GRAPHIC_LIBS"
|
||||
elif test x"$BUILD_GRAPHICS" = "xcairo"; then
|
||||
if test "$have_cairo" = no; then
|
||||
AC_MSG_ERROR([can't find cairo, required for graphics=cairo!])
|
||||
BUILD_GRAPHICS=xlib
|
||||
fi
|
||||
if test $BUILD_GRAPHICS = xlib; then
|
||||
if test $BUILD_SERVER = win32; then
|
||||
BUILD_GRAPHICS=winlib
|
||||
fi
|
||||
AC_MSG_NOTICE([Switching to $BUILD_GRAPHICS])
|
||||
else
|
||||
LIBS="$CAIRO_LIBS $LIBS"
|
||||
CPPFLAGS="$CAIRO_CFLAGS $CPPFLAGS"
|
||||
fi
|
||||
fi
|
||||
if test x"$BUILD_GRAPHICS" = "xwinlib"; then
|
||||
LIBS="$WIN32_LIBS $LIBS"
|
||||
fi
|
||||
if test x"$BUILD_GRAPHICS" = "xxlib"; then
|
||||
LIBS="$XFT_LIBS $LIBS"
|
||||
CPPFLAGS="$XFT_CFLAGS $CPPFLAGS"
|
||||
fi
|
||||
|
||||
AH_TOP([
|
||||
#define SERVER_x11 1
|
||||
#define SERVER_win32 2
|
||||
])
|
||||
AC_DEFINE_UNQUOTED(BUILD_SERVER,SERVER_$BUILD_SERVER,
|
||||
[Define to type of window server to build])
|
||||
AC_DEFINE_UNQUOTED(BUILD_GRAPHICS,$BUILD_GRAPHICS,
|
||||
[Define to type of graphics context to build])
|
||||
AC_SUBST(BUILD_GRAPHICS)
|
||||
AC_SUBST(BUILD_SERVER)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Set the name of the backend
|
||||
|
|
57
pkg.m4
Normal file
57
pkg.m4
Normal file
|
@ -0,0 +1,57 @@
|
|||
|
||||
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
||||
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
||||
dnl also defines GSTUFF_PKG_ERRORS on error
|
||||
AC_DEFUN(PKG_CHECK_MODULES, [
|
||||
succeeded=no
|
||||
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||
echo "*** to the full path to pkg-config."
|
||||
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
||||
else
|
||||
PKG_CONFIG_MIN_VERSION=0.9.0
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
||||
AC_MSG_CHECKING(for $2)
|
||||
|
||||
if $PKG_CONFIG --exists "$2" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
|
||||
AC_MSG_CHECKING($1_CFLAGS)
|
||||
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
||||
AC_MSG_RESULT($$1_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING($1_LIBS)
|
||||
$1_LIBS=`$PKG_CONFIG --libs "$2"`
|
||||
AC_MSG_RESULT($$1_LIBS)
|
||||
else
|
||||
$1_CFLAGS=""
|
||||
$1_LIBS=""
|
||||
## If we have a custom action on failure, don't print errors, but
|
||||
## do set a variable so people can do so.
|
||||
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
||||
fi
|
||||
|
||||
AC_SUBST($1_CFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
else
|
||||
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
||||
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $succeeded = yes; then
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
|
||||
fi
|
||||
])
|
||||
|
||||
|
Loading…
Reference in a new issue