2000-04-27 04:17:54 +04:00
|
|
|
dnl -*- sh -*-
|
|
|
|
dnl the "configure" script is made from this by running GNU "autoconf"
|
|
|
|
dnl
|
|
|
|
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
|
|
|
dnl
|
2021-02-04 16:58:30 +03:00
|
|
|
dnl Copyright 1998-2021 by Bill Spitzak and others.
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
2011-07-19 08:49:30 +04:00
|
|
|
dnl This library is free software. Distribution and use rights are outlined in
|
|
|
|
dnl the file "COPYING" which should have been included with this file. If this
|
|
|
|
dnl file is missing or damaged, see the license at:
|
|
|
|
dnl
|
2021-02-04 16:58:30 +03:00
|
|
|
dnl https://www.fltk.org/COPYING.php
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
2021-02-04 16:58:30 +03:00
|
|
|
dnl Please see the following page on how to report bugs and issues:
|
2005-04-16 04:13:17 +04:00
|
|
|
dnl
|
2021-02-04 16:58:30 +03:00
|
|
|
dnl https://www.fltk.org/bugs.php
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2006-11-01 00:15:47 +03:00
|
|
|
dnl We need at least autoconf 2.50...
|
2016-08-01 15:22:05 +03:00
|
|
|
AC_PREREQ([2.50])
|
2001-11-30 00:50:05 +03:00
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
dnl Required file in package...
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_SRCDIR([src/Fl.cxx])
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2014-10-28 21:12:47 +03:00
|
|
|
dnl Do not automatically add "-g" to compiler options...
|
|
|
|
dnl This must be _before_ "Find compiler commands..."
|
|
|
|
ARCHFLAGS="${ARCHFLAGS:=}"
|
|
|
|
CFLAGS="${CFLAGS:=}"
|
|
|
|
CPPFLAGS="${CPPFLAGS:=}"
|
|
|
|
CXXFLAGS="${CXXFLAGS:=}"
|
|
|
|
DSOFLAGS="${DSOFLAGS:=}"
|
|
|
|
LDFLAGS="${LDFLAGS:=}"
|
|
|
|
OPTIM="${OPTIM:=}"
|
|
|
|
|
2014-09-29 00:48:00 +04:00
|
|
|
dnl Find compiler commands...
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
|
2010-11-18 16:23:52 +03:00
|
|
|
dnl So --with-archflags option is used during "checking size of long"
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
darwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_archflags" != x ; then
|
|
|
|
CFLAGS="$CFLAGS $with_archflags"
|
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
2010-11-18 16:23:52 +03:00
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
dnl FLTK library versions...
|
|
|
|
FL_MAJOR_VERSION=1
|
2008-04-12 23:16:19 +04:00
|
|
|
FL_MINOR_VERSION=3
|
2021-02-04 16:58:30 +03:00
|
|
|
FL_PATCH_VERSION=6
|
2015-03-25 23:06:54 +03:00
|
|
|
FL_DSO_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
|
2015-03-07 21:37:56 +03:00
|
|
|
FL_ABI_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.0
|
|
|
|
FL_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}.${FL_PATCH_VERSION}
|
2001-11-28 01:03:29 +03:00
|
|
|
|
|
|
|
AC_SUBST(FL_MAJOR_VERSION)
|
|
|
|
AC_SUBST(FL_MINOR_VERSION)
|
|
|
|
AC_SUBST(FL_PATCH_VERSION)
|
2015-03-25 23:06:54 +03:00
|
|
|
AC_SUBST(FL_DSO_VERSION)
|
2015-03-07 21:37:56 +03:00
|
|
|
AC_SUBST(FL_ABI_VERSION)
|
|
|
|
AC_SUBST(FL_VERSION)
|
2001-11-28 01:03:29 +03:00
|
|
|
|
2006-06-19 22:29:31 +04:00
|
|
|
AC_SUBST(ARCHFLAGS)
|
2002-01-13 22:17:36 +03:00
|
|
|
AC_SUBST(OPTIM)
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2016-08-01 11:28:50 +03:00
|
|
|
dnl FLTK build options to be used in Makefiles (defined in makeinclude)
|
|
|
|
USEMMFILES="No"
|
|
|
|
|
2002-04-16 21:11:11 +04:00
|
|
|
dnl OS-specific pre-tests...
|
2015-12-15 19:53:52 +03:00
|
|
|
dnl host_os_gui equals $host_os unless we target Cygwin or Darwin in combination with X11.
|
2013-09-24 13:10:04 +04:00
|
|
|
host_os_gui=$host_os
|
|
|
|
case $host_os in
|
|
|
|
cygwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
# Handle Cygwin option *first*, before all other tests.
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the Cygwin libraries [[default=no]]])
|
2015-12-15 20:43:50 +03:00
|
|
|
AC_ARG_ENABLE(x11, [ --enable-x11 with Cygwin or Mac OS, use X11 [[default=no]]])
|
2014-09-29 00:48:00 +04:00
|
|
|
if test x$enable_cygwin = xyes; then
|
2011-02-06 17:46:40 +03:00
|
|
|
# we target Cygwin in combination with X11
|
2010-06-18 14:11:09 +04:00
|
|
|
if test x$enable_x11 = xyes; then
|
2013-09-24 13:10:04 +04:00
|
|
|
host_os_gui="X11$host_os"
|
2009-02-14 17:34:32 +03:00
|
|
|
fi
|
2002-01-12 00:42:05 +03:00
|
|
|
fi
|
2001-11-22 16:56:10 +03:00
|
|
|
;;
|
2015-12-15 19:53:52 +03:00
|
|
|
darwin*)
|
|
|
|
if test x$enable_x11 = xyes; then
|
|
|
|
host_os_gui="X11"
|
2018-12-15 22:05:32 +03:00
|
|
|
OPTIM="-U__APPLE__ -mmacosx-version-min=10.3 $OPTIM"
|
2015-12-15 19:53:52 +03:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
2001-11-22 16:56:10 +03:00
|
|
|
esac
|
|
|
|
|
2008-09-30 21:14:20 +04:00
|
|
|
dnl Define the libraries and link options we will need.
|
2005-08-08 04:44:38 +04:00
|
|
|
LINKFLTK="../lib/libfltk.a"
|
|
|
|
LINKFLTKFORMS="../lib/libfltk_forms.a"
|
|
|
|
LINKFLTKGL="../lib/libfltk_gl.a"
|
|
|
|
LINKFLTKIMG="../lib/libfltk_images.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDEMOS="gldemos"
|
|
|
|
|
2004-07-23 23:26:27 +04:00
|
|
|
LIBEXT=".a"
|
2002-01-12 00:42:05 +03:00
|
|
|
LIBNAME="../lib/libfltk.a"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLLIBNAME="../lib/libfltk_forms.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLLIBNAME="../lib/libfltk_gl.a"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGLIBNAME="../lib/libfltk_images.a"
|
Cairo increment 2: Finer cairo granularity, less deps, new fltk_cairo lib
+ added new USE_CAIRO config preprocessor def.
to differentiate from HAVE_CAIRO so that we can use the cairo lib
without forcing the full fltk lib to be linked against it.
In that case, cairo autolink context functionality which needs fltk lib
instrumentation is disabled.
+ added new --enable-cairoext, which correspond to previous --enable-cairo.
now, --enable-cairo only adds HAVE_CAIRO def. and keeps fltk lib
from referencing cairo.
In both cases (--enable-cairo & --enable-cairoext), a new fltk_cairo lib is
created. This lib, similarly to local versions of png,jpeg and zlib,
is not generated if cairo is not enabled.
+ added cairo to fltk-config : now new --use-cairo flag is available
+ modified all unix like makefiles to now generate minimum cairo deps and also
new libfltk_cairo lib.
+ added new cairo subdir to permit conditional fltk_cairo lib generation.
+ vc2005 project minimum update to compile without be broken, but still needs
to create a similar fltk_cairo independent lib. For now, it works as before
with a dedicated cairo env. similar to --enable-cairoext context in unix.
+ regression tested ok with cairo disabled on win32, mac osx, mingw.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19 05:42:35 +04:00
|
|
|
CAIROLIBNAME="../lib/libfltk_cairo.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2008-12-29 22:45:46 +03:00
|
|
|
LIBBASENAME="libfltk.a"
|
|
|
|
FLLIBBASENAME="libfltk_forms.a"
|
|
|
|
GLLIBBASENAME="libfltk_gl.a"
|
|
|
|
IMGLIBBASENAME="libfltk_images.a"
|
|
|
|
CAIROLIBBASENAME="libfltk_cairo.a"
|
|
|
|
|
2008-10-25 18:53:03 +04:00
|
|
|
dnl Check for Cairo library unless disabled...
|
|
|
|
CAIRODIR=""
|
|
|
|
CAIROFLAGS=""
|
|
|
|
LINKFLTKCAIRO=""
|
|
|
|
FLTKCAIROOPTION=""
|
2008-10-26 01:06:31 +04:00
|
|
|
CAIROLIBS=""
|
2008-10-25 18:53:03 +04:00
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(cairoext,[ --enable-cairoext use fltk code instrumentation for cairo extended use [[default=no]]])
|
|
|
|
AC_ARG_ENABLE(cairo, [ --enable-cairo use lib Cairo [[default=no]]])
|
2009-01-28 01:34:46 +03:00
|
|
|
|
2008-10-25 18:53:03 +04:00
|
|
|
if test x$enable_cairoext = xyes; then
|
2011-01-06 13:24:58 +03:00
|
|
|
AC_DEFINE(FLTK_USE_CAIRO)
|
|
|
|
AC_DEFINE(FLTK_HAVE_CAIRO)
|
2008-10-25 18:53:03 +04:00
|
|
|
dnl FIXME This part should be fixed so configure do not depend on
|
|
|
|
dnl we do not rely on pkg-config .
|
|
|
|
CAIRODIR="cairo"
|
2016-09-30 15:36:55 +03:00
|
|
|
CAIROFLAGS="`pkg-config --cflags cairo`"
|
|
|
|
CAIROLIBS="-lcairo -lpixman-1"
|
|
|
|
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
|
2008-10-25 18:53:03 +04:00
|
|
|
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
|
2009-01-28 01:34:46 +03:00
|
|
|
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
|
2016-09-30 15:36:55 +03:00
|
|
|
LIBS="$CAIROLIBS $LIBS"
|
|
|
|
dnl $LINKFLTKCAIRO
|
2009-01-28 01:34:46 +03:00
|
|
|
LINKFLTK+=" $LINKFLTKCAIRO"
|
2016-09-30 15:36:55 +03:00
|
|
|
else
|
2009-01-28 01:34:46 +03:00
|
|
|
if test x$enable_cairo = xyes; then
|
2011-01-06 13:24:58 +03:00
|
|
|
AC_DEFINE(FLTK_HAVE_CAIRO)
|
2008-10-25 18:53:03 +04:00
|
|
|
dnl FIXME This part should be fixed so configure do not depend on
|
|
|
|
dnl we do not rely on pkg-config .
|
|
|
|
CAIRODIR="cairo"
|
2016-09-30 15:36:55 +03:00
|
|
|
CAIROFLAGS="`pkg-config --cflags cairo`"
|
|
|
|
CAIROLIBS="-lcairo -lpixman-1"
|
|
|
|
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
|
2008-10-25 18:53:03 +04:00
|
|
|
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
|
2009-01-28 01:34:46 +03:00
|
|
|
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
|
|
|
|
fi
|
2008-10-25 18:53:03 +04:00
|
|
|
fi
|
2009-01-28 01:34:46 +03:00
|
|
|
|
2008-10-25 18:53:03 +04:00
|
|
|
AC_SUBST(CAIRODIR)
|
|
|
|
AC_SUBST(CAIROFLAGS)
|
|
|
|
AC_SUBST(CAIROLIBS)
|
|
|
|
AC_SUBST(LINKFLTKCAIRO)
|
|
|
|
AC_SUBST(FLTKCAIROOPTION)
|
|
|
|
|
2009-01-28 01:34:46 +03:00
|
|
|
AC_SUBST(FLLIBNAME)
|
|
|
|
AC_SUBST(GLDEMOS)
|
|
|
|
AC_SUBST(GLLIBNAME)
|
|
|
|
AC_SUBST(IMGLIBNAME)
|
|
|
|
AC_SUBST(CAIROLIBNAME)
|
|
|
|
AC_SUBST(LIBEXT)
|
|
|
|
AC_SUBST(LIBNAME)
|
|
|
|
AC_SUBST(LINKFLTK)
|
|
|
|
AC_SUBST(LINKFLTKFORMS)
|
|
|
|
AC_SUBST(LINKFLTKGL)
|
|
|
|
AC_SUBST(LINKFLTKIMG)
|
|
|
|
|
|
|
|
AC_SUBST(LIBBASENAME)
|
|
|
|
AC_SUBST(FLLIBBASENAME)
|
|
|
|
AC_SUBST(GLLIBBASENAME)
|
|
|
|
AC_SUBST(IMGLIBBASENAME)
|
|
|
|
AC_SUBST(CAIROLIBBASENAME)
|
|
|
|
|
2015-07-12 22:23:55 +03:00
|
|
|
has_abiversion=""
|
|
|
|
AC_ARG_WITH(abiversion,
|
|
|
|
[ --with-abiversion Build with FL_ABI_VERSION, e.g. 10304 for FLTK 1.3.4])
|
|
|
|
has_abiversion="$with_abiversion"
|
|
|
|
if test "$has_abiversion" = "yes" ; then
|
|
|
|
has_abiversion=""
|
|
|
|
else
|
|
|
|
if test "$has_abiversion" = "no" ; then
|
|
|
|
has_abiversion=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test ! "$has_abiversion" = "" ; then
|
|
|
|
AC_DEFINE_UNQUOTED(FL_ABI_VERSION, [$has_abiversion], [define to FL_ABI_VERSION])
|
|
|
|
fi
|
|
|
|
|
2009-01-28 01:34:46 +03:00
|
|
|
dnl Handle compile-time options...
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [[default=no]]])
|
2009-01-28 01:34:46 +03:00
|
|
|
if test x$enable_debug = xyes; then
|
|
|
|
DEBUGFLAG="-g "
|
|
|
|
else
|
|
|
|
DEBUGFLAG=""
|
|
|
|
fi
|
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(cp936, [ --enable-cp936 turn on CP936 [[default=no]]])
|
2010-11-28 21:55:50 +03:00
|
|
|
if test x$enable_cp936 = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DCP936"
|
|
|
|
fi
|
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [[default=yes]]])
|
2009-01-28 01:34:46 +03:00
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [[default=no]]])
|
2002-01-12 00:42:05 +03:00
|
|
|
if test x$enable_shared = xyes; then
|
|
|
|
PICFLAG=1
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX=""
|
|
|
|
FLUID="fluid-shared"
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
darwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.$FL_DSO_VERSION.dylib"
|
|
|
|
FLDSONAME="libfltk_forms.$FL_DSO_VERSION.dylib"
|
|
|
|
GLDSONAME="libfltk_gl.$FL_DSO_VERSION.dylib"
|
|
|
|
IMGDSONAME="libfltk_images.$FL_DSO_VERSION.dylib"
|
|
|
|
CAIRODSONAME="libfltk_cairo.$FL_DSO_VERSION.dylib"
|
2011-02-24 13:27:33 +03:00
|
|
|
DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
solaris*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.so.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
|
2006-09-12 05:31:42 +04:00
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$libdir" != "x/usr/lib"; then
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOLINK="-R$libdir"
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
hpux*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.sl.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.sl.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.sl.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.sl.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.sl.$FL_DSO_VERSION"
|
2006-09-12 05:31:42 +04:00
|
|
|
DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$libdir" != "x/usr/lib"; then
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
irix*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.so.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
|
2002-05-19 21:44:56 +04:00
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2002-05-19 21:44:56 +04:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
osf*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.so.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"; then
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
linux* | *bsd*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk.so.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
|
|
|
|
|
|
|
|
# See if the compiler supports -fvisibility...
|
|
|
|
AC_CACHE_CHECK([if the compiler supports -fvisibility],
|
|
|
|
ac_cv_cxx_fvisibility, [
|
|
|
|
OLDCXXFLAGS="$CXXFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LANG_PUSH([C++])
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
2016-09-30 14:47:38 +03:00
|
|
|
[ac_cv_cxx_fvisibility=yes],
|
|
|
|
[ac_cv_cxx_fvisibility=no])
|
2016-09-30 15:36:55 +03:00
|
|
|
CXXFLAGS="$OLDCXXFLAGS"
|
|
|
|
AC_LANG_POP([])
|
|
|
|
])
|
|
|
|
if test x"$ac_cv_cxx_fvisibility" = xyes; then
|
|
|
|
OPTIM="$OPTIM -fvisibility=hidden"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# See if the compiler supports -fvisibility-inlines-hidden...
|
|
|
|
AC_CACHE_CHECK([if the compiler supports -fvisibility-inlines-hidden],
|
|
|
|
ac_cv_cxx_fvisibility_inlines, [
|
|
|
|
OLDCXXFLAGS="$CXXFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LANG_PUSH([C++])
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
2016-09-30 14:47:38 +03:00
|
|
|
[ac_cv_cxx_fvisibility_inlines=yes],
|
|
|
|
[ac_cv_cxx_fvisibility_inlines=no])
|
2016-09-30 15:36:55 +03:00
|
|
|
CXXFLAGS="$OLDCXXFLAGS"
|
|
|
|
AC_LANG_POP([])
|
|
|
|
])
|
|
|
|
if test x"$ac_cv_cxx_fvisibility_inlines" = xyes; then
|
|
|
|
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
|
|
|
|
fi
|
2014-08-22 23:44:27 +04:00
|
|
|
|
2010-11-17 14:13:57 +03:00
|
|
|
if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"; then
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
aix*)
|
2016-09-30 15:36:55 +03:00
|
|
|
DSONAME="libfltk_s.a"
|
|
|
|
FLDSONAME="libfltk_forms_s.a"
|
|
|
|
GLDSONAME="libfltk_gl_s.a"
|
|
|
|
IMGDSONAME="libfltk_images_s.a"
|
|
|
|
CAIRODSONAME="libfltk_cairo_s.a"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
|
|
|
|
SHAREDSUFFIX="_s"
|
|
|
|
;;
|
|
|
|
cygwin* | mingw*)
|
2005-08-08 04:54:30 +04:00
|
|
|
PICFLAG=0
|
|
|
|
if test x$enable_cygwin != xyes; then
|
2015-03-25 23:06:54 +03:00
|
|
|
DSONAME="mgwfltknox-$FL_DSO_VERSION.dll"
|
|
|
|
FLDSONAME="mgwfltknox_forms-$FL_DSO_VERSION.dll"
|
|
|
|
GLDSONAME="mgwfltknox_gl-$FL_DSO_VERSION.dll"
|
|
|
|
IMGDSONAME="mgwfltknox_images-$FL_DSO_VERSION.dll"
|
|
|
|
CAIRODSONAME="mgwfltknox_cairo-$FL_DSO_VERSION.dll"
|
2005-08-08 04:54:30 +04:00
|
|
|
else
|
2010-06-18 14:11:09 +04:00
|
|
|
if test x$enable_x11 = xyes; then
|
2015-03-25 23:06:54 +03:00
|
|
|
DSONAME="cygfltk-$FL_DSO_VERSION.dll"
|
|
|
|
FLDSONAME="cygfltk_forms-$FL_DSO_VERSION.dll"
|
|
|
|
GLDSONAME="cygfltk_gl-$FL_DSO_VERSION.dll"
|
|
|
|
IMGDSONAME="cygfltk_images-$FL_DSO_VERSION.dll"
|
|
|
|
CAIRODSONAME="cygfltk_cairo-$FL_DSO_VERSION.dll"
|
2009-02-14 17:34:32 +03:00
|
|
|
else
|
2015-03-25 23:06:54 +03:00
|
|
|
DSONAME="cygfltknox-$FL_DSO_VERSION.dll"
|
|
|
|
FLDSONAME="cygfltknox_forms-$FL_DSO_VERSION.dll"
|
|
|
|
GLDSONAME="cygfltknox_gl-$FL_DSO_VERSION.dll"
|
|
|
|
IMGDSONAME="cygfltknox_images-$FL_DSO_VERSION.dll"
|
|
|
|
CAIRODSONAME="cygfltknox_cairo-$FL_DSO_VERSION.dll"
|
2009-02-14 17:34:32 +03:00
|
|
|
fi
|
2005-08-08 04:54:30 +04:00
|
|
|
fi
|
2007-02-09 00:22:32 +03:00
|
|
|
#-----------------------------------------------------------
|
|
|
|
# -Wl,--enable-runtime-pseudo-reloc: See str 1585
|
|
|
|
# appears to be necessary for older binutils versions < 2.16
|
|
|
|
#-----------------------------------------------------------
|
2016-09-30 15:36:55 +03:00
|
|
|
LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
|
2007-02-09 00:22:32 +03:00
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -shared \
|
2016-09-30 15:36:55 +03:00
|
|
|
-Wl,--whole-archive -Wl,--export-all-symbols \
|
2007-02-09 00:22:32 +03:00
|
|
|
-Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import \
|
|
|
|
-Wl,--enable-auto-image-base -o \$@"
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
|
|
|
*)
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_MSG_WARN([Shared libraries may not be supported. Trying -shared option with compiler.])
|
|
|
|
DSONAME="libfltk.so.$FL_DSO_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_DSO_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_DSO_VERSION"
|
|
|
|
IMGDSONAME="libfltk_images.so.$FL_DSO_VERSION"
|
|
|
|
CAIRODSONAME="libfltk_cairo.so.$FL_DSO_VERSION"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
|
|
|
esac
|
2002-07-14 21:03:31 +04:00
|
|
|
|
2008-10-26 01:06:31 +04:00
|
|
|
LINKSHARED="-L../src $FLTKCAIROOPTION -lfltk_images$SHAREDSUFFIX -lfltk_forms$SHAREDSUFFIX -lfltk$SHAREDSUFFIX"
|
2002-01-12 00:42:05 +03:00
|
|
|
else
|
|
|
|
DSOCOMMAND="echo"
|
2001-11-28 01:03:29 +03:00
|
|
|
DSOLINK=""
|
2002-01-12 00:42:05 +03:00
|
|
|
DSONAME=""
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME=""
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME=""
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME=""
|
Cairo increment 2: Finer cairo granularity, less deps, new fltk_cairo lib
+ added new USE_CAIRO config preprocessor def.
to differentiate from HAVE_CAIRO so that we can use the cairo lib
without forcing the full fltk lib to be linked against it.
In that case, cairo autolink context functionality which needs fltk lib
instrumentation is disabled.
+ added new --enable-cairoext, which correspond to previous --enable-cairo.
now, --enable-cairo only adds HAVE_CAIRO def. and keeps fltk lib
from referencing cairo.
In both cases (--enable-cairo & --enable-cairoext), a new fltk_cairo lib is
created. This lib, similarly to local versions of png,jpeg and zlib,
is not generated if cairo is not enabled.
+ added cairo to fltk-config : now new --use-cairo flag is available
+ modified all unix like makefiles to now generate minimum cairo deps and also
new libfltk_cairo lib.
+ added new cairo subdir to permit conditional fltk_cairo lib generation.
+ vc2005 project minimum update to compile without be broken, but still needs
to create a similar fltk_cairo independent lib. For now, it works as before
with a dedicated cairo env. similar to --enable-cairoext context in unix.
+ regression tested ok with cairo disabled on win32, mac osx, mingw.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19 05:42:35 +04:00
|
|
|
CAIRODSONAME=""
|
2002-01-12 00:42:05 +03:00
|
|
|
PICFLAG=0
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX=""
|
|
|
|
FLUID="fluid"
|
2008-10-26 01:06:31 +04:00
|
|
|
LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
fi
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(DSOCOMMAND)
|
2006-09-12 05:31:42 +04:00
|
|
|
AC_SUBST(DSOFLAGS)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(DSOLINK)
|
|
|
|
AC_SUBST(DSONAME)
|
2002-03-26 00:39:01 +03:00
|
|
|
AC_SUBST(FLDSONAME)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(GLDSONAME)
|
2002-06-29 01:04:37 +04:00
|
|
|
AC_SUBST(IMGDSONAME)
|
Cairo increment 2: Finer cairo granularity, less deps, new fltk_cairo lib
+ added new USE_CAIRO config preprocessor def.
to differentiate from HAVE_CAIRO so that we can use the cairo lib
without forcing the full fltk lib to be linked against it.
In that case, cairo autolink context functionality which needs fltk lib
instrumentation is disabled.
+ added new --enable-cairoext, which correspond to previous --enable-cairo.
now, --enable-cairo only adds HAVE_CAIRO def. and keeps fltk lib
from referencing cairo.
In both cases (--enable-cairo & --enable-cairoext), a new fltk_cairo lib is
created. This lib, similarly to local versions of png,jpeg and zlib,
is not generated if cairo is not enabled.
+ added cairo to fltk-config : now new --use-cairo flag is available
+ modified all unix like makefiles to now generate minimum cairo deps and also
new libfltk_cairo lib.
+ added new cairo subdir to permit conditional fltk_cairo lib generation.
+ vc2005 project minimum update to compile without be broken, but still needs
to create a similar fltk_cairo independent lib. For now, it works as before
with a dedicated cairo env. similar to --enable-cairoext context in unix.
+ regression tested ok with cairo disabled on win32, mac osx, mingw.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19 05:42:35 +04:00
|
|
|
AC_SUBST(CAIRODSONAME)
|
2002-07-14 21:03:31 +04:00
|
|
|
AC_SUBST(SHAREDSUFFIX)
|
|
|
|
AC_SUBST(LINKSHARED)
|
|
|
|
AC_SUBST(FLUID)
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support [[default=yes]]])
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2002-04-10 20:26:33 +04:00
|
|
|
AC_ARG_WITH(optim, [ --with-optim="flags" use custom optimization flags])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2006-06-19 22:29:31 +04:00
|
|
|
AC_ARG_WITH(archflags, [ --with-archflags="flags"
|
2016-09-30 15:36:55 +03:00
|
|
|
use custom architecture flags
|
2010-11-18 17:41:42 +03:00
|
|
|
(possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)],
|
2006-06-19 22:29:31 +04:00
|
|
|
ARCHFLAGS="$withval")
|
2004-08-25 04:20:27 +04:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Find commands...
|
2007-02-06 22:35:28 +03:00
|
|
|
AC_PROG_INSTALL
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
osf*)
|
2007-05-14 16:00:06 +04:00
|
|
|
INSTALL="`pwd`/install-sh -c"
|
|
|
|
;;
|
|
|
|
esac
|
2007-02-08 22:14:29 +03:00
|
|
|
if test "$INSTALL" = "$ac_install_sh"; then
|
|
|
|
# Use full path to install-sh script...
|
|
|
|
INSTALL="`pwd`/install-sh -c"
|
|
|
|
fi
|
2001-02-12 18:12:14 +03:00
|
|
|
AC_PATH_PROG(NROFF,nroff)
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$NROFF" = "x:"; then
|
2007-02-08 22:14:29 +03:00
|
|
|
# Try groff instead of nroff...
|
2001-02-12 18:12:14 +03:00
|
|
|
AC_PATH_PROG(GROFF,groff)
|
2003-05-29 23:43:06 +04:00
|
|
|
if test "x$GROFF" = "x:"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
NROFF="echo"
|
2001-02-12 18:12:14 +03:00
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
NROFF="$GROFF -T ascii"
|
2001-02-12 18:12:14 +03:00
|
|
|
fi
|
|
|
|
fi
|
2008-10-15 19:58:04 +04:00
|
|
|
AC_PATH_PROG(DOXYDOC,doxygen)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl How do we make libraries?
|
|
|
|
AC_PROG_RANLIB
|
2011-02-07 17:30:30 +03:00
|
|
|
AC_PATH_TOOL(AR, ar)
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2002-04-10 20:26:33 +04:00
|
|
|
if test "x$AR" = "x:"; then
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_ERROR([Configure could not find the library archiver, aborting.])
|
2002-04-10 20:26:33 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$RANLIB" != "x:"; then
|
2002-01-12 00:42:05 +03:00
|
|
|
LIBCOMMAND="$AR cr"
|
|
|
|
else
|
|
|
|
LIBCOMMAND="$AR crs"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(LIBCOMMAND)
|
|
|
|
|
2010-12-08 12:48:07 +03:00
|
|
|
dnl how to compile (Windows) resource files
|
2011-02-07 17:30:30 +03:00
|
|
|
dnl this will only be used to compile resources for Windows .exe files
|
|
|
|
AC_PATH_TOOL(RC,windres)
|
2010-12-08 12:48:07 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Architecture checks...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
2007-05-14 23:35:32 +04:00
|
|
|
if test $ac_cv_sizeof_short -eq 2; then
|
1999-02-18 18:05:50 +03:00
|
|
|
AC_DEFINE(U16,unsigned short)
|
1998-10-06 22:21:25 +04:00
|
|
|
fi
|
2007-05-14 23:35:32 +04:00
|
|
|
if test $ac_cv_sizeof_int -eq 4; then
|
1999-02-18 18:05:50 +03:00
|
|
|
AC_DEFINE(U32,unsigned)
|
1998-10-06 22:21:25 +04:00
|
|
|
else
|
2007-05-14 23:35:32 +04:00
|
|
|
if test $ac_cv_sizeof_long -eq 4; then
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(U32,unsigned long)
|
1999-02-18 18:05:50 +03:00
|
|
|
fi
|
1998-10-06 22:21:25 +04:00
|
|
|
fi
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
darwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
*)
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_C_BIGENDIAN
|
2013-09-24 13:10:04 +04:00
|
|
|
|
2011-03-03 15:10:43 +03:00
|
|
|
if test $ac_cv_sizeof_int -eq 8; then
|
|
|
|
AC_DEFINE(U64,unsigned)
|
|
|
|
else
|
|
|
|
if test $ac_cv_sizeof_long -eq 8; then
|
|
|
|
AC_DEFINE(U64,unsigned long)
|
|
|
|
fi
|
|
|
|
fi
|
2016-09-30 15:36:55 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2002-10-22 17:45:23 +04:00
|
|
|
dnl Does the C++ compiler support the bool type?
|
|
|
|
AC_CACHE_CHECK(whether the compiler recognizes bool as a built-in type,
|
2002-10-23 19:18:57 +04:00
|
|
|
ac_cv_cxx_bool,[
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LANG_PUSH([C++])
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[
|
2016-09-30 14:47:38 +03:00
|
|
|
int f(int x){return 1;}
|
|
|
|
int f(char x){return 1;}
|
|
|
|
int f(bool x){return 1;}
|
2016-09-30 15:36:55 +03:00
|
|
|
]], [[
|
2016-09-30 14:47:38 +03:00
|
|
|
bool b = true;
|
|
|
|
return f(b);
|
|
|
|
]])],
|
|
|
|
[ac_cv_cxx_bool=yes],
|
|
|
|
[ac_cv_cxx_bool=no])
|
|
|
|
AC_LANG_POP([])
|
2002-10-23 19:18:57 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
if test "$ac_cv_cxx_bool" != yes; then
|
|
|
|
CXXFLAGS="-Dbool=char -Dfalse=0 -Dtrue=1 $CXXFLAGS"
|
2002-10-22 17:45:23 +04:00
|
|
|
fi
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Standard headers and functions...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_HEADER_DIRENT
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADERS([sys/select.h sys/stdtypes.h])
|
2009-07-24 02:51:56 +04:00
|
|
|
|
|
|
|
dnl Do we have the POSIX compatible scandir() prototype?
|
|
|
|
AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype],
|
|
|
|
ac_cv_cxx_scandir_posix,[
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <dirent.h>
|
|
|
|
int func (const char *d, dirent ***list, void *sort) {
|
|
|
|
int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
]], [[
|
|
|
|
]])],
|
|
|
|
[ac_cv_cxx_scandir_posix=yes],
|
|
|
|
[ac_cv_cxx_scandir_posix=no])
|
|
|
|
AC_LANG_POP([])
|
2009-07-24 02:51:56 +04:00
|
|
|
])
|
|
|
|
|
2011-02-16 15:33:56 +03:00
|
|
|
dnl Define both HAVE_SCANDIR... macros, if the POSIX compatible function is
|
|
|
|
dnl available. Otherwise: check, whether any scandir prototype is available,
|
2012-04-22 06:45:09 +04:00
|
|
|
dnl but dont use it on SunOS and QNX because of an incompatibility in pre-Y2K
|
2011-02-16 15:33:56 +03:00
|
|
|
dnl SunOS scandir versions. We assume, though, that the POSIX compatible
|
|
|
|
dnl version on newer SunOS/Solaris versions works as expected.
|
2009-07-24 02:51:56 +04:00
|
|
|
if test "$ac_cv_cxx_scandir_posix" = yes; then
|
2011-02-16 15:33:56 +03:00
|
|
|
AC_DEFINE(HAVE_SCANDIR)
|
2009-07-24 02:51:56 +04:00
|
|
|
AC_DEFINE(HAVE_SCANDIR_POSIX)
|
2011-02-16 15:33:56 +03:00
|
|
|
else
|
2013-09-24 13:10:04 +04:00
|
|
|
AC_CHECK_FUNC(scandir,[
|
2016-09-30 15:36:55 +03:00
|
|
|
case $host_os in
|
|
|
|
solaris* | *qnx*)
|
|
|
|
AC_MSG_WARN([Not using $host_os scandir emulation function.])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(HAVE_SCANDIR)
|
|
|
|
;;
|
|
|
|
esac])
|
2009-07-24 02:51:56 +04:00
|
|
|
fi
|
|
|
|
|
2002-11-08 22:50:35 +03:00
|
|
|
AC_CHECK_FUNC(vsnprintf,[
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
2016-09-30 15:36:55 +03:00
|
|
|
hpux1020)
|
|
|
|
AC_MSG_WARN([Not using built-in vsnprintf function because you are running HP-UX 10.20.])
|
|
|
|
;;
|
|
|
|
osf4)
|
|
|
|
AC_MSG_WARN([Not using built-in vsnprintf function because you are running Tru64 4.0.])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(HAVE_VSNPRINTF)
|
|
|
|
;;
|
2002-11-08 22:50:35 +03:00
|
|
|
esac])
|
|
|
|
AC_CHECK_FUNC(snprintf,[
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
2016-09-30 15:36:55 +03:00
|
|
|
hpux1020)
|
|
|
|
AC_MSG_WARN([Not using built-in snprintf function because you are running HP-UX 10.20.])
|
|
|
|
;;
|
|
|
|
osf4)
|
|
|
|
AC_MSG_WARN([Not using built-in snprintf function because you are running Tru64 4.0.])
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_DEFINE(HAVE_SNPRINTF)
|
|
|
|
;;
|
2002-11-08 22:50:35 +03:00
|
|
|
esac])
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADERS(strings.h)
|
2002-05-16 16:47:44 +04:00
|
|
|
AC_CHECK_FUNCS(strcasecmp strlcat strlcpy)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADERS(locale.h)
|
2005-07-24 22:41:30 +04:00
|
|
|
AC_CHECK_FUNCS(localeconv)
|
|
|
|
|
2001-11-20 23:10:59 +03:00
|
|
|
dnl FLTK library uses math library functions...
|
2001-11-22 16:56:10 +03:00
|
|
|
AC_SEARCH_LIBS(pow, m)
|
2001-11-20 23:10:59 +03:00
|
|
|
|
2005-12-14 03:39:55 +03:00
|
|
|
dnl Check for largefile support...
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
|
|
dnl Define largefile options as needed...
|
|
|
|
LARGEFILE=""
|
2008-07-14 01:39:07 +04:00
|
|
|
if test x$enable_largefile != xno; then
|
2005-12-14 03:39:55 +03:00
|
|
|
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
|
|
|
|
2007-11-21 00:52:54 +03:00
|
|
|
if test x$ac_cv_sys_large_files = x1; then
|
2005-12-14 03:39:55 +03:00
|
|
|
LARGEFILE="$LARGEFILE -D_LARGE_FILES"
|
|
|
|
fi
|
|
|
|
|
2007-11-21 00:52:54 +03:00
|
|
|
if test x$ac_cv_sys_file_offset_bits = x64; then
|
2005-12-14 03:39:55 +03:00
|
|
|
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(LARGEFILE)
|
|
|
|
|
|
|
|
dnl Check for "long long" support...
|
|
|
|
AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
|
|
|
|
[if test "$GCC" = yes; then
|
|
|
|
ac_cv_c_long_long=yes
|
|
|
|
else
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]],
|
|
|
|
[[long long int i;]])],
|
|
|
|
[ac_cv_c_long_long=yes],
|
|
|
|
[ac_cv_c_long_long=no])
|
2005-12-14 03:39:55 +03:00
|
|
|
fi])
|
|
|
|
|
|
|
|
if test $ac_cv_c_long_long = yes; then
|
|
|
|
AC_DEFINE(HAVE_LONG_LONG)
|
|
|
|
fi
|
|
|
|
|
2007-02-08 18:44:28 +03:00
|
|
|
dnl Check for dlopen/dlsym...
|
|
|
|
AC_SEARCH_LIBS(dlsym, dl, AC_DEFINE(HAVE_DLSYM))
|
2007-02-08 23:14:30 +03:00
|
|
|
AC_CHECK_HEADER(dlfcn.h, AC_DEFINE(HAVE_DLFCN_H))
|
2007-02-08 18:44:28 +03:00
|
|
|
|
2005-12-05 03:55:01 +03:00
|
|
|
dnl Check for audio libraries...
|
|
|
|
AUDIOLIBS=""
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
cygwin* | mingw*)
|
2005-12-14 05:27:23 +03:00
|
|
|
dnl Cygwin environment...
|
|
|
|
AUDIOLIBS="-lwinmm"
|
|
|
|
;;
|
2005-12-05 03:55:01 +03:00
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
darwin*)
|
2005-12-14 05:27:23 +03:00
|
|
|
AUDIOLIBS="-framework CoreAudio"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
AC_CHECK_HEADER(alsa/asoundlib.h,
|
|
|
|
AC_DEFINE(HAVE_ALSA_ASOUNDLIB_H)
|
|
|
|
AUDIOLIBS="-lasound")
|
2016-09-30 15:36:55 +03:00
|
|
|
;;
|
2005-12-14 05:27:23 +03:00
|
|
|
esac
|
2005-12-08 06:51:21 +03:00
|
|
|
|
2005-12-05 03:55:01 +03:00
|
|
|
AC_SUBST(AUDIOLIBS)
|
|
|
|
|
2001-08-02 23:43:49 +04:00
|
|
|
dnl Check for image libraries...
|
|
|
|
SAVELIBS="$LIBS"
|
|
|
|
IMAGELIBS=""
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS=""
|
2001-08-02 23:43:49 +04:00
|
|
|
|
|
|
|
AC_SUBST(IMAGELIBS)
|
2008-12-29 20:10:12 +03:00
|
|
|
AC_SUBST(STATICIMAGELIBS)
|
2001-08-02 23:43:49 +04:00
|
|
|
|
2008-11-12 15:48:51 +03:00
|
|
|
# Handle the JPEG lib linking mode (use fltk local or system lib)
|
|
|
|
# If --enable-(resp. --disable-)localjpeg parameter is not set by user
|
|
|
|
# Then we check the JPEG lib usability, with result in sysjpeglib_ok variable
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(localjpeg, [ --enable-localjpeg use local JPEG library [[default=auto]]])
|
2008-11-12 15:48:51 +03:00
|
|
|
# Check for System lib use if automatic mode or --disable-localjpeg is requested
|
|
|
|
sysjpeglib_ok=no
|
|
|
|
sysjpeginc_ok=no
|
|
|
|
if test x$enable_localjpeg != xyes; then
|
|
|
|
AC_CHECK_LIB(jpeg,jpeg_CreateCompress,
|
2008-11-12 20:18:06 +03:00
|
|
|
[AC_CHECK_HEADER(jpeglib.h,
|
2008-11-12 15:48:51 +03:00
|
|
|
sysjpeginc_ok=yes)
|
|
|
|
if test x$sysjpeginc_ok = xyes; then
|
|
|
|
sysjpeglib_ok=yes
|
2016-09-30 23:51:45 +03:00
|
|
|
fi])
|
2008-11-12 15:48:51 +03:00
|
|
|
fi
|
2016-09-30 15:36:55 +03:00
|
|
|
# Now set the jpeg lib and include flags according to the requested mode and availability
|
2008-11-12 15:48:51 +03:00
|
|
|
if test x$enable_localjpeg = xyes -o x$sysjpeglib_ok = xno; then
|
|
|
|
JPEGINC="-I../jpeg"
|
|
|
|
JPEG="jpeg"
|
|
|
|
IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
|
2004-11-20 06:44:18 +03:00
|
|
|
AC_DEFINE(HAVE_LIBJPEG)
|
2008-11-12 20:18:06 +03:00
|
|
|
#ac_cv_lib_jpeg_jpeg_CreateCompress=no # from ima: should not be necessary
|
2008-11-12 15:48:51 +03:00
|
|
|
# Finally, warn user if system lib was requested but not found
|
|
|
|
if test x$enable_localjpeg = xno; then
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_WARN([Cannot find system jpeg lib or header: choosing the local lib mode.])
|
2008-11-12 15:48:51 +03:00
|
|
|
fi
|
|
|
|
else
|
2004-07-06 04:18:49 +04:00
|
|
|
JPEGINC=""
|
|
|
|
JPEG=""
|
2008-11-13 02:43:48 +03:00
|
|
|
IMAGELIBS="-ljpeg $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS"
|
2008-11-12 15:48:51 +03:00
|
|
|
AC_DEFINE(HAVE_LIBJPEG)
|
|
|
|
fi
|
2004-07-06 04:18:49 +04:00
|
|
|
|
2008-11-12 15:48:51 +03:00
|
|
|
# Handle the ZLIB lib linking mode (use fltk local or system lib)
|
|
|
|
# If --enable-(resp. --disable-)localzlib parameter is not set by user
|
|
|
|
# Then we check the ZLIB lib usability, with result in syszlib_ok variable
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(localzlib, [ --enable-localzlib use local ZLIB library [[default=auto]]])
|
2008-11-12 15:48:51 +03:00
|
|
|
# Check for System lib use if automatic mode or --disable-localzlib is requested
|
|
|
|
syszlib_ok=no
|
|
|
|
syszinc_ok=no
|
|
|
|
if test x$enable_localzlib != xyes; then
|
|
|
|
AC_CHECK_LIB(z,gzgets,
|
2016-09-30 15:36:55 +03:00
|
|
|
[AC_CHECK_HEADER(zlib.h,
|
2008-11-12 15:48:51 +03:00
|
|
|
syszinc_ok=yes)
|
|
|
|
if test x$syszinc_ok = xyes; then
|
|
|
|
syszlib_ok=yes
|
2016-09-30 23:51:45 +03:00
|
|
|
fi])
|
2008-11-12 15:48:51 +03:00
|
|
|
fi
|
2016-09-30 15:36:55 +03:00
|
|
|
# Now set the Z lib and include flags according to the requested mode and availability
|
2008-11-12 15:48:51 +03:00
|
|
|
if test x$enable_localzlib = xyes -o x$syszlib_ok = xno ; then
|
|
|
|
ZLIBINC="-I../zlib"
|
|
|
|
ZLIB="zlib"
|
|
|
|
LIBS="-lfltk_z $LIBS"
|
|
|
|
IMAGELIBS="-lfltk_z $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="\$libdir/libfltk_z.a $STATICIMAGELIBS"
|
2004-11-20 06:44:18 +03:00
|
|
|
AC_DEFINE(HAVE_LIBZ)
|
2008-11-12 15:48:51 +03:00
|
|
|
ac_cv_lib_z_gzgets=no # fc: is still necessary ?
|
|
|
|
# Finally, warn user if system lib was requested but not found
|
|
|
|
if test x$enable_localzlib = xno; then
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_WARN([Cannot find system z lib or header: choosing the local lib mode.])
|
2008-11-12 15:48:51 +03:00
|
|
|
fi
|
|
|
|
else
|
2004-07-06 04:18:49 +04:00
|
|
|
ZLIBINC=""
|
|
|
|
ZLIB=""
|
|
|
|
LIBS="-lz $LIBS"
|
2008-11-13 02:48:01 +03:00
|
|
|
IMAGELIBS="-lz $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="-lz $STATICIMAGELIBS"
|
2008-11-12 15:48:51 +03:00
|
|
|
AC_DEFINE(HAVE_LIBZ)
|
|
|
|
fi
|
2004-07-06 04:18:49 +04:00
|
|
|
|
2008-11-10 20:22:14 +03:00
|
|
|
# Handle the PNG lib linking mode (use fltk local or system lib)
|
|
|
|
# If --enable-(resp. --disable-)localpng parameter is not set by user
|
|
|
|
# Then we check the png lib usability with result in syspng_lib variable
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library [[default=auto]]])
|
2008-11-10 23:11:36 +03:00
|
|
|
|
2008-11-11 00:05:22 +03:00
|
|
|
# Now check if system lib is usable, we check Lib AND include availability with inc variant,
|
|
|
|
# but only, if the builtin lib is not requested
|
2008-11-10 23:11:36 +03:00
|
|
|
syspnglib_ok=no
|
|
|
|
syspnginc_ok=no
|
2008-11-12 15:48:51 +03:00
|
|
|
if test x$enable_localpng != xyes; then
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_CHECK_LIB(png, png_read_info,
|
|
|
|
[AC_CHECK_HEADER(png.h,
|
2008-11-10 23:11:36 +03:00
|
|
|
AC_DEFINE(HAVE_PNG_H)
|
|
|
|
syspnginc_ok=yes)
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_CHECK_HEADER(libpng/png.h,
|
2008-11-10 23:11:36 +03:00
|
|
|
AC_DEFINE(HAVE_LIBPNG_PNG_H)
|
|
|
|
syspnginc_ok=yes)
|
|
|
|
if test x$syspnginc_ok = xyes; then
|
|
|
|
syspnglib_ok=yes
|
|
|
|
fi])
|
2008-11-11 00:05:22 +03:00
|
|
|
fi
|
2008-11-10 23:11:36 +03:00
|
|
|
|
|
|
|
# The following is executed if the lib was not found usable or if local lib is required explicitly
|
2008-11-10 20:22:14 +03:00
|
|
|
if test x$enable_localpng = xyes -o x$syspnglib_ok = xno ; then
|
2008-11-11 01:03:55 +03:00
|
|
|
PNGINC="-I../png"
|
|
|
|
PNG="png"
|
|
|
|
IMAGELIBS="-lfltk_png $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="\$libdir/libfltk_png.a $STATICIMAGELIBS"
|
2008-11-10 20:22:14 +03:00
|
|
|
AC_DEFINE(HAVE_LIBPNG)
|
|
|
|
AC_DEFINE(HAVE_PNG_H)
|
|
|
|
AC_DEFINE(HAVE_PNG_GET_VALID)
|
|
|
|
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
2008-11-12 15:48:51 +03:00
|
|
|
# Finally, warn user if system lib was requested but not found
|
|
|
|
if test x$enable_localpng = xno; then
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_WARN([Cannot find system png lib or header: choosing the local lib mode.])
|
2008-11-12 15:48:51 +03:00
|
|
|
fi
|
2008-11-10 20:22:14 +03:00
|
|
|
else
|
|
|
|
PNGINC=""
|
|
|
|
PNG=""
|
|
|
|
IMAGELIBS="-lpng $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="-lpng $STATICIMAGELIBS"
|
2008-11-10 20:22:14 +03:00
|
|
|
AC_DEFINE(HAVE_LIBPNG)
|
2008-11-11 00:05:22 +03:00
|
|
|
AC_CHECK_LIB(png,png_get_valid, AC_DEFINE(HAVE_PNG_GET_VALID))
|
2008-11-10 20:22:14 +03:00
|
|
|
AC_CHECK_LIB(png,png_set_tRNS_to_alpha, AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
|
|
|
|
fi
|
2004-07-06 04:18:49 +04:00
|
|
|
|
|
|
|
AC_SUBST(JPEG)
|
|
|
|
AC_SUBST(JPEGINC)
|
|
|
|
AC_SUBST(PNG)
|
|
|
|
AC_SUBST(PNGINC)
|
|
|
|
AC_SUBST(ZLIB)
|
|
|
|
AC_SUBST(ZLIBINC)
|
|
|
|
|
2001-08-02 23:43:49 +04:00
|
|
|
dnl Restore original LIBS settings...
|
|
|
|
LIBS="$SAVELIBS"
|
|
|
|
|
2001-11-30 00:12:15 +03:00
|
|
|
dnl See if we need a .exe extension on executables...
|
2001-11-28 23:43:44 +03:00
|
|
|
AC_EXEEXT
|
|
|
|
|
2001-12-09 23:26:24 +03:00
|
|
|
dnl Check for pthreads for multi-threaded apps...
|
2001-12-17 18:36:28 +03:00
|
|
|
have_pthread=no
|
2007-02-05 21:39:27 +03:00
|
|
|
PTHREAD_FLAGS=""
|
2001-12-17 18:36:28 +03:00
|
|
|
|
2011-02-14 21:11:15 +03:00
|
|
|
dnl Test whether we want to check for pthreads. We must not do it on Windows
|
|
|
|
dnl unless we run under Cygwin with --enable-cygwin, since we always use
|
|
|
|
dnl native threads on Windows (even if libpthread is available)
|
|
|
|
check_pthread=yes
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
mingw*)
|
2011-02-14 21:11:15 +03:00
|
|
|
check_pthread=no
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
cygwin*)
|
2011-02-14 21:11:15 +03:00
|
|
|
if test "x$enable_cygwin" != xyes; then
|
|
|
|
check_pthread=no
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test "x$enable_threads" != xno -a x$check_pthread = xyes; then
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADERS(pthread.h)
|
2001-12-17 18:36:28 +03:00
|
|
|
|
2007-02-05 21:39:27 +03:00
|
|
|
if test x$ac_cv_header_pthread_h = xyes; then
|
|
|
|
dnl Check various threading options for the platforms we support
|
|
|
|
for flag in -lpthreads -lpthread -pthread; do
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_MSG_CHECKING([for pthread_create using $flag])
|
2007-02-05 06:20:30 +03:00
|
|
|
SAVELIBS="$LIBS"
|
2007-02-05 21:39:27 +03:00
|
|
|
LIBS="$flag $LIBS"
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_LINK_IFELSE(
|
2016-09-30 14:47:38 +03:00
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <pthread.h>]],
|
|
|
|
[[pthread_create(0, 0, 0, 0);]])],
|
|
|
|
[have_pthread=yes],
|
|
|
|
[LIBS="$SAVELIBS"])
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_MSG_RESULT([$have_pthread])
|
2007-02-05 21:39:27 +03:00
|
|
|
|
|
|
|
if test $have_pthread = yes; then
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(HAVE_PTHREAD)
|
2007-02-05 21:39:27 +03:00
|
|
|
PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
|
|
|
|
|
|
|
|
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
|
|
|
|
# be POSIX-compliant... :(
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
solaris*)
|
2016-09-30 15:36:55 +03:00
|
|
|
PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
2007-02-05 21:39:27 +03:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
2001-12-09 23:26:24 +03:00
|
|
|
fi
|
|
|
|
|
2007-02-05 21:39:27 +03:00
|
|
|
AC_SUBST(PTHREAD_FLAGS)
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define OS-specific stuff...
|
|
|
|
HLINKS=
|
2008-02-26 18:26:08 +03:00
|
|
|
OSX_ONLY=:
|
2002-01-12 00:42:05 +03:00
|
|
|
THREADS=
|
2001-12-15 00:02:24 +03:00
|
|
|
|
2014-10-30 17:07:58 +03:00
|
|
|
AC_ARG_WITH(links, [ --with-links make header links for common misspellings [[default=no]]])
|
2003-09-14 18:28:22 +04:00
|
|
|
|
2006-01-15 06:16:09 +03:00
|
|
|
INSTALL_DESKTOP=""
|
|
|
|
UNINSTALL_DESKTOP=""
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os_gui in
|
|
|
|
cygwin* | mingw*)
|
2009-02-14 17:34:32 +03:00
|
|
|
dnl Cygwin environment, using windows GDI ...
|
2007-05-14 23:35:32 +04:00
|
|
|
# Recent versions of Cygwin are seriously broken and the size
|
|
|
|
# checks don't work because the shell puts out \r\n instead of
|
|
|
|
# \n. Here we just force U32 to be defined to "unsigned"...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(U32,unsigned)
|
2009-02-14 17:34:32 +03:00
|
|
|
CFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CFLAGS"
|
|
|
|
CXXFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CXXFLAGS"
|
2002-04-09 13:22:15 +04:00
|
|
|
LDFLAGS="-mwindows $LDFLAGS"
|
2007-02-09 00:22:32 +03:00
|
|
|
DSOFLAGS="-mwindows $DSOFLAGS"
|
2008-08-28 21:33:56 +04:00
|
|
|
LIBS="$LIBS -lole32 -luuid -lcomctl32"
|
2007-05-14 16:21:42 +04:00
|
|
|
if test "x$with_optim" = x; then
|
2011-02-06 17:46:40 +03:00
|
|
|
dnl Avoid -Os optimization on Cygwin/MinGW
|
2007-05-14 16:21:42 +04:00
|
|
|
with_optim="-O3"
|
|
|
|
fi
|
2001-12-04 22:57:45 +03:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
if test x$enable_gl != xno; then
|
|
|
|
AC_CHECK_HEADER(GL/gl.h,
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(HAVE_GL)
|
2001-11-17 18:55:36 +03:00
|
|
|
GLLIB="-lopengl32")
|
|
|
|
AC_CHECK_HEADER(GL/glu.h,
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
2001-11-17 18:55:36 +03:00
|
|
|
GLLIB="-lglu32 $GLLIB")
|
|
|
|
else
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
|
|
|
fi
|
2001-12-04 22:57:45 +03:00
|
|
|
|
2008-11-14 20:22:08 +03:00
|
|
|
if test "x$enable_threads" != xno; then
|
2006-01-02 15:47:09 +03:00
|
|
|
if test x$have_pthread = xyes; then
|
|
|
|
AC_DEFINE(HAVE_PTHREAD)
|
|
|
|
fi
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2001-12-09 23:26:24 +03:00
|
|
|
|
2011-02-14 21:11:15 +03:00
|
|
|
THREADS="threads$EXEEXT"
|
|
|
|
|
2001-12-04 22:57:45 +03:00
|
|
|
# Don't make symlinks since Windows is not case sensitive.
|
2003-09-14 18:28:22 +04:00
|
|
|
if test "x$with_links" != xyes; then
|
|
|
|
HLINKS="#"
|
|
|
|
fi
|
2001-11-17 18:55:36 +03:00
|
|
|
;;
|
2002-04-16 21:11:11 +04:00
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
darwin*)
|
2015-12-15 19:53:52 +03:00
|
|
|
AC_DEFINE(__APPLE_QUARTZ__)
|
|
|
|
|
2016-09-30 15:36:55 +03:00
|
|
|
USEMMFILES="Yes"
|
2015-12-15 19:53:52 +03:00
|
|
|
|
2016-09-30 15:36:55 +03:00
|
|
|
# MacOS X uses Cocoa for graphics.
|
|
|
|
LIBS="$LIBS -framework Cocoa"
|
2001-12-04 22:57:45 +03:00
|
|
|
|
2002-04-16 21:11:11 +04:00
|
|
|
if test x$have_pthread = xyes; then
|
2002-04-16 19:49:06 +04:00
|
|
|
AC_DEFINE(HAVE_PTHREAD)
|
2009-02-14 17:34:32 +03:00
|
|
|
THREADS="threads$EXEEXT"
|
2002-04-16 19:49:06 +04:00
|
|
|
fi
|
|
|
|
|
2001-11-27 20:44:08 +03:00
|
|
|
if test x$enable_gl != xno; then
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(HAVE_GL)
|
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
|
|
|
GLLIB="-framework OpenGL"
|
|
|
|
else
|
2001-11-27 20:44:08 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2016-09-30 15:36:55 +03:00
|
|
|
fi
|
2001-12-07 01:16:49 +03:00
|
|
|
|
2001-12-04 22:57:45 +03:00
|
|
|
# Don't make symlinks because HFS+ is not case sensitive...
|
2003-09-14 18:28:22 +04:00
|
|
|
if test "x$with_links" != xyes; then
|
|
|
|
HLINKS="#"
|
|
|
|
fi
|
2001-12-07 01:16:49 +03:00
|
|
|
|
2008-02-26 18:26:08 +03:00
|
|
|
# Some steps are only done for OS X package management
|
|
|
|
OSX_ONLY=
|
|
|
|
|
2006-01-15 06:16:09 +03:00
|
|
|
# Install/Uninstall FLUID application
|
|
|
|
INSTALL_DESKTOP="install-osx"
|
|
|
|
UNINSTALL_DESKTOP="uninstall-osx"
|
2001-11-27 20:44:08 +03:00
|
|
|
;;
|
2002-04-16 21:11:11 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
*)
|
2001-12-17 18:36:28 +03:00
|
|
|
# All others are UNIX/X11...
|
2011-02-06 17:46:40 +03:00
|
|
|
# This includes Cygwin target combined with X11
|
2002-04-16 21:11:11 +04:00
|
|
|
if test x$have_pthread = xyes; then
|
2001-12-07 01:16:49 +03:00
|
|
|
AC_DEFINE(HAVE_PTHREAD)
|
2009-02-14 17:34:32 +03:00
|
|
|
THREADS="threads$EXEEXT"
|
2001-12-07 01:16:49 +03:00
|
|
|
fi
|
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
dnl Check for X11...
|
|
|
|
AC_PATH_XTRA
|
2001-04-25 17:34:43 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
if test x$no_x = xyes; then
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_ERROR([Configure could not find required X11 libraries, aborting.])
|
2001-11-17 18:55:36 +03:00
|
|
|
fi
|
2001-04-25 17:34:43 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
if test "x$X_PRE_LIBS" != x; then
|
2016-08-01 15:22:05 +03:00
|
|
|
AC_MSG_WARN([Ignoring libraries "$X_PRE_LIBS" requested by configure.])
|
2001-11-17 18:55:36 +03:00
|
|
|
fi
|
2001-10-25 21:25:11 +04:00
|
|
|
|
2008-09-25 22:26:33 +04:00
|
|
|
LIBS="$LIBS -lX11 $X_EXTRA_LIBS"
|
2003-09-20 22:40:36 +04:00
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
|
2001-11-17 18:55:36 +03:00
|
|
|
LDFLAGS="$X_LIBS $LDFLAGS"
|
2006-09-05 05:39:13 +04:00
|
|
|
DSOFLAGS="$X_LIBS $DSOFLAGS"
|
2008-09-25 22:26:33 +04:00
|
|
|
AC_DEFINE(USE_X11)
|
2001-11-17 18:55:36 +03:00
|
|
|
if test "x$x_includes" != x; then
|
|
|
|
ac_cpp="$ac_cpp -I$x_includes"
|
2001-04-30 21:17:01 +04:00
|
|
|
fi
|
2001-08-02 22:08:36 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
dnl Check for OpenGL unless disabled...
|
|
|
|
GLLIB=
|
|
|
|
|
|
|
|
if test x$enable_gl != xno; then
|
2002-01-06 16:40:32 +03:00
|
|
|
AC_SEARCH_LIBS(dlopen, dl)
|
2001-11-17 18:55:36 +03:00
|
|
|
AC_CHECK_HEADER(GL/gl.h,
|
2016-09-30 23:51:45 +03:00
|
|
|
AC_CHECK_LIB(GL, glXMakeCurrent,
|
|
|
|
[AC_DEFINE(HAVE_GL)
|
|
|
|
GLLIB="-lGL"],
|
|
|
|
AC_CHECK_LIB(MesaGL, glXMakeCurrent,
|
|
|
|
[AC_DEFINE(HAVE_GL)
|
|
|
|
GLLIB="-lMesaGL"],,
|
|
|
|
[-lm]),
|
|
|
|
[-lm])
|
2007-02-05 06:20:30 +03:00
|
|
|
AC_CHECK_LIB(GL, glXGetProcAddressARB,
|
2016-09-30 23:51:45 +03:00
|
|
|
AC_DEFINE(HAVE_GLXGETPROCADDRESSARB),, [-lm])
|
2001-11-17 18:55:36 +03:00
|
|
|
)
|
|
|
|
AC_CHECK_HEADER(GL/glu.h,
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
2001-11-17 18:55:36 +03:00
|
|
|
if test x$ac_cv_lib_GL_glXMakeCurrent = xyes; then
|
|
|
|
GLLIB="-lGLU $GLLIB"
|
|
|
|
fi
|
|
|
|
if test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes; then
|
|
|
|
GLLIB="-lMesaGLU $GLLIB"
|
|
|
|
fi
|
|
|
|
)
|
|
|
|
|
2002-06-08 16:51:38 +04:00
|
|
|
if test x$ac_cv_lib_GL_glXMakeCurrent != xyes -a x$ac_cv_lib_MesaGL_glXMakeCurrent != xyes; then
|
2016-09-30 23:51:45 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2001-11-17 18:55:36 +03:00
|
|
|
fi
|
|
|
|
else
|
2001-08-02 22:08:36 +04:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
2001-08-02 22:15:44 +04:00
|
|
|
GLDEMOS=""
|
2001-11-17 18:55:36 +03:00
|
|
|
fi
|
2001-04-25 17:34:43 +04:00
|
|
|
|
2005-03-31 20:01:24 +04:00
|
|
|
dnl Check for Xinerama support unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xinerama, [ --enable-xinerama turn on Xinerama support [[default=yes]]])
|
2005-03-31 20:01:24 +04:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xinerama_found=no
|
2008-07-14 01:39:07 +04:00
|
|
|
if test x$enable_xinerama != xno; then
|
2016-09-30 23:51:45 +03:00
|
|
|
AC_CHECK_LIB(Xinerama, XineramaIsActive,
|
|
|
|
[AC_DEFINE(HAVE_XINERAMA)
|
|
|
|
LIBS="-lXinerama $LIBS"
|
|
|
|
xinerama_found=yes])
|
2005-03-31 20:01:24 +04:00
|
|
|
fi
|
|
|
|
|
2002-03-06 22:42:30 +03:00
|
|
|
dnl Check for the Xft library unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [[default=yes]]])
|
2002-03-06 22:42:30 +03:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xft_found=no
|
2008-07-14 01:39:07 +04:00
|
|
|
if test x$enable_xft != xno; then
|
2019-01-30 19:45:10 +03:00
|
|
|
# Try pkg-config first (freetype2 deprecated freetype-config from some version on)
|
|
|
|
AC_PATH_PROG(PKGCONFIG, pkg-config)
|
|
|
|
FT_FLAGS=""
|
|
|
|
if test "x$PKGCONFIG" != x; then
|
|
|
|
FT_FLAGS="`$PKGCONFIG --cflags xft`"
|
|
|
|
if test "x$FT_FLAGS" = x; then
|
|
|
|
FT_FLAGS="`$PKGCONFIG --cflags freetype2`"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# if that failed, try freetype-config
|
|
|
|
if test "x$FT_FLAGS" = x; then
|
|
|
|
AC_PATH_PROG(FTCONFIG, freetype-config)
|
|
|
|
if test "x$FTCONFIG" != x; then
|
|
|
|
FT_FLAGS="`$FTCONFIG --cflags`"
|
|
|
|
else
|
|
|
|
# abort if both methods failed
|
|
|
|
AC_MSG_NOTICE([please install pkg-config or use 'configure --disable-xft'.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CPPFLAGS="$FT_FLAGS $CPPFLAGS"
|
|
|
|
CXXFLAGS="$FT_FLAGS $CXXFLAGS"
|
|
|
|
CFLAGS="$FT_FLAGS $CFLAGS"
|
|
|
|
|
|
|
|
AC_CHECK_LIB(fontconfig, FcPatternCreate)
|
|
|
|
AC_CHECK_HEADER(X11/Xft/Xft.h,
|
2003-07-12 08:20:48 +04:00
|
|
|
AC_CHECK_LIB(Xft, XftDrawCreate,
|
2016-09-30 23:51:45 +03:00
|
|
|
[AC_DEFINE(USE_XFT)
|
|
|
|
LIBS="-lXft $LIBS"
|
|
|
|
xft_found=yes] ))
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Issue a warning message if Xft was not found, abort configure
|
|
|
|
dnl if Xft was requested explicitly (but not found)
|
|
|
|
if test x$enable_xft != xno -a x$xft_found != xyes; then
|
|
|
|
AC_MSG_WARN([could not find the required Xft headers and/or libraries.])
|
|
|
|
AC_MSG_NOTICE([please install Xft headers and libraries or use 'configure --disable-xft'.])
|
|
|
|
if test x$enable_xft = xyes; then
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
2003-07-12 08:20:48 +04:00
|
|
|
fi
|
2002-03-06 22:42:30 +03:00
|
|
|
fi
|
2002-03-06 21:11:01 +03:00
|
|
|
|
2002-04-10 20:26:33 +04:00
|
|
|
dnl Check for the Xdbe extension unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [[default=yes]]])
|
2002-04-10 20:26:33 +04:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xdbe_found=no
|
2008-07-14 01:39:07 +04:00
|
|
|
if test x$enable_xdbe != xno; then
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADER(
|
|
|
|
[X11/extensions/Xdbe.h],
|
|
|
|
[AC_CHECK_LIB(Xext, XdbeQueryExtension,
|
|
|
|
[AC_DEFINE(HAVE_XDBE)
|
2016-09-30 23:51:45 +03:00
|
|
|
LIBS="-lXext $LIBS"
|
|
|
|
xdbe_found=yes])],
|
2016-09-30 14:47:38 +03:00
|
|
|
[],
|
|
|
|
[#include <X11/Xlib.h>])
|
2002-04-10 20:26:33 +04:00
|
|
|
fi
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2013-09-11 16:54:40 +04:00
|
|
|
dnl Check for the Xfixes extension unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xfixes, [ --enable-xfixes turn on Xfixes support [[default=yes]]])
|
2013-09-11 16:54:40 +04:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xfixes_found=no
|
2013-09-11 16:54:40 +04:00
|
|
|
if test x$enable_xfixes != xno; then
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CHECK_HEADER(
|
|
|
|
[X11/extensions/Xfixes.h],
|
|
|
|
[AC_CHECK_LIB(Xfixes, XFixesQueryExtension,
|
|
|
|
[AC_DEFINE(HAVE_XFIXES)
|
2016-09-30 23:51:45 +03:00
|
|
|
LIBS="-lXfixes $LIBS"
|
|
|
|
xfixes_found=yes])],
|
2016-09-30 14:47:38 +03:00
|
|
|
[],
|
|
|
|
[#include <X11/Xlib.h>])
|
2013-09-11 16:54:40 +04:00
|
|
|
fi
|
|
|
|
|
2014-06-16 15:17:57 +04:00
|
|
|
dnl Check for the Xcursor library unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xcursor, [ --enable-xcursor turn on Xcursor support [[default=yes]]])
|
2014-06-16 15:17:57 +04:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xcursor_found=no
|
2014-06-16 15:17:57 +04:00
|
|
|
if test x$enable_xcursor != xno; then
|
2016-09-30 23:51:45 +03:00
|
|
|
AC_CHECK_HEADER(
|
|
|
|
[X11/Xcursor/Xcursor.h],
|
|
|
|
[AC_CHECK_LIB(Xcursor, XcursorImageCreate,
|
|
|
|
[AC_DEFINE(HAVE_XCURSOR)
|
|
|
|
LIBS="-lXcursor $LIBS"
|
|
|
|
xcursor_found=yes])],
|
|
|
|
[],
|
2016-09-30 15:36:55 +03:00
|
|
|
[#include <X11/Xlib.h>])
|
2014-06-16 15:17:57 +04:00
|
|
|
fi
|
|
|
|
|
2015-03-16 14:07:00 +03:00
|
|
|
dnl Check for the Xrender library unless disabled...
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_ARG_ENABLE(xrender, [ --enable-xrender turn on Xrender support [[default=yes]]])
|
2015-03-16 14:07:00 +03:00
|
|
|
|
2016-09-30 23:51:45 +03:00
|
|
|
xrender_found=no
|
2015-03-16 14:07:00 +03:00
|
|
|
if test x$enable_xrender != xno; then
|
2016-09-30 23:51:45 +03:00
|
|
|
AC_CHECK_HEADER(
|
|
|
|
[X11/extensions/Xrender.h],
|
|
|
|
[AC_CHECK_LIB(Xrender, XRenderQueryVersion,
|
|
|
|
[AC_DEFINE(HAVE_XRENDER)
|
|
|
|
LIBS="-lXrender $LIBS"
|
|
|
|
xrender_found=yes])],
|
|
|
|
[],
|
2016-09-30 15:36:55 +03:00
|
|
|
[#include <X11/Xlib.h>])
|
2015-03-16 14:07:00 +03:00
|
|
|
fi
|
|
|
|
|
2015-12-30 15:10:15 +03:00
|
|
|
dnl Check for the X11/Xregion.h header file...
|
|
|
|
AC_CHECK_HEADER(X11/Xregion.h, AC_DEFINE(HAVE_X11_XREGION_H),,
|
|
|
|
[#include <X11/Xlib.h>])
|
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
dnl Check for overlay visuals...
|
2006-05-30 18:04:00 +04:00
|
|
|
AC_PATH_PROG(XPROP, xprop)
|
2002-01-13 22:17:36 +03:00
|
|
|
AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay,
|
2006-05-30 18:04:00 +04:00
|
|
|
if test "x$XPROP" != x; then
|
|
|
|
if $XPROP -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
|
2016-09-30 15:36:55 +03:00
|
|
|
ac_cv_have_overlay=yes
|
2006-05-30 18:04:00 +04:00
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
ac_cv_have_overlay=no
|
2006-05-30 18:04:00 +04:00
|
|
|
fi
|
2001-11-17 18:55:36 +03:00
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
ac_cv_have_overlay=no
|
2001-11-17 18:55:36 +03:00
|
|
|
fi)
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2016-09-30 15:36:55 +03:00
|
|
|
if test x$ac_cv_have_overlay = xyes; then
|
2002-01-13 22:17:36 +03:00
|
|
|
AC_DEFINE(HAVE_OVERLAY)
|
|
|
|
fi
|
2003-09-14 18:28:22 +04:00
|
|
|
|
2009-04-13 21:30:19 +04:00
|
|
|
# Make symlinks since UNIX/Linux is case sensitive,
|
2011-02-06 17:46:40 +03:00
|
|
|
# but Cygwin in general not.
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
cygwin*)
|
2009-04-13 21:30:19 +04:00
|
|
|
HLINKS="#"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2010-12-30 18:05:53 +03:00
|
|
|
# Make symlinks since UNIX/Linux is case sensitive,
|
|
|
|
# but only if explicitly configured (default=no)
|
|
|
|
if test "x$with_links" != xyes; then
|
2003-09-14 18:28:22 +04:00
|
|
|
HLINKS="#"
|
|
|
|
fi
|
2006-01-15 06:16:09 +03:00
|
|
|
|
|
|
|
# Install/Uninstall FLUID application support files
|
|
|
|
INSTALL_DESKTOP="install-linux"
|
|
|
|
UNINSTALL_DESKTOP="uninstall-linux"
|
2002-01-13 22:17:36 +03:00
|
|
|
;;
|
2001-11-17 18:55:36 +03:00
|
|
|
esac
|
2000-04-26 18:14:41 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
AC_SUBST(GLDEMOS)
|
|
|
|
AC_SUBST(GLLIB)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(HLINKS)
|
2008-02-26 18:26:08 +03:00
|
|
|
AC_SUBST(OSX_ONLY)
|
2001-12-15 00:02:24 +03:00
|
|
|
AC_SUBST(THREADS)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2006-01-15 06:16:09 +03:00
|
|
|
AC_SUBST(INSTALL_DESKTOP)
|
|
|
|
AC_SUBST(UNINSTALL_DESKTOP)
|
|
|
|
|
2015-12-15 19:53:52 +03:00
|
|
|
AC_SUBST(USEMMFILES)
|
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Figure out the appropriate formatted man page extension...
|
2013-09-24 13:10:04 +04:00
|
|
|
case "$host_os" in
|
|
|
|
*bsd* | darwin*)
|
2001-02-12 18:12:14 +03:00
|
|
|
# *BSD
|
|
|
|
CAT1EXT=0
|
|
|
|
CAT3EXT=0
|
2006-01-15 21:36:16 +03:00
|
|
|
CAT6EXT=0
|
2001-02-12 18:12:14 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
irix*)
|
2001-02-12 18:12:14 +03:00
|
|
|
# SGI IRIX
|
|
|
|
CAT1EXT=z
|
|
|
|
CAT3EXT=z
|
2006-01-15 21:36:16 +03:00
|
|
|
CAT6EXT=z
|
2001-02-12 18:12:14 +03:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# All others
|
|
|
|
CAT1EXT=1
|
|
|
|
CAT3EXT=3
|
2006-08-29 20:45:48 +04:00
|
|
|
CAT6EXT=6
|
2001-02-12 18:12:14 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(CAT1EXT)
|
|
|
|
AC_SUBST(CAT3EXT)
|
2006-01-15 21:36:16 +03:00
|
|
|
AC_SUBST(CAT6EXT)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Fix "mandir" variable...
|
|
|
|
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then
|
2013-09-24 13:10:04 +04:00
|
|
|
case "$host_os" in
|
2016-09-30 15:36:55 +03:00
|
|
|
*bsd* | darwin* | linux*)
|
|
|
|
# *BSD, Darwin, and Linux
|
|
|
|
mandir="\${prefix}/share/man"
|
|
|
|
;;
|
|
|
|
irix*)
|
|
|
|
# SGI IRIX
|
|
|
|
mandir="\${prefix}/share/catman"
|
|
|
|
;;
|
2001-11-28 01:03:29 +03:00
|
|
|
esac
|
2001-02-12 18:12:14 +03:00
|
|
|
fi
|
|
|
|
|
2001-10-18 22:53:20 +04:00
|
|
|
dnl Fix "libdir" variable...
|
2001-10-19 00:47:10 +04:00
|
|
|
if test "$prefix" = NONE; then
|
2001-11-28 01:03:29 +03:00
|
|
|
prefix=/usr/local
|
2001-10-19 00:47:10 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$exec_prefix" = NONE; then
|
2001-12-30 07:45:34 +03:00
|
|
|
exec_prefix="\${prefix}"
|
2001-10-19 00:47:10 +04:00
|
|
|
fi
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
irix[1-5]*)
|
2016-09-30 15:36:55 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
irix*)
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
|
|
|
|
libdir="/usr/lib32"
|
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
2001-10-18 22:53:20 +04:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define the command used to update the dependencies (this option
|
|
|
|
dnl mainly for FLTK core developers - not necessary for users)
|
|
|
|
MAKEDEPEND="\$(CXX) -M"
|
|
|
|
AC_SUBST(MAKEDEPEND)
|
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Add warnings to compiler switches:
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl do this last so messing with switches does not break tests
|
2001-02-12 18:12:14 +03:00
|
|
|
|
2002-06-24 06:04:54 +04:00
|
|
|
if test -n "$GCC"; then
|
2004-07-29 22:13:11 +04:00
|
|
|
# Show all standard warnings + unused variables, conversion errors,
|
|
|
|
# and inlining problems when compiling...
|
2005-04-15 18:21:59 +04:00
|
|
|
OPTIM="-Wall -Wunused -Wno-format-y2k $OPTIM"
|
2002-08-10 02:57:00 +04:00
|
|
|
|
|
|
|
# The following additional warnings are useful for tracking down problems...
|
2007-05-20 20:18:31 +04:00
|
|
|
#OPTIM="-Wshadow -Wconversion $OPTIM"
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2007-05-20 20:32:37 +04:00
|
|
|
# We know that Carbon is deprecated on OS X 10.4. To avoid hundreds of warnings
|
|
|
|
# we will temporarily disable 'deprecated' warnings on OS X.
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
2016-09-30 15:36:55 +03:00
|
|
|
darwin[1-7])
|
|
|
|
;;
|
|
|
|
darwin*)
|
|
|
|
OPTIM="-Wno-deprecated-declarations $OPTIM"
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
2007-05-20 20:32:37 +04:00
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
# Set the default compiler optimizations...
|
1999-02-01 22:40:25 +03:00
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
#
|
2001-04-25 17:34:43 +04:00
|
|
|
# Note: Can't use -fomit-frame-pointer - prevents tools like
|
2000-10-22 00:01:56 +04:00
|
|
|
# libsafe from working!
|
2016-09-30 15:36:55 +03:00
|
|
|
#
|
2001-04-25 17:34:43 +04:00
|
|
|
# Don't use -fforce-mem, -fforce-addr, or -fcaller-saves.
|
|
|
|
# They all seem to make either no difference or enlarge
|
|
|
|
# the code by a few hundred bytes.
|
2016-09-30 15:36:55 +03:00
|
|
|
#
|
2005-11-25 23:40:16 +03:00
|
|
|
# "-Os" seems to be the best compromise between speed and
|
2001-11-28 01:03:29 +03:00
|
|
|
# code size. "-O3" and higher seem to make no effective
|
2002-01-12 00:42:05 +03:00
|
|
|
# difference in the speed of the code, but does bloat the
|
2001-11-28 01:03:29 +03:00
|
|
|
# library 10+%.
|
|
|
|
#
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-Os $OPTIM"
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
|
|
|
|
# Generate position-independent code when needed...
|
1999-03-04 17:48:08 +03:00
|
|
|
if test $PICFLAG = 1; then
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="$OPTIM -fPIC"
|
1999-03-04 17:48:08 +03:00
|
|
|
fi
|
2000-04-26 16:55:29 +04:00
|
|
|
|
2000-04-26 02:17:00 +04:00
|
|
|
# See if GCC supports -fno-exceptions...
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if GCC supports -fno-exceptions])
|
2000-04-26 02:17:00 +04:00
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fno-exceptions"
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
2016-09-30 14:47:38 +03:00
|
|
|
[OPTIM="$OPTIM -fno-exceptions"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
2001-11-01 17:54:06 +03:00
|
|
|
CFLAGS="$OLDCFLAGS"
|
2000-04-26 16:55:29 +04:00
|
|
|
|
2006-11-01 00:28:11 +03:00
|
|
|
# See if GCC supports -fno-strict-aliasing...
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if GCC supports -fno-strict-aliasing])
|
2006-11-01 00:28:11 +03:00
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[OPTIM="$OPTIM -fno-strict-aliasing"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
2006-11-01 00:28:11 +03:00
|
|
|
CFLAGS="$OLDCFLAGS"
|
|
|
|
|
2015-02-17 15:47:07 +03:00
|
|
|
dnl Make sure that shared libraries don't have undefined references
|
|
|
|
# See if ld supports -no-undefined...
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if ld supports -no-undefined])
|
2015-02-17 15:47:07 +03:00
|
|
|
OLDLDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-no-undefined"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[DSOFLAGS="$DSOFLAGS -Wl,-no-undefined"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
2015-02-17 15:47:07 +03:00
|
|
|
LDFLAGS="$OLDLDFLAGS"
|
|
|
|
|
2014-08-21 16:08:02 +04:00
|
|
|
# See if ld supports -Bsymbolic-functions...
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if ld supports -Bsymbolic-functions])
|
2014-08-21 16:08:02 +04:00
|
|
|
OLDLDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[DSOFLAGS="$DSOFLAGS -Wl,-Bsymbolic-functions"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
2014-08-21 16:08:02 +04:00
|
|
|
LDFLAGS="$OLDLDFLAGS"
|
|
|
|
|
|
|
|
# See if toolchain supports a sectioned build...
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if toolchain supports sections])
|
2014-08-21 16:08:02 +04:00
|
|
|
OLDLDFLAGS="$LDFLAGS"
|
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-gc-sections"
|
|
|
|
CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[DSOFLAGS="$DSOFLAGS -Wl,-gc-sections"
|
|
|
|
OPTIM="$OPTIM -ffunction-sections -fdata-sections"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
2014-08-21 16:08:02 +04:00
|
|
|
LDFLAGS="$OLDLDFLAGS"
|
|
|
|
CFLAGS="$OLDCFLAGS"
|
|
|
|
|
2000-04-26 16:55:29 +04:00
|
|
|
# See if we are running Solaris; if so, try the -fpermissive option...
|
2002-01-13 22:17:36 +03:00
|
|
|
# This option is required on some versions of Solaris to work around
|
|
|
|
# bugs in the X headers up through Solaris 7.
|
|
|
|
#
|
|
|
|
# Unlike the other compiler/optimization settings, this one is placed
|
|
|
|
# in CFLAGS and CXXFLAGS so that fltk-config will provide the option
|
|
|
|
# to clients - otherwise client apps will not compile properly...
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
2016-09-30 15:36:55 +03:00
|
|
|
solaris*)
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_CHECKING([if GCC supports -fpermissive])
|
2013-09-24 13:10:04 +04:00
|
|
|
|
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fpermissive"
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[CXXFLAGS="$CXXFLAGS -fpermissive"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[CFLAGS="$OLDCFLAGS"
|
|
|
|
AC_MSG_RESULT(no)])
|
2013-09-24 13:10:04 +04:00
|
|
|
;;
|
|
|
|
esac
|
1998-11-05 19:04:53 +03:00
|
|
|
else
|
2013-09-24 13:10:04 +04:00
|
|
|
case "$host_os" in
|
2016-09-30 15:36:55 +03:00
|
|
|
irix*)
|
1999-02-01 22:40:25 +03:00
|
|
|
# Running some flavor of IRIX; see which version and
|
|
|
|
# set things up according...
|
1999-02-22 23:53:35 +03:00
|
|
|
if test "$uversion" -ge 62; then
|
2016-09-30 15:36:55 +03:00
|
|
|
# We are running IRIX 6.2 or higher; uncomment the following
|
1999-02-01 22:40:25 +03:00
|
|
|
# lines if you don't have IDO 7.2 or higher:
|
|
|
|
#
|
2001-04-25 17:34:43 +04:00
|
|
|
# CXX="CC -n32 -mips3"
|
|
|
|
# CC="cc -n32 -mips3"
|
|
|
|
# LD="ld -n32 -mips3"
|
1999-02-01 22:40:25 +03:00
|
|
|
# MAKEDEPEND="CC -M"
|
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
if test "x`grep abi=n32 /etc/compiler.defaults`" = x; then
|
2016-08-01 15:22:05 +03:00
|
|
|
AC_MSG_WARN([FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI "-n32 -mips3"])
|
2001-04-25 17:34:43 +04:00
|
|
|
fi
|
|
|
|
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-fullwarn $OPTIM"
|
1999-02-18 16:42:08 +03:00
|
|
|
fi
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-O2 $OPTIM"
|
2002-06-08 00:15:17 +04:00
|
|
|
if test $uversion -gt 62; then
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-OPT:Olimit=4000 $OPTIM"
|
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
hpux*)
|
1999-02-01 22:40:25 +03:00
|
|
|
# Running HP-UX; these options should work for the HP compilers.
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="+O2 $OPTIM"
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2002-04-26 16:39:32 +04:00
|
|
|
if test $PICFLAG = 1; then
|
|
|
|
OPTIM="+z $OPTIM"
|
|
|
|
fi
|
|
|
|
|
2006-08-02 22:03:10 +04:00
|
|
|
CXXFLAGS="$CXXFLAGS +W336,501,736,740,749,829"
|
1999-02-01 22:40:25 +03:00
|
|
|
;;
|
2002-11-14 16:57:40 +03:00
|
|
|
OSF1*)
|
|
|
|
# Running Digital/Tru64 UNIX; these options should work for the
|
|
|
|
# Digital/Compaq/NewHP compilers.
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-11-14 16:57:40 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-O2 $OPTIM"
|
2002-11-14 16:57:40 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
solaris*)
|
1999-05-19 23:07:15 +04:00
|
|
|
# Solaris
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-xO3 $OPTIM"
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
1999-05-19 23:07:15 +04:00
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
|
1999-05-19 23:07:15 +04:00
|
|
|
if test $PICFLAG = 1; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="-KPIC $OPTIM"
|
1999-05-19 23:07:15 +04:00
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
aix*)
|
2001-04-13 23:13:14 +04:00
|
|
|
if test -z "$DEBUGFLAG"; then
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_optim" != x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2016-09-30 15:36:55 +03:00
|
|
|
OPTIM="-O2 $OPTIM"
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
2001-04-13 23:13:14 +04:00
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_WARN([The AIX C and C++ compilers are known not to correctly compile the FLTK library.])
|
2001-04-13 23:13:14 +04:00
|
|
|
;;
|
1999-02-01 22:40:25 +03:00
|
|
|
*)
|
|
|
|
# Running some other operating system; inform the user they
|
2010-04-28 07:15:47 +04:00
|
|
|
# should contribute the necessary options via the STR form..
|
2016-08-01 11:28:50 +03:00
|
|
|
AC_MSG_WARN([Building FLTK with default compiler optimizations])
|
|
|
|
AC_MSG_WARN([Send the FLTK developers your uname and compiler options via http://www.fltk.org/str.php])
|
1999-02-01 22:40:25 +03:00
|
|
|
;;
|
|
|
|
esac
|
1998-11-05 19:04:53 +03:00
|
|
|
fi
|
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$DEBUGFLAG $OPTIM"
|
1999-01-31 10:43:16 +03:00
|
|
|
|
2011-02-24 13:27:33 +03:00
|
|
|
dnl Take archflags away from CFLAGS (makefiles use ARCHFLAGS explicitly)
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
darwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
if test "x$with_archflags" != x ; then
|
|
|
|
CFLAGS="`echo $CFLAGS | sed -e "s/$with_archflags//g"`"
|
|
|
|
fi
|
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
esac
|
2011-02-24 13:27:33 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define the FLTK documentation directory...
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
mingw*)
|
2011-02-26 01:19:09 +03:00
|
|
|
# Determine the path where MSys has /usr installed
|
2016-09-30 15:36:55 +03:00
|
|
|
msyspath=`mount | grep '\/usr ' | cut -d ' ' -f -1 | sed -e 's/\\\/\// g'`
|
2011-02-26 01:19:09 +03:00
|
|
|
# Then substitute that in the WIN32 path instead of /usr
|
2016-09-30 15:36:55 +03:00
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "$msyspath/local/share/doc/fltk")
|
2011-02-26 01:19:09 +03:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test x$prefix = xNONE; then
|
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "/usr/local/share/doc/fltk")
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "$prefix/share/doc/fltk")
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2001-08-11 20:09:26 +04:00
|
|
|
|
2002-04-28 20:41:17 +04:00
|
|
|
dnl Define the FLTK data directory...
|
|
|
|
if test x$prefix = xNONE; then
|
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DATADIR, "/usr/local/share/fltk")
|
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DATADIR, "$prefix/share/fltk")
|
|
|
|
fi
|
|
|
|
|
2007-11-21 00:52:54 +03:00
|
|
|
dnl Summarize results of configure tests...
|
|
|
|
echo ""
|
|
|
|
echo "Configuration Summary"
|
|
|
|
echo "-------------------------------------------------------------------------"
|
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os_gui in
|
|
|
|
cygwin* | mingw*)
|
2016-09-30 15:36:55 +03:00
|
|
|
graphics="GDI"
|
2007-11-21 00:52:54 +03:00
|
|
|
;;
|
2013-09-24 13:10:04 +04:00
|
|
|
darwin*)
|
2016-09-30 15:36:55 +03:00
|
|
|
graphics="Quartz"
|
|
|
|
;;
|
2007-11-21 00:52:54 +03:00
|
|
|
*)
|
2016-09-30 15:36:55 +03:00
|
|
|
graphics="X11"
|
2016-09-30 23:51:45 +03:00
|
|
|
if test x$xft_found = xyes; then
|
|
|
|
graphics="$graphics + Xft"
|
2007-11-21 00:52:54 +03:00
|
|
|
fi
|
2016-09-30 23:51:45 +03:00
|
|
|
if test x$xdbe_found = xyes; then
|
|
|
|
graphics="$graphics + Xdbe"
|
2007-11-21 00:52:54 +03:00
|
|
|
fi
|
2016-09-30 23:51:45 +03:00
|
|
|
if test x$xfixes_found = xyes; then
|
|
|
|
graphics="$graphics + Xfixes"
|
|
|
|
fi
|
|
|
|
if test x$xinerama_found = xyes; then
|
|
|
|
graphics="$graphics + Xinerama"
|
|
|
|
fi
|
|
|
|
if test x$xcursor_found = xyes; then
|
|
|
|
graphics="$graphics + Xcursor"
|
|
|
|
fi
|
|
|
|
if test x$xrender_found = xyes; then
|
|
|
|
graphics="$graphics + Xrender"
|
2007-11-21 00:52:54 +03:00
|
|
|
fi
|
2016-09-30 15:36:55 +03:00
|
|
|
;;
|
2007-11-21 00:52:54 +03:00
|
|
|
esac
|
|
|
|
|
|
|
|
echo " Directories: prefix=$prefix"
|
|
|
|
echo " bindir=$bindir"
|
|
|
|
echo " datadir=$datadir"
|
|
|
|
echo " datarootdir=$datarootdir"
|
|
|
|
echo " exec_prefix=$exec_prefix"
|
|
|
|
echo " includedir=$includedir"
|
|
|
|
echo " libdir=$libdir"
|
|
|
|
echo " mandir=$mandir"
|
2013-09-24 13:10:04 +04:00
|
|
|
case $host_os in
|
|
|
|
mingw*)
|
2011-02-26 01:19:09 +03:00
|
|
|
echo " MSys docpath=$msyspath/local/share/doc/fltk"
|
|
|
|
;;
|
|
|
|
esac
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Graphics: $graphics"
|
|
|
|
|
|
|
|
if test x$JPEG = x; then
|
|
|
|
echo "Image Libraries: JPEG=System"
|
|
|
|
else
|
|
|
|
echo "Image Libraries: JPEG=Builtin"
|
|
|
|
fi
|
|
|
|
if test x$PNG = x; then
|
|
|
|
echo " PNG=System"
|
|
|
|
else
|
|
|
|
echo " PNG=Builtin"
|
|
|
|
fi
|
|
|
|
if test x$ZLIB = x; then
|
|
|
|
echo " ZLIB=System"
|
|
|
|
else
|
|
|
|
echo " ZLIB=Builtin"
|
|
|
|
fi
|
2008-09-25 22:26:33 +04:00
|
|
|
if test x$enable_cairo = xyes; then
|
Cairo increment 2: Finer cairo granularity, less deps, new fltk_cairo lib
+ added new USE_CAIRO config preprocessor def.
to differentiate from HAVE_CAIRO so that we can use the cairo lib
without forcing the full fltk lib to be linked against it.
In that case, cairo autolink context functionality which needs fltk lib
instrumentation is disabled.
+ added new --enable-cairoext, which correspond to previous --enable-cairo.
now, --enable-cairo only adds HAVE_CAIRO def. and keeps fltk lib
from referencing cairo.
In both cases (--enable-cairo & --enable-cairoext), a new fltk_cairo lib is
created. This lib, similarly to local versions of png,jpeg and zlib,
is not generated if cairo is not enabled.
+ added cairo to fltk-config : now new --use-cairo flag is available
+ modified all unix like makefiles to now generate minimum cairo deps and also
new libfltk_cairo lib.
+ added new cairo subdir to permit conditional fltk_cairo lib generation.
+ vc2005 project minimum update to compile without be broken, but still needs
to create a similar fltk_cairo independent lib. For now, it works as before
with a dedicated cairo env. similar to --enable-cairoext context in unix.
+ regression tested ok with cairo disabled on win32, mac osx, mingw.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-19 05:42:35 +04:00
|
|
|
echo " CAIRO=lib"
|
|
|
|
fi
|
|
|
|
if test x$enable_cairoext = xyes; then
|
|
|
|
echo " CAIRO=internal_use"
|
2008-09-25 22:26:33 +04:00
|
|
|
fi
|
|
|
|
|
2008-07-14 01:39:07 +04:00
|
|
|
if test x$enable_largefile != xno; then
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Large Files: YES"
|
|
|
|
else
|
|
|
|
echo " Large Files: NO"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$GLDEMOS = x; then
|
|
|
|
echo " OpenGL: NO"
|
|
|
|
else
|
|
|
|
echo " OpenGL: YES"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$THREADS = x; then
|
|
|
|
echo " Threads: NO"
|
|
|
|
else
|
|
|
|
echo " Threads: YES"
|
|
|
|
fi
|
|
|
|
|
2015-07-13 01:32:30 +03:00
|
|
|
dnl Set empty BINARY_DIR variable for fltk-config.in (CMake compatibility)
|
|
|
|
BINARY_DIR=
|
|
|
|
AC_SUBST(BINARY_DIR)
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Write all of the files...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_CONFIG_HEADER(config.h:configh.in)
|
2015-07-12 22:23:55 +03:00
|
|
|
AC_CONFIG_HEADER(FL/abi-version.h:abi-version.in)
|
2016-09-30 14:47:38 +03:00
|
|
|
AC_CONFIG_FILES([makeinclude fltk.list fltk-config fltk.spec FL/Makefile])
|
|
|
|
AC_OUTPUT
|
2001-09-29 19:57:32 +04:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Make sure the fltk-config script is executable...
|
2001-09-29 19:57:32 +04:00
|
|
|
chmod +x fltk-config
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
2005-02-25 00:55:12 +03:00
|
|
|
dnl End of "$Id$".
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|