2002-03-27 23:44:41 +00:00
|
|
|
# configure.in for GNUstep GUI Backend
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Adam Fedor <fedor@gnu.org>
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Backend.
|
|
|
|
#
|
|
|
|
# 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,
|
2005-05-26 22:51:53 +00:00
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-03-27 23:44:41 +00:00
|
|
|
#
|
|
|
|
|
2005-02-23 03:47:34 +00:00
|
|
|
builtin(include, pkg.m4)dnl
|
|
|
|
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_INIT
|
2003-10-20 03:45:55 +00:00
|
|
|
AC_PREREQ(2.57)
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_CONFIG_SRCDIR([back.make.in])
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
if test -z "$GNUSTEP_SYSTEM_ROOT"; then
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_MSG_ERROR([You must run the GNUstep.sh script before configuring])
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Use config.guess, config.sub and install-sh provided by gnustep-make
|
|
|
|
#--------------------------------------------------------------------
|
2003-04-28 02:35:05 +00:00
|
|
|
AC_CONFIG_AUX_DIR($GNUSTEP_MAKEFILES)
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Determine the host, build, and target systems
|
|
|
|
#--------------------------------------------------------------------
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_PROG_CC
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_CANONICAL_TARGET([])
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# The following is so that headers and custom libraries
|
|
|
|
# in the GNUstep root are used before the standard ones
|
|
|
|
#--------------------------------------------------------------------
|
2005-02-23 03:47:34 +00:00
|
|
|
GRAPHIC_CFLAGS="$CPPFLAGS"
|
|
|
|
GRAPHIC_LFLAGS="$LDFLAGS"
|
|
|
|
|
2002-03-27 23:44:41 +00:00
|
|
|
# Set location of GNUstep dirs for later use
|
2003-04-28 02:35:05 +00:00
|
|
|
GNUSTEP_HDIR=$GNUSTEP_SYSTEM_ROOT/Library/Headers
|
2002-03-27 23:44:41 +00:00
|
|
|
if test "$GNUSTEP_FLATTENED" = yes; then
|
2003-04-28 02:35:05 +00:00
|
|
|
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries
|
2002-03-27 23:44:41 +00:00
|
|
|
else
|
2003-04-28 02:35:05 +00:00
|
|
|
clean_target_os=`$GNUSTEP_MAKEFILES/clean_os.sh $target_os`
|
|
|
|
clean_target_cpu=`$GNUSTEP_MAKEFILES/clean_cpu.sh $target_cpu`
|
2002-03-27 23:44:41 +00:00
|
|
|
obj_dir=$clean_target_cpu/$clean_target_os
|
2003-04-28 02:35:05 +00:00
|
|
|
GNUSTEP_LDIR=$GNUSTEP_SYSTEM_ROOT/Library/Libraries/$obj_dir
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR"
|
|
|
|
LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR"
|
|
|
|
|
2002-08-16 03:16:32 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Add target OS directories as necessary
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
case "$target_os" in
|
2003-07-06 04:00:05 +00:00
|
|
|
freebsd* | openbsd* )
|
|
|
|
CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
2002-08-16 03:16:32 +00:00
|
|
|
LDFLAGS="$LDFLAGS -L/usr/pkg/lib";;
|
|
|
|
netbsd*) CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
|
2003-10-03 21:36:36 +00:00
|
|
|
LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
|
2002-08-16 03:16:32 +00:00
|
|
|
esac
|
|
|
|
|
2005-02-23 04:28:12 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find TIFF (Solaris requires this to find the correct library, even though
|
|
|
|
# it does not link directly to it)
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(tiff_library,
|
|
|
|
[ --with-tiff-library=DIR TIFF library file are in DIR], ,
|
|
|
|
with_tiff_library=)
|
|
|
|
|
|
|
|
if test -n "$with_tiff_library"; then
|
|
|
|
GRAPHIC_LFLAGS="$GRAPHIC_LFLAGS -L$with_tiff_library"
|
|
|
|
fi
|
|
|
|
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for X windows
|
|
|
|
#--------------------------------------------------------------------
|
2004-06-12 03:13:39 +00:00
|
|
|
set_x_paths=yes
|
2002-03-27 23:44:41 +00:00
|
|
|
AC_PATH_XTRA
|
2002-04-10 22:25:37 +00:00
|
|
|
if test "x$no_x" = xyes; then
|
|
|
|
set_x_paths=no
|
|
|
|
fi
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
if test $set_x_paths = yes; then
|
2005-02-23 03:47:34 +00:00
|
|
|
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"
|
|
|
|
|
|
|
|
AC_CHECK_LIB(Xext, main)
|
|
|
|
AC_CHECK_LIB(Xmu, main)
|
|
|
|
LIBS="$X_LIBS $LIBS"
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(X_PRE_LIBS)
|
|
|
|
|
2003-10-22 19:19:10 +00:00
|
|
|
# Old X11 support
|
|
|
|
AC_MSG_CHECKING([for X11 function prototypes])
|
|
|
|
AC_EGREP_CPP(yes,
|
|
|
|
[#include <X11/Xlib.h>
|
|
|
|
#if NeedFunctionPrototypes
|
|
|
|
yes
|
|
|
|
#endif
|
|
|
|
], have_funcproto=yes, have_funcproto=no)
|
|
|
|
AC_MSG_RESULT([$have_funcproto])
|
|
|
|
if test "$have_funcproto" = no; then
|
|
|
|
AC_DEFINE(FUNCPROTO,1,[Define if X11 doesn't automatically use prototypes])
|
|
|
|
fi
|
|
|
|
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for DPS
|
|
|
|
#--------------------------------------------------------------------
|
2002-05-06 02:03:29 +00:00
|
|
|
save_CPPFLAGS=${CPPFLAGS}
|
2005-02-23 03:47:34 +00:00
|
|
|
if test -r $x_includes/X11/DPS; then
|
|
|
|
CPPFLAGS="-I$x_includes/X11 $CPPFLAGS"
|
|
|
|
fi
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_CHECK_HEADERS([DPS/dpsclient.h DPS/dpsNXargs.h])
|
2005-02-23 03:47:34 +00:00
|
|
|
if test $ac_cv_header_DPS_dpsNXargs_h = no; then
|
|
|
|
CPPFLAGS="${save_CPPFLAGS}"
|
|
|
|
fi
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2003-08-02 03:44:42 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# freetype libraries
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
|
|
|
|
FREETYPE_LIBS="`freetype-config --libs`"
|
|
|
|
FREETYPE_CFLAGS="`freetype-config --cflags`"
|
|
|
|
|
2005-02-23 03:47:34 +00:00
|
|
|
have_freetype=no
|
|
|
|
if test x"$FREETYPE_LIBS" != x; then
|
|
|
|
save_CPPFLAGS=${CPPFLAGS}
|
|
|
|
CPPFLAGS="${CPPFLAGS} ${FREETYPE_CFLAGS}"
|
2003-08-02 03:44:42 +00:00
|
|
|
AC_CHECK_HEADER(ft2build.h,have_freetype=yes, have_freetype=no)
|
2005-02-23 03:47:34 +00:00
|
|
|
CPPFLAGS="${save_CPPFLAGS}"
|
2003-08-02 03:44:42 +00:00
|
|
|
fi
|
|
|
|
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
2002-04-17 03:53:52 +00:00
|
|
|
# Extended font support & UTF8 support
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
2005-02-23 03:47:34 +00:00
|
|
|
PKG_XFT=no
|
|
|
|
PKG_CHECK_MODULES(XFT, xft, WITH_XFT=yes, WITH_XFT=no)
|
|
|
|
|
2005-02-23 04:28:12 +00:00
|
|
|
if test $WITH_XFT = no; then
|
2005-02-23 03:47:34 +00:00
|
|
|
# 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
|
2002-03-27 23:44:41 +00:00
|
|
|
WITH_XFT=yes
|
2005-02-23 03:47:34 +00:00
|
|
|
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"
|
2005-05-20 13:57:21 +00:00
|
|
|
AC_DEFINE(HAVE_XFT,1,[Define if you have a functional XFreeType installation, including libXft.])
|
2002-04-17 03:53:52 +00:00
|
|
|
AC_CHECK_LIB(Xft, XftDrawStringUtf8, have_utf8=yes, have_utf8=no)
|
|
|
|
if test "$have_utf8" = yes; then
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_DEFINE(HAVE_UTF8,1,[Define if you have XftDrawStringUtf8])
|
2002-04-17 03:53:52 +00:00
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
AC_CHECK_LIB(Xft, XftPatternGetString, have_xftpgs=yes, have_xftpgs=no)
|
2003-02-27 01:22:45 +00:00
|
|
|
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
|
2005-02-23 03:47:34 +00:00
|
|
|
# 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
|
2003-02-27 01:22:45 +00:00
|
|
|
AC_DEFINE(HAVE_FC,1,[Define if you have FcPatternCreate])
|
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
CPPFLAGS=${save_CPPFLAGS}
|
|
|
|
LIBS=${save_LIBS}
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_XFT)
|
|
|
|
|
2002-11-16 05:00:14 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# GLX support
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
WITH_GLX=no
|
2002-11-27 22:08:04 +00:00
|
|
|
AC_ARG_ENABLE(glx,
|
|
|
|
[ --disable-glx Disable GLX support],,
|
|
|
|
enable_glx=yes)
|
|
|
|
if test "x$enable_glx" = "xyes"; then
|
|
|
|
AC_CHECK_LIB(GL, glXMakeContextCurrent, have_glx=yes, have_glx=no)
|
|
|
|
AC_CHECK_HEADER(GL/glx.h)
|
2003-01-15 02:57:47 +00:00
|
|
|
AC_MSG_CHECKING([for GLX_RGBA_TYPE])
|
|
|
|
AC_EGREP_CPP(yes,
|
|
|
|
[#include <GL/glx.h>
|
|
|
|
#ifdef GLX_RGBA_TYPE
|
|
|
|
yes
|
|
|
|
#endif
|
|
|
|
], 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
|
2005-02-23 03:47:34 +00:00
|
|
|
LIBS="-lGL ${LIBS}"
|
2002-11-27 22:08:04 +00:00
|
|
|
WITH_GLX=yes
|
|
|
|
AC_DEFINE(HAVE_GLX,1,[Define if you have the glx library])
|
|
|
|
fi
|
2002-11-16 05:00:14 +00:00
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
AC_SUBST(WITH_GLX)
|
2002-11-27 22:08:04 +00:00
|
|
|
|
2002-11-16 05:00:14 +00:00
|
|
|
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# XIM support
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE(xim,
|
|
|
|
[ --disable-xim Disable XIM support],,
|
|
|
|
enable_xim=yes)
|
|
|
|
if test "x$enable_xim" = "xyes"; then
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_DEFINE(USE_XIM,1,[Define to enable XIM support])
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
|
|
|
|
2002-08-03 03:32:19 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Functions
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_HAVE_FUNCS(usleep)
|
|
|
|
|
2004-01-11 04:05:43 +00:00
|
|
|
have_xshm=no
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_CHECK_HEADERS(X11/extensions/XShm.h,
|
2004-01-11 04:05:43 +00:00
|
|
|
have_xshm=yes,,
|
2002-05-04 19:39:47 +00:00
|
|
|
[#include <X11/Xlib.h>])
|
2003-10-15 21:21:52 +00:00
|
|
|
AC_CHECK_FUNCS(shmctl)
|
2004-01-11 04:05:43 +00:00
|
|
|
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
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2002-04-22 15:45:10 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Window's graphics library
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CHECK_LIB(gdi32, main, have_gdi32=yes, have_gdi32=no)
|
|
|
|
if test "$have_gdi32" = yes; then
|
2003-03-24 18:15:56 +00:00
|
|
|
WIN32_LIBS="-lgdi32"
|
2002-04-22 15:45:10 +00:00
|
|
|
fi
|
2004-07-06 17:52:39 +00:00
|
|
|
AC_CHECK_LIB(msimg32, main, have_msimg32=yes, have_msimg32=no)
|
|
|
|
if test "$have_msimg32" = yes; then
|
|
|
|
WIN32_LIBS="${WIN32_LIBS} -lmsimg32"
|
|
|
|
fi
|
2002-04-22 15:45:10 +00:00
|
|
|
|
2002-05-06 02:03:29 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# libart graphics libraries
|
|
|
|
#--------------------------------------------------------------------
|
2005-02-23 03:47:34 +00:00
|
|
|
AC_MSG_CHECKING([for libart2])
|
|
|
|
LIBART_VERSION="`libart2-config --version 2>/dev/null`"
|
|
|
|
if test x"$LIBART_VERSION" = x; then
|
|
|
|
LIBART_VERSION="none"
|
2002-05-06 02:03:29 +00:00
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
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
|
2003-08-02 03:44:42 +00:00
|
|
|
fi
|
2002-05-06 02:03:29 +00:00
|
|
|
|
2004-08-02 21:50:17 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Cairo graphics libraries
|
|
|
|
#--------------------------------------------------------------------
|
2005-02-23 03:47:34 +00:00
|
|
|
PKG_CHECK_MODULES(CAIRO, cairo, have_cairo=yes, have_cairo=no)
|
2004-08-02 21:50:17 +00:00
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Glitz-GLX libraries
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
WITH_GLITZ=no
|
|
|
|
AC_ARG_ENABLE(glitz,
|
|
|
|
[ --disable-glitz Disable Glitz support],,
|
|
|
|
enable_glitz=yes)
|
|
|
|
|
|
|
|
if test "x$enable_glitz" = "xyes"; then
|
|
|
|
WITH_GLITZ=yes
|
2005-02-23 03:47:34 +00:00
|
|
|
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])
|
2004-08-02 21:50:17 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(WITH_GLITZ)
|
|
|
|
AC_DEFINE(USE_GLITZ,1,[Define to enable glitz support])
|
|
|
|
fi
|
|
|
|
|
2002-04-22 15:45:10 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Set definitions
|
|
|
|
#--------------------------------------------------------------------
|
2002-03-27 23:44:41 +00:00
|
|
|
WITH_WRASTER=no
|
|
|
|
AC_SUBST(WITH_WRASTER)
|
|
|
|
|
2005-02-23 03:47:34 +00:00
|
|
|
# Revert to previous flags (removing added GNUstep flags)
|
|
|
|
CPPFLAGS=${GRAPHIC_CFLAGS}
|
|
|
|
LDFLAGS=${GRAPHIC_LFLAGS}
|
2002-03-27 23:44:41 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Which projects should we build?
|
|
|
|
#--------------------------------------------------------------------
|
2002-05-06 02:03:29 +00:00
|
|
|
BUILD_SERVER=x11
|
2005-09-20 03:00:11 +00:00
|
|
|
BUILD_GRAPHICS=art
|
2002-06-10 02:30:46 +00:00
|
|
|
case $target_os in
|
|
|
|
*mingw32* ) BUILD_SERVER=win32
|
|
|
|
BUILD_GRAPHICS=winlib;;
|
|
|
|
esac
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_ARG_ENABLE(server,
|
|
|
|
[ --enable-server=SRV Build server type: x11, win32],,
|
|
|
|
enable_server=$BUILD_SERVER)
|
|
|
|
AC_ARG_ENABLE(graphics,
|
2004-08-02 21:50:17 +00:00
|
|
|
[ --enable-graphics=GPH Build graphics: xlib, xdps, winlib, art, cairo],,
|
2002-05-06 02:03:29 +00:00
|
|
|
enable_graphics="$BUILD_GRAPHICS")
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2002-05-06 02:03:29 +00:00
|
|
|
BUILD_SERVER=$enable_server
|
|
|
|
BUILD_GRAPHICS="$enable_graphics"
|
2002-03-27 23:44:41 +00:00
|
|
|
AC_MSG_CHECKING(Backend Server)
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_MSG_RESULT($BUILD_SERVER)
|
2002-03-27 23:44:41 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(Backend Graphics)
|
2002-05-06 02:03:29 +00:00
|
|
|
AC_MSG_RESULT($BUILD_GRAPHICS)
|
|
|
|
|
|
|
|
if test x"$BUILD_GRAPHICS" = "xxdps"; then
|
2005-02-23 03:47:34 +00:00
|
|
|
CPPFLAGS="-I$x_includes/X11 $CPPFLAGS"
|
|
|
|
LIBS="-ldpstk -ldps -lpsres -lXt $X_PRE_LIBS $LIBS"
|
2002-05-06 02:03:29 +00:00
|
|
|
elif test x"$BUILD_GRAPHICS" = "xart"; then
|
2002-06-15 14:29:17 +00:00
|
|
|
if test "$have_freetype" = no; then
|
2005-02-23 03:47:34 +00:00
|
|
|
AC_MSG_WARN([can't find freetype, required for graphics=art])
|
|
|
|
BUILD_GRAPHICS=xlib
|
|
|
|
fi
|
|
|
|
if test "$have_libart" = no; then
|
|
|
|
AC_MSG_WARN([can't find libart, required for graphics=art])
|
|
|
|
BUILD_GRAPHICS=xlib
|
2002-06-15 14:29:17 +00:00
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
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"
|
2002-06-15 14:29:17 +00:00
|
|
|
fi
|
2004-08-02 21:50:17 +00:00
|
|
|
elif test x"$BUILD_GRAPHICS" = "xcairo"; then
|
|
|
|
if test "$have_cairo" = no; then
|
|
|
|
AC_MSG_ERROR([can't find cairo, required for graphics=cairo!])
|
2005-02-23 03:47:34 +00:00
|
|
|
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"
|
2004-08-02 21:50:17 +00:00
|
|
|
fi
|
2005-10-24 02:55:46 +00:00
|
|
|
elif test x"$BUILD_GRAPHICS" = "xxlib"; then
|
|
|
|
: # Nothing to do
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Invalid graphics backend $BUILD_GRAPHICS])
|
2002-03-27 23:44:41 +00:00
|
|
|
fi
|
2005-02-23 03:47:34 +00:00
|
|
|
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
|
2002-03-27 23:44:41 +00:00
|
|
|
|
2005-10-24 02:55:46 +00:00
|
|
|
if test $BUILD_SERVER = x11; then
|
|
|
|
if test $set_x_paths = no; then
|
|
|
|
AC_MSG_ERROR([No X11 libraries/headers for building x11 server])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2002-05-06 17:13:31 +00:00
|
|
|
AH_TOP([
|
|
|
|
#define SERVER_x11 1
|
|
|
|
#define SERVER_win32 2
|
|
|
|
])
|
2005-02-23 03:47:34 +00:00
|
|
|
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)
|
2002-05-06 17:13:31 +00:00
|
|
|
|
2002-04-02 15:51:31 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Set the name of the backend
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(name,
|
|
|
|
[ --with-name=PREFIX Set the name of the backend (def=back)])
|
2002-04-10 22:25:37 +00:00
|
|
|
AC_MSG_CHECKING(Backend name)
|
2002-04-02 15:51:31 +00:00
|
|
|
if test "x$with_name" = "x"; then
|
|
|
|
BACKEND_NAME=back
|
|
|
|
else
|
|
|
|
BACKEND_NAME=${with_name}
|
|
|
|
fi
|
2002-04-10 22:25:37 +00:00
|
|
|
AC_MSG_RESULT($BACKEND_NAME)
|
2002-04-02 15:51:31 +00:00
|
|
|
AC_SUBST(BACKEND_NAME)
|
|
|
|
|
2002-05-02 15:27:50 +00:00
|
|
|
AC_CONFIG_FILES([back.make config.make])
|
|
|
|
AC_OUTPUT
|