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
|
2023-02-02 20:48:13 +03:00
|
|
|
dnl Copyright 1998-2023 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
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl https://www.fltk.org/COPYING.php
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
2020-07-01 19:03:10 +03:00
|
|
|
dnl Please see the following page on how to report bugs and issues:
|
2005-04-16 04:13:17 +04:00
|
|
|
dnl
|
2020-07-01 19:03:10 +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:49 +03:00
|
|
|
AC_PREREQ([2.50])
|
2001-11-30 00:50:05 +03:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
|
|
|
|
dnl Package name and version
|
|
|
|
AC_INIT([fltk], [1.4.0], [https://github.com/fltk/fltk/issues], [fltk], [https://www.fltk.org/])
|
|
|
|
|
|
|
|
FLTK_VERSION="AC_PACKAGE_VERSION"
|
|
|
|
FLTK_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | awk -F. '{print $1}')
|
|
|
|
FLTK_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | awk -F. '{print $2}')
|
|
|
|
FLTK_VERSION_PATCH=$(echo AC_PACKAGE_VERSION | awk -F. '{print $3}')
|
|
|
|
|
|
|
|
FL_DSO_VERSION="${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}"
|
|
|
|
FL_ABI_VERSION="${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}.0"
|
|
|
|
|
|
|
|
AC_SUBST(FLTK_VERSION)
|
|
|
|
AC_SUBST(FLTK_VERSION_MAJOR)
|
|
|
|
AC_SUBST(FLTK_VERSION_MINOR)
|
|
|
|
AC_SUBST(FLTK_VERSION_PATCH)
|
|
|
|
AC_SUBST(FL_DSO_VERSION)
|
|
|
|
AC_SUBST(FL_ABI_VERSION)
|
|
|
|
|
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
dnl Required file in package...
|
2016-10-01 00:44:04 +03:00
|
|
|
AC_CONFIG_SRCDIR([src/Fl.cxx])
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
|
2013-09-24 13:10:04 +04:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl determine whether we're cross-compiling
|
2021-02-07 04:05:50 +03:00
|
|
|
AS_IF([test "$host" != "$build"], [
|
|
|
|
fltk_cross_compiling="yes"
|
|
|
|
], [
|
|
|
|
fltk_cross_compiling="no"
|
|
|
|
])
|
|
|
|
|
2020-06-10 17:24:39 +03:00
|
|
|
|
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..."
|
|
|
|
CFLAGS="${CFLAGS:=}"
|
|
|
|
CPPFLAGS="${CPPFLAGS:=}"
|
|
|
|
CXXFLAGS="${CXXFLAGS:=}"
|
|
|
|
DSOFLAGS="${DSOFLAGS:=}"
|
|
|
|
LDFLAGS="${LDFLAGS:=}"
|
2021-02-17 13:27:28 +03:00
|
|
|
LIBS="${LDFLAGS:=}"
|
2021-02-07 04:05:50 +03:00
|
|
|
|
2014-10-28 21:12:47 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
dnl Find common commands...
|
2014-09-29 00:48:00 +04:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
2021-02-14 02:02:17 +03:00
|
|
|
AC_PATH_TOOL(PKGCONFIG, pkg-config)
|
2014-09-29 00:48:00 +04:00
|
|
|
|
2010-11-18 16:23:52 +03:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
dnl Architecture and optimization options...
|
|
|
|
ARCHFLAGS="${ARCHFLAGS:=}"
|
2021-07-17 18:24:26 +03:00
|
|
|
AC_ARG_WITH([archflags], AS_HELP_STRING([--with-archflags="flags"], [use custom architecture flags (default=none, macOS values include "-arch arm64", "-arch i386", "-arch ppc", and "-arch x86_64")]), [
|
2021-02-07 04:05:50 +03:00
|
|
|
ARCHFLAGS="$withval"
|
|
|
|
])
|
|
|
|
AC_SUBST(ARCHFLAGS)
|
2001-11-28 01:03:29 +03:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
OPTIM="${OPTIM:=}"
|
|
|
|
AC_ARG_WITH(optim, AS_HELP_STRING([--with-optim="flags"], [use custom optimization flags]), [
|
|
|
|
OPTIM="$withval"
|
|
|
|
])
|
|
|
|
AC_SUBST(OPTIM)
|
2020-06-13 16:19:27 +03:00
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
dnl Other options
|
2022-03-15 08:42:06 +03:00
|
|
|
AC_ARG_ENABLE([cairo], AS_HELP_STRING([--enable-cairo], [add support for Fl_Cairo_Window]))
|
2021-12-19 00:42:30 +03:00
|
|
|
AC_ARG_ENABLE([cairoext], AS_HELP_STRING([--enable-cairoext], [use FLTK code instrumentation for cairo extended use]))
|
2021-02-07 04:05:50 +03:00
|
|
|
|
|
|
|
AC_ARG_ENABLE([cp936], AS_HELP_STRING([--enable-cp936], [turn on CP936]))
|
|
|
|
AS_IF([test x$enable_cp936 = xyes], [
|
|
|
|
CFLAGS="$CFLAGS -DCP936"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([cygwin], AS_HELP_STRING([--enable-cygwin], [use the Cygwin libraries (default=no)]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [turn on debugging]))
|
|
|
|
AS_IF([test x$enable_debug = xyes], [
|
|
|
|
DEBUGFLAG="-g "
|
|
|
|
], [
|
|
|
|
DEBUGFLAG=""
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([gl], AS_HELP_STRING([--disable-gl], [turn off OpenGL support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([localjpeg], AS_HELP_STRING([--enable-localjpeg], [use local JPEG library (default=auto)]))
|
2021-03-07 17:29:14 +03:00
|
|
|
AC_ARG_ENABLE([localpng], AS_HELP_STRING([--enable-localpng], [use local PNG library (default=auto)]))
|
2021-02-07 04:05:50 +03:00
|
|
|
AC_ARG_ENABLE([localzlib], AS_HELP_STRING([--enable-localzlib], [use local ZLIB library (default=auto)]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([pango], AS_HELP_STRING([--enable-pango], [turn on Pango support]))
|
|
|
|
|
2022-11-18 11:10:22 +03:00
|
|
|
AC_ARG_ENABLE([wayland], AS_HELP_STRING([--disable-wayland], [turn off hybrid Wayland/X11 support]))
|
2022-03-04 17:40:29 +03:00
|
|
|
|
2022-03-15 08:42:06 +03:00
|
|
|
AC_ARG_ENABLE([usecairo], AS_HELP_STRING([--enable-usecairo], [all drawing to X11 windows uses Cairo]))
|
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
AC_ARG_ENABLE([print], AS_HELP_STRING([--disable-print], [turn off print support (X11)]))
|
|
|
|
AS_IF([test x$enable_print = xno], [
|
|
|
|
AC_DEFINE([FL_NO_PRINT_SUPPORT], [Disable X11 print support?])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([shared], AS_HELP_STRING([--enable-shared], [turn on shared libraries]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([svg], AS_HELP_STRING([--disable-svg], [disable SVG support]))
|
|
|
|
AS_IF([test x$enable_svg != xno], [
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_DEFINE([FLTK_USE_SVG], 1, [SVG image support])
|
2021-02-07 04:05:50 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([threads], AS_HELP_STRING([--disable-threads], [turn off multi-threading support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([x11], AS_HELP_STRING([--enable-x11], [use X11 with Cygwin or macOS (default=no)]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xcursor], AS_HELP_STRING([--disable-xcursor], [turn off Xcursor support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xfixes], AS_HELP_STRING([--disable-xfixes], [turn off Xfixes support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [turn off Xft support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xinerama], AS_HELP_STRING([--disable-xinerama], [turn off Xinerama support]))
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [turn off Xrender support]))
|
|
|
|
|
2021-02-26 20:00:07 +03:00
|
|
|
AS_CASE([$host_os], [cygwin* | mingw*], [
|
|
|
|
AC_ARG_ENABLE([gdiplus], AS_HELP_STRING([--disable-gdiplus], [don't use GDI+ for antialiased graphics]))
|
|
|
|
|
|
|
|
gdiplus_found=no
|
|
|
|
AS_IF([test x$enable_gdiplus != xno], [
|
|
|
|
AC_CHECK_HEADERS([wtypes.h gdiplus.h], [
|
|
|
|
AC_DEFINE([USE_GDIPLUS])
|
|
|
|
LIBS="-lgdiplus $LIBS"
|
|
|
|
gdiplus_found=yes
|
|
|
|
], [],
|
|
|
|
[[#include <wtypes.h>]])
|
|
|
|
])
|
|
|
|
|
|
|
|
])
|
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
AS_IF([test x$enable_pango = xyes -a x$enable_xft = xno], [
|
|
|
|
AC_MSG_ERROR([--disable-xft and --enable-pango are incompatible because Xft is necessary for Pango.])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
dnl So --with-archflags option is used during "checking size of long"
|
|
|
|
# TODO: Fix long long test
|
|
|
|
AS_IF([test "x$with_archflags" != x], [
|
|
|
|
CFLAGS="$CFLAGS $with_archflags"
|
|
|
|
])
|
|
|
|
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2016-01-29 02:57:50 +03:00
|
|
|
dnl FLTK build options to be used in Makefiles (defined in makeinclude)
|
2016-08-12 19:59:06 +03:00
|
|
|
BUILD=""
|
2016-01-29 02:57:50 +03:00
|
|
|
|
2021-02-07 04:05:50 +03:00
|
|
|
|
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
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_CASE([$host_os], [cygwin*], [
|
2021-02-07 04:05:50 +03:00
|
|
|
# Handle Cygwin option *first*, before all other tests.
|
|
|
|
AS_IF([test x$enable_cygwin = xyes], [
|
|
|
|
# we target Cygwin in combination with X11
|
2021-02-16 16:21:13 +03:00
|
|
|
AS_IF([test x$enable_x11 = xyes], [
|
|
|
|
host_os_gui="X11$host_os"
|
|
|
|
])
|
2021-02-07 04:05:50 +03:00
|
|
|
])
|
|
|
|
], [darwin*], [
|
|
|
|
AS_IF([test x$enable_x11 = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
host_os_gui="X11"
|
|
|
|
macosversion=$(sw_vers -productVersion | cut -d. -f2)
|
|
|
|
macosversion_maj=$(sw_vers -productVersion | cut -d. -f1)
|
|
|
|
AS_IF([test $macosversion_maj -ge 11 -o $macosversion -ge 13], [
|
|
|
|
CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.9 -D_LIBCPP_HAS_THREAD_API_PTHREAD"
|
|
|
|
])
|
2021-02-07 04:05:50 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2001-11-22 16:56:10 +03:00
|
|
|
|
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"
|
|
|
|
|
2018-01-15 10:09:52 +03:00
|
|
|
|
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
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test x$enable_cairoext = xyes], [
|
|
|
|
AS_IF([$PKGCONFIG --exists cairo], [
|
2021-12-19 00:42:30 +03:00
|
|
|
AC_DEFINE([FLTK_HAVE_CAIROEXT])
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([FLTK_HAVE_CAIRO])
|
|
|
|
CAIRODIR="cairo"
|
|
|
|
CAIROFLAGS="$($PKGCONFIG --cflags cairo)"
|
2021-02-28 16:56:19 +03:00
|
|
|
CAIROLIBS="$($PKGCONFIG --libs cairo)"
|
2021-02-16 16:21:13 +03:00
|
|
|
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
|
|
|
|
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
|
|
|
|
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
|
|
|
|
LIBS="$CAIROLIBS $LIBS"
|
|
|
|
LINKFLTK="$LINKFLTK $LINKFLTKCAIRO"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [
|
|
|
|
AC_MSG_ERROR([Cairo requested but not available.])
|
|
|
|
])
|
|
|
|
], [test x$enable_cairo = xyes], [
|
|
|
|
AS_IF([$PKGCONFIG --exists cairo], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE(FLTK_HAVE_CAIRO)
|
|
|
|
CAIRODIR="cairo"
|
|
|
|
CAIROFLAGS="$($PKGCONFIG --cflags cairo)"
|
2021-02-28 16:56:19 +03:00
|
|
|
CAIROLIBS="$($PKGCONFIG --libs cairo)"
|
2021-02-16 16:21:13 +03:00
|
|
|
CXXFLAGS="$CAIROFLAGS $CXXFLAGS"
|
|
|
|
LINKFLTKCAIRO="../lib/libfltk_cairo.a"
|
|
|
|
FLTKCAIROOPTION="-L ../cairo -lfltk_cairo$SHAREDSUFFIX"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [
|
|
|
|
AC_MSG_ERROR([Cairo requested but not available.])
|
|
|
|
])
|
|
|
|
])
|
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)
|
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AC_ARG_WITH([abiversion], AS_HELP_STRING([--with-abiversion], [Build with FL_ABI_VERSION, e.g. 10304 for FLTK 1.3.4]))
|
2015-07-12 22:23:55 +03:00
|
|
|
has_abiversion="$with_abiversion"
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test "x$has_abiversion" = xyes -o "x$has_abiversion" = xno], [
|
|
|
|
has_abiversion=""
|
|
|
|
])
|
|
|
|
AS_IF([test "x$has_abiversion" != x], [
|
|
|
|
AC_DEFINE_UNQUOTED([FL_ABI_VERSION], [$has_abiversion], [ABI version number])
|
|
|
|
])
|
2015-07-12 22:23:55 +03:00
|
|
|
|
2009-01-28 01:34:46 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
dnl Handle compile-time options...
|
|
|
|
AS_IF([test "x$enable_shared" = xyes], [
|
2002-01-12 00:42:05 +03:00
|
|
|
PICFLAG=1
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX=""
|
|
|
|
FLUID="fluid-shared"
|
2023-01-21 19:14:41 +03:00
|
|
|
FLTK_OPTIONS="fltk-options-shared"
|
2002-07-14 21:03:31 +04:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_CASE([$host_os], [darwin*], [
|
2021-02-16 16:21:13 +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"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(ARCHFLAGS) \$(DSOFLAGS) -dynamiclib -lc -o"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [solaris*], [
|
2021-02-16 16:21:13 +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"
|
2023-01-17 00:54:53 +03:00
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
|
2021-02-16 16:21:13 +03:00
|
|
|
AS_IF([test "x$libdir" != "x/usr/lib"], [
|
|
|
|
DSOLINK="-R$libdir"
|
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [hpux*], [
|
2021-02-16 16:21:13 +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"
|
|
|
|
DSOCOMMAND="ld \$(DSOFLAGS) -b -z +h \$@ $DEBUGFLAG -o"
|
|
|
|
AS_IF([test "x$libdir" != "x/usr/lib"], [
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [irix*], [
|
2021-02-16 16:21:13 +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"
|
|
|
|
AS_IF([test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"], [
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [osf*], [
|
2021-02-16 16:21:13 +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"
|
|
|
|
AS_IF([test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32"], [
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [linux*|*bsd*], [
|
2021-02-16 16:21:13 +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"
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[ac_cv_cxx_fvisibility=yes],
|
|
|
|
[ac_cv_cxx_fvisibility=no])
|
|
|
|
CXXFLAGS="$OLDCXXFLAGS"
|
|
|
|
AC_LANG_POP([])
|
|
|
|
])
|
|
|
|
AS_IF([test x"$ac_cv_cxx_fvisibility" = xyes], [
|
|
|
|
OPTIM="$OPTIM -fvisibility=hidden"
|
|
|
|
])
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[ac_cv_cxx_fvisibility_inlines=yes],
|
|
|
|
[ac_cv_cxx_fvisibility_inlines=no])
|
|
|
|
CXXFLAGS="$OLDCXXFLAGS"
|
|
|
|
AC_LANG_POP([])
|
|
|
|
])
|
|
|
|
AS_IF([test x"$ac_cv_cxx_fvisibility_inlines" = xyes], [
|
|
|
|
CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib64"], [
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [aix*], [
|
2021-02-16 16:21:13 +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"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [cygwin* | mingw*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
PICFLAG=0
|
|
|
|
AS_IF([test x$enable_cygwin != xyes], [
|
|
|
|
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"
|
|
|
|
], [test x$enable_x11 = xyes], [
|
|
|
|
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"
|
|
|
|
], [
|
|
|
|
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"
|
|
|
|
])
|
|
|
|
|
|
|
|
#-----------------------------------------------------------
|
|
|
|
# -Wl,--enable-runtime-pseudo-reloc: See str 1585
|
|
|
|
# appears to be necessary for older binutils versions < 2.16
|
|
|
|
#-----------------------------------------------------------
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc"
|
|
|
|
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -shared -Wl,--whole-archive -Wl,--export-all-symbols -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-import -Wl,--enable-auto-image-base -o \$@"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [*], [
|
2021-02-16 16:21:13 +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"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
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"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [
|
2002-01-12 00:42:05 +03:00
|
|
|
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"
|
2023-01-21 19:14:41 +03:00
|
|
|
FLTK_OPTIONS="fltk-options"
|
2008-10-26 01:06:31 +04:00
|
|
|
LINKSHARED="$LINKFLTKCAIRO ../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl Define the fluid executable used when building the test programs.
|
|
|
|
dnl In a native build we use the fluid executable created during the build,
|
2021-02-14 05:22:03 +03:00
|
|
|
dnl in a cross-compilation we use "fluid" which must exist on the build system
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl and must be in the PATH, i.e. executable as 'fluid' (w/o $EXEEXT).
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test "x$fltk_cross_compiling" = xyes], [
|
|
|
|
FLUID_BUILD="fluid"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2021-02-14 02:02:17 +03:00
|
|
|
FLUID_BUILD="../fluid/fluid$EXEEXT"
|
|
|
|
])
|
2020-06-10 17:24:39 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([DSOCOMMAND])
|
|
|
|
AC_SUBST([DSOFLAGS])
|
|
|
|
AC_SUBST([DSOLINK])
|
|
|
|
AC_SUBST([DSONAME])
|
|
|
|
AC_SUBST([FLDSONAME])
|
|
|
|
AC_SUBST([GLDSONAME])
|
|
|
|
AC_SUBST([IMGDSONAME])
|
|
|
|
AC_SUBST([CAIRODSONAME])
|
|
|
|
AC_SUBST([SHAREDSUFFIX])
|
|
|
|
AC_SUBST([LINKSHARED])
|
|
|
|
AC_SUBST([FLUID])
|
|
|
|
AC_SUBST([FLUID_BUILD])
|
2023-01-21 19:14:41 +03:00
|
|
|
AC_SUBST([FLTK_OPTIONS])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Find commands...
|
2007-02-06 22:35:28 +03:00
|
|
|
AC_PROG_INSTALL
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_CASE([$host_os],
|
|
|
|
[osf*], [
|
2021-02-14 05:22:03 +03:00
|
|
|
INSTALL="$(pwd)/install-sh -c"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$INSTALL" = "x$ac_install_sh"], [
|
|
|
|
# Use full path to install-sh script...
|
|
|
|
INSTALL="$(pwd)/install-sh -c"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_PATH_PROGS([NROFF], [nroff groff], [echo])
|
2021-02-14 05:22:03 +03: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
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_PATH_TOOL([AR], [ar])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test "x$AR" = "x:"], [
|
2016-08-01 11:33:05 +03:00
|
|
|
AC_MSG_ERROR([Configure could not find the library archiver, aborting.])
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
2002-04-10 20:26:33 +04:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test "x$RANLIB" != "x:"], [
|
2002-01-12 00:42:05 +03:00
|
|
|
LIBCOMMAND="$AR cr"
|
2021-02-14 02:02:17 +03:00
|
|
|
], [
|
2002-01-12 00:42:05 +03:00
|
|
|
LIBCOMMAND="$AR crs"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
|
|
|
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)
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test $ac_cv_sizeof_short -eq 2], [
|
|
|
|
AC_DEFINE([U16], [unsigned short])
|
|
|
|
])
|
|
|
|
AS_IF([test $ac_cv_sizeof_int -eq 4], [
|
|
|
|
AC_DEFINE([U32], [unsigned])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [test $ac_cv_sizeof_long -eq 4], [
|
2021-02-14 02:02:17 +03:00
|
|
|
AC_DEFINE([U32],[unsigned long])
|
|
|
|
])
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_CASE([$host_os], [darwin*], [
|
|
|
|
], [*], [
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
AS_IF([test $ac_cv_sizeof_int -eq 8], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([U64], [unsigned])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [test $ac_cv_sizeof_long -eq 8], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([U64], [unsigned long])
|
2002-10-23 19:18:57 +04:00
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
|
2002-10-22 17:45:23 +04:00
|
|
|
|
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-10-01 00:44:04 +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?
|
2021-02-14 02:02:17 +03:00
|
|
|
AC_CACHE_CHECK([whether we have the POSIX compatible scandir() prototype], ac_cv_cxx_scandir_posix,[
|
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
AC_COMPILE_IFELSE(
|
2021-02-16 16:21:13 +03:00
|
|
|
[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])
|
2021-02-14 02:02:17 +03:00
|
|
|
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.
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test "x$ac_cv_cxx_scandir_posix" = xyes], [
|
|
|
|
AC_DEFINE([HAVE_SCANDIR])
|
|
|
|
AC_DEFINE([HAVE_SCANDIR_POSIX])
|
|
|
|
], [
|
|
|
|
AC_CHECK_FUNC([scandir], [
|
|
|
|
AS_CASE([$host_os], [solaris* | *qnx*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Not using $host_os scandir emulation function.])
|
|
|
|
], [*], [
|
|
|
|
AC_DEFINE([HAVE_SCANDIR])
|
|
|
|
])
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_FUNC([vsnprintf], [
|
|
|
|
AS_CASE([$host_os], [hpux1020], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Not using built-in vsnprintf function because you are running HP-UX 10.20.])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [osf4], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Not using built-in vsnprintf function because you are running Tru64 4.0.])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_VSNPRINTF])
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_FUNC([snprintf], [
|
|
|
|
AS_CASE([$host_os], [hpux1020], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Not using built-in snprintf function because you are running HP-UX 10.20.])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [osf4], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Not using built-in snprintf function because you are running Tru64 4.0.])
|
2021-02-14 02:02:17 +03:00
|
|
|
], [*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_SNPRINTF])
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS([strings.h])
|
|
|
|
AC_CHECK_FUNCS([strcasecmp strlcat strlcpy])
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS([locale.h])
|
|
|
|
AC_CHECK_FUNCS([localeconv])
|
2009-07-24 02:51:56 +04:00
|
|
|
|
2005-07-24 22:41:30 +04:00
|
|
|
|
2001-11-20 23:10:59 +03:00
|
|
|
dnl FLTK library uses math library functions...
|
2021-02-14 02:02:17 +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
|
|
|
|
|
|
|
|
LARGEFILE=""
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test x$enable_largefile != xno], [
|
|
|
|
LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
|
2005-12-14 03:39:55 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test x$ac_cv_sys_large_files = x1], [
|
2021-02-16 16:21:13 +03:00
|
|
|
LARGEFILE="$LARGEFILE -D_LARGE_FILES"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
2005-12-14 03:39:55 +03:00
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
AS_IF([test x$ac_cv_sys_file_offset_bits = x64], [
|
2021-02-16 16:21:13 +03:00
|
|
|
LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
|
2021-02-14 02:02:17 +03:00
|
|
|
])
|
|
|
|
])
|
2005-12-14 03:39:55 +03:00
|
|
|
AC_SUBST(LARGEFILE)
|
|
|
|
|
2021-02-14 02:02:17 +03:00
|
|
|
|
2005-12-14 03:39:55 +03:00
|
|
|
dnl Check for "long long" support...
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_CACHE_CHECK([for long long int], [ac_cv_c_long_long], [
|
|
|
|
AS_IF([test "$GCC" = yes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
ac_cv_c_long_long=yes
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]],
|
|
|
|
[[long long int i;]])],
|
|
|
|
[ac_cv_c_long_long=yes],
|
|
|
|
[ac_cv_c_long_long=no])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test $ac_cv_c_long_long = yes], [
|
|
|
|
AC_DEFINE([HAVE_LONG_LONG])
|
|
|
|
])
|
|
|
|
|
2005-12-14 03:39:55 +03:00
|
|
|
|
2007-02-08 18:44:28 +03:00
|
|
|
dnl Check for dlopen/dlsym...
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SEARCH_LIBS([dlsym], [dl], AC_DEFINE([HAVE_DLSYM]))
|
|
|
|
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=""
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [cygwin* | mingw*], [
|
|
|
|
dnl Cygwin environment...
|
|
|
|
AUDIOLIBS="-lwinmm"
|
|
|
|
], [darwin*], [
|
|
|
|
AUDIOLIBS="-framework CoreAudio"
|
|
|
|
], [*], [
|
|
|
|
AC_CHECK_HEADER([alsa/asoundlib.h], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_ALSA_ASOUNDLIB_H])
|
|
|
|
AUDIOLIBS="-lasound"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2005-12-08 06:51:21 +03:00
|
|
|
|
2005-12-05 03:55:01 +03:00
|
|
|
AC_SUBST(AUDIOLIBS)
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
|
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
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([IMAGELIBS])
|
|
|
|
AC_SUBST([STATICIMAGELIBS])
|
2001-08-02 23:43: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
|
|
|
|
# Check for System lib use if automatic mode or --disable-localzlib is requested
|
|
|
|
syszlib_ok=no
|
|
|
|
syszinc_ok=no
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localzlib != xyes], [
|
|
|
|
AC_CHECK_LIB([z], [gzgets], [
|
|
|
|
AC_CHECK_HEADER([zlib.h], [syszinc_ok=yes])
|
|
|
|
AS_IF([test x$syszinc_ok = xyes], [
|
2020-07-01 19:03:10 +03:00
|
|
|
syszlib_ok=yes
|
2021-02-14 05:22:03 +03: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
|
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
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localpng != xyes], [
|
|
|
|
AC_CHECK_LIB([png], [png_read_info], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_HEADER([png.h], [
|
|
|
|
AC_DEFINE([HAVE_PNG_H])
|
|
|
|
syspnginc_ok=yes
|
|
|
|
])
|
|
|
|
AC_CHECK_HEADER([libpng/png.h], [
|
|
|
|
syspnginc_ok=yes
|
|
|
|
])
|
|
|
|
AS_IF([test x$syspnginc_ok = xyes], [
|
|
|
|
syspnglib_ok=yes
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2008-11-10 23:11:36 +03:00
|
|
|
|
2023-01-01 19:29:23 +03:00
|
|
|
# If we use the system zlib, we must also use the system png zlib and vice versa
|
|
|
|
# If either of them is not available, we fall back to using both local libraries
|
|
|
|
AS_IF([test x$syspnglib_ok = xyes -a x$syszlib_ok != xyes], [
|
|
|
|
syspnglib_ok=no
|
|
|
|
enable_localpng=yes
|
|
|
|
AC_MSG_WARN([Local z lib selected: overriding png lib to local for compatibility.])
|
|
|
|
])
|
|
|
|
AS_IF([test x$syszlib_ok = xyes -a x$syspnglib_ok != xyes], [
|
|
|
|
syszlib_ok=no
|
|
|
|
enable_localzlib=yes
|
|
|
|
AC_MSG_WARN([Local png lib selected: overriding z lib to local for compatibility.])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
# Now set the Z lib and include flags according to the requested mode and availability
|
|
|
|
AS_IF([test x$enable_localzlib = xyes -o x$syszlib_ok = xno], [
|
|
|
|
ZLIBINC="-I../zlib"
|
|
|
|
ZLIB="zlib"
|
|
|
|
LIBS="-lfltk_z $LIBS"
|
|
|
|
IMAGELIBS="-lfltk_z $IMAGELIBS"
|
|
|
|
STATICIMAGELIBS="\$libdir/libfltk_z.a $STATICIMAGELIBS"
|
|
|
|
AC_DEFINE([HAVE_LIBZ])
|
|
|
|
ac_cv_lib_z_gzgets=no # fc: is still necessary ?
|
|
|
|
# Finally, warn user if system lib was requested but not found
|
|
|
|
AS_IF([test x$enable_localzlib = xno], [
|
|
|
|
AC_MSG_WARN([Cannot find system z lib or header: choosing the local lib mode.])
|
|
|
|
])
|
|
|
|
], [
|
|
|
|
ZLIBINC=""
|
|
|
|
ZLIB=""
|
|
|
|
LIBS="-lz $LIBS"
|
|
|
|
IMAGELIBS="-lz $IMAGELIBS"
|
|
|
|
STATICIMAGELIBS="-lz $STATICIMAGELIBS"
|
|
|
|
AC_DEFINE([HAVE_LIBZ])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
# The following is executed if the png lib was not found usable or if local lib is required explicitly
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localpng = xyes -o x$syspnglib_ok = xno], [
|
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"
|
2021-02-14 05:22:03 +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
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localpng = xno], [
|
2020-07-01 19:03:10 +03:00
|
|
|
AC_MSG_WARN([Cannot find system png lib or header: choosing the local lib mode.])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
], [
|
2008-11-10 20:22:14 +03:00
|
|
|
PNGINC=""
|
|
|
|
PNG=""
|
|
|
|
IMAGELIBS="-lpng $IMAGELIBS"
|
2008-12-29 20:10:12 +03:00
|
|
|
STATICIMAGELIBS="-lpng $STATICIMAGELIBS"
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_DEFINE([HAVE_LIBPNG])
|
|
|
|
AC_CHECK_LIB([png], [png_get_valid], [
|
|
|
|
AC_DEFINE([HAVE_PNG_GET_VALID])
|
|
|
|
])
|
|
|
|
AC_CHECK_LIB([png], [png_set_tRNS_to_alpha], [
|
|
|
|
AC_DEFINE([HAVE_PNG_SET_TRNS_TO_ALPHA])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2004-07-06 04:18:49 +04:00
|
|
|
|
2018-02-25 22:25:45 +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
|
|
|
|
# Check for System lib use if automatic mode or --disable-localjpeg is requested
|
|
|
|
sysjpeglib_ok=no
|
|
|
|
sysjpeginc_ok=no
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localjpeg != xyes], [
|
|
|
|
AC_CHECK_LIB([jpeg], [jpeg_CreateCompress], [
|
|
|
|
AC_CHECK_HEADER([jpeglib.h], [sysjpeginc_ok=yes])
|
2021-02-16 16:21:13 +03:00
|
|
|
AS_IF([test x$sysjpeginc_ok = xyes], [
|
|
|
|
sysjpeglib_ok=yes
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
2018-02-25 22:25:45 +03:00
|
|
|
# Now set the jpeg lib and include flags according to the requested mode and availability
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localjpeg = xyes -o x$sysjpeglib_ok = xno], [
|
2018-02-25 22:25:45 +03:00
|
|
|
JPEGINC="-I../jpeg"
|
|
|
|
JPEG="jpeg"
|
|
|
|
IMAGELIBS="-lfltk_jpeg $IMAGELIBS"
|
|
|
|
STATICIMAGELIBS="\$libdir/libfltk_jpeg.a $STATICIMAGELIBS"
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_DEFINE([HAVE_LIBJPEG])
|
2018-02-25 22:25:45 +03:00
|
|
|
# Finally, warn user if system lib was requested but not found
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_localjpeg = xno], [
|
2020-07-01 19:03:10 +03:00
|
|
|
AC_MSG_WARN([Cannot find system jpeg lib or header: choosing the local lib mode.])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
], [
|
2018-02-25 22:25:45 +03:00
|
|
|
JPEGINC=""
|
|
|
|
JPEG=""
|
|
|
|
IMAGELIBS="-ljpeg $IMAGELIBS"
|
|
|
|
STATICIMAGELIBS="-ljpeg $STATICIMAGELIBS"
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_DEFINE([HAVE_LIBJPEG])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([JPEG])
|
|
|
|
AC_SUBST([JPEGINC])
|
|
|
|
AC_SUBST([PNG])
|
|
|
|
AC_SUBST([PNGINC])
|
2021-03-07 17:29:14 +03:00
|
|
|
AC_SUBST([HAVE_PNG_H])
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([ZLIB])
|
|
|
|
AC_SUBST([ZLIBINC])
|
2018-02-25 22:25:45 +03:00
|
|
|
|
2004-07-06 04:18:49 +04:00
|
|
|
|
2020-06-27 10:56:00 +03:00
|
|
|
# Control the usage of the nanosvg lib and SVG output
|
2017-09-03 16:14:25 +03:00
|
|
|
|
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
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [mingw*], [
|
|
|
|
check_pthread=no
|
|
|
|
], [cygwin*], [
|
|
|
|
AS_IF([test "x$enable_cygwin" != xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
check_pthread=no
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_threads" != xno -a x$check_pthread = xyes], [
|
|
|
|
AC_CHECK_HEADERS([pthread.h])
|
|
|
|
|
|
|
|
AS_IF([test x$ac_cv_header_pthread_h = xyes], [
|
2020-07-01 19:03:10 +03:00
|
|
|
dnl Check various threading options for the platforms we support
|
|
|
|
for flag in -lpthreads -lpthread -pthread; do
|
|
|
|
AC_MSG_CHECKING([for pthread_create using $flag])
|
|
|
|
SAVELIBS="$LIBS"
|
|
|
|
LIBS="$flag $LIBS"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <pthread.h>]],
|
|
|
|
[[pthread_create(0, 0, 0, 0);]])],
|
|
|
|
[have_pthread=yes],
|
|
|
|
[LIBS="$SAVELIBS"])
|
|
|
|
AC_MSG_RESULT([$have_pthread])
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test $have_pthread = yes], [
|
|
|
|
AC_DEFINE([HAVE_PTHREAD])
|
2020-07-01 19:03:10 +03:00
|
|
|
PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
|
|
|
|
|
|
|
|
# Solaris requires -D_POSIX_PTHREAD_SEMANTICS to
|
|
|
|
# be POSIX-compliant... :(
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [solaris*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
PTHREAD_FLAGS="$PTHREAD_FLAGS -D_POSIX_PTHREAD_SEMANTICS"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2020-07-01 19:03:10 +03:00
|
|
|
done
|
2021-07-21 13:12:26 +03:00
|
|
|
|
|
|
|
dnl Check if we have PTHREAD_MUTEX_RECURSIVE
|
|
|
|
AC_CACHE_CHECK([whether we have PTHREAD_MUTEX_RECURSIVE], ac_cv_pthread_mutex_recursive,[
|
|
|
|
AC_LANG_PUSH([C])
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM(
|
|
|
|
[[#include <pthread.h>
|
|
|
|
]], [[
|
|
|
|
return PTHREAD_MUTEX_RECURSIVE;
|
|
|
|
]])],
|
|
|
|
[ac_cv_pthread_mutex_recursive=yes],
|
|
|
|
[ac_cv_pthread_mutex_recursive=no])
|
|
|
|
AC_LANG_POP([])
|
|
|
|
])
|
|
|
|
AS_IF([test x$ac_cv_pthread_mutex_recursive = xyes], [
|
|
|
|
AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([PTHREAD_FLAGS])
|
2021-07-21 13:12:26 +03:00
|
|
|
AC_SUBST([HAVE_PTHREAD_MUTEX_RECURSIVE])
|
2001-12-09 23:26:24 +03:00
|
|
|
|
2007-02-05 21:39:27 +03:00
|
|
|
|
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=
|
2022-03-04 17:40:29 +03:00
|
|
|
LIBDECORDIR=""
|
2001-12-15 00:02:24 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_ARG_WITH([links], AS_HELP_STRING([--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=""
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os_gui], [cygwin* | mingw*], [
|
|
|
|
dnl Cygwin environment, using windows GDI ...
|
|
|
|
# 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"...
|
|
|
|
AC_DEFINE([U32], [unsigned])
|
|
|
|
# We do no longer define WIN32 or _WIN32 (since FLTK 1.4.0)
|
|
|
|
# and we don't need to define USE_OPENGL32 (added in svn r6657
|
|
|
|
# but never used, see STR #2147)
|
|
|
|
# CFLAGS="-mwindows -D_WIN32 -DUSE_OPENGL32 $CFLAGS"
|
|
|
|
# CXXFLAGS="-mwindows -D_WIN32 -DUSE_OPENGL32 $CXXFLAGS"
|
|
|
|
CFLAGS="-mwindows $CFLAGS"
|
|
|
|
CXXFLAGS="-mwindows $CXXFLAGS"
|
|
|
|
LDFLAGS="-mwindows $LDFLAGS"
|
|
|
|
DSOFLAGS="-mwindows $DSOFLAGS"
|
|
|
|
LIBS="$LIBS -lole32 -luuid -lcomctl32 -lws2_32"
|
2021-02-26 20:00:07 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
BUILD="WIN"
|
|
|
|
AS_IF([test "x$with_optim" = x], [
|
2021-02-16 16:21:13 +03:00
|
|
|
dnl Avoid -Os optimization on Cygwin/MinGW
|
|
|
|
with_optim="-O3"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2000-04-26 18:14:41 +04:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_gl != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_HEADER([GL/gl.h], [
|
|
|
|
AC_DEFINE([HAVE_GL])
|
|
|
|
GLLIBS="-lopengl32"
|
|
|
|
])
|
|
|
|
AC_CHECK_HEADER([GL/glu.h], [
|
|
|
|
AC_DEFINE([HAVE_GL_GLU_H])
|
|
|
|
GLLIBS="-lglu32 $GLLIBS"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2021-02-16 16:21:13 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_threads" != xno -a x$have_pthread = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_PTHREAD])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
THREADS="threads$EXEEXT"
|
|
|
|
|
|
|
|
# Don't make symlinks since Windows is not case sensitive.
|
|
|
|
AS_IF([test "x$with_links" != xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
HLINKS="#"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
], [darwin*], [
|
|
|
|
BUILD="OSX"
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
# MacOS X uses Cocoa for graphics.
|
|
|
|
LIBS="$LIBS -framework Cocoa"
|
2006-01-15 06:16:09 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$have_pthread = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_PTHREAD])
|
|
|
|
THREADS="threads$EXEEXT"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test x$enable_gl != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_GL])
|
|
|
|
AC_DEFINE([HAVE_GL_GLU_H])
|
|
|
|
GLLIBS="-framework OpenGL"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2021-02-16 16:21:13 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
# Don't make symlinks because HFS+ is not case sensitive...
|
|
|
|
AS_IF([test "x$with_links" != xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
HLINKS="#"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
# Some steps are only done for OS X package management
|
|
|
|
OSX_ONLY=
|
|
|
|
|
|
|
|
# Install/Uninstall FLUID application
|
|
|
|
INSTALL_DESKTOP="install-osx"
|
|
|
|
UNINSTALL_DESKTOP="uninstall-osx"
|
|
|
|
], [*], [
|
|
|
|
# All others are UNIX/X11...
|
|
|
|
# This includes Cygwin target combined with X11
|
|
|
|
AS_IF([test x$have_pthread = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_DEFINE([HAVE_PTHREAD])
|
|
|
|
THREADS="threads$EXEEXT"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2022-11-23 15:08:37 +03:00
|
|
|
|
2022-11-18 11:10:22 +03:00
|
|
|
AS_IF([test x$enable_wayland != xno], [
|
2022-03-04 17:40:29 +03:00
|
|
|
AS_IF([test x$PKGCONFIG = x], [
|
2022-11-18 11:10:22 +03:00
|
|
|
dnl pkg-config is not available, issue warning and possibly abort...
|
|
|
|
AS_IF([test x$enable_wayland = xyes], [
|
2022-03-04 17:40:29 +03:00
|
|
|
AC_MSG_WARN([--enable-wayland: please install pkg-config.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
2022-11-18 11:10:22 +03:00
|
|
|
],[
|
|
|
|
AC_MSG_WARN([pkg-config is not found. Continuing with --disable-wayland])
|
|
|
|
enable_wayland="no"
|
|
|
|
])
|
|
|
|
],[
|
|
|
|
missing="no"
|
|
|
|
AS_IF([$PKGCONFIG --exists wayland-client],[],[missing="yes"])
|
|
|
|
AS_IF([$PKGCONFIG --exists wayland-protocols],[],[missing="yes"])
|
|
|
|
AS_IF([$PKGCONFIG --exists wayland-cursor],[],[missing="yes"])
|
|
|
|
AS_IF([$PKGCONFIG --exists xkbcommon],[],[missing="yes"])
|
|
|
|
AS_IF([$PKGCONFIG --exists dbus-1],[],[missing="yes"])
|
|
|
|
AS_IF([$PKGCONFIG --exists pangocairo],[],[missing="yes"])
|
|
|
|
AS_IF([test x$missing = xyes], [
|
|
|
|
AC_MSG_WARN([These packages 'wayland-client wayland-protocols wayland-cursor xkbcommon dbus-1 pangocairo' are required to build FLTK for wayland.])
|
|
|
|
AC_MSG_WARN([At least one of them is missing.])
|
|
|
|
AS_IF([test x$enable_wayland = xyes], [
|
|
|
|
AC_MSG_ERROR([Building for Wayland is not possible. Aborting.])
|
|
|
|
],[
|
|
|
|
AC_MSG_WARN([Continuing with --disable-wayland])
|
|
|
|
enable_wayland="no"
|
|
|
|
])
|
|
|
|
])
|
2022-03-04 17:40:29 +03:00
|
|
|
])
|
2022-11-18 11:10:22 +03:00
|
|
|
])
|
2022-08-29 15:26:28 +03:00
|
|
|
|
2022-11-18 11:10:22 +03:00
|
|
|
AS_IF([test x$enable_wayland != xno], [
|
|
|
|
dnl Prepare for Wayland...
|
2022-03-15 08:42:06 +03:00
|
|
|
dnl Turn option usecairo ON
|
|
|
|
AC_DEFINE([FLTK_USE_CAIRO])
|
|
|
|
AC_MSG_NOTICE([Turning on the usecairo option])
|
2022-03-04 17:40:29 +03:00
|
|
|
|
|
|
|
BUILD="WAYLAND"
|
|
|
|
AC_DEFINE([FLTK_USE_WAYLAND])
|
2022-09-10 08:44:23 +03:00
|
|
|
graphics="Wayland"
|
|
|
|
AS_IF([test x$enable_x11 != xno], [
|
|
|
|
AC_DEFINE([FLTK_USE_X11]) # to build a hybrid Wayland/X11 library
|
|
|
|
BUILD="WAYLANDX11"
|
|
|
|
graphics="Wayland or X11 with cairo"
|
|
|
|
])
|
2022-11-26 12:43:21 +03:00
|
|
|
# CFLAGS="$CFLAGS -DUSE_SYSTEM_LIBDECOR=0"
|
|
|
|
# CXXFLAGS="$CXXFLAGS -DUSE_SYSTEM_LIBDECOR=0"
|
2022-11-18 11:10:22 +03:00
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs wayland-cursor) $($PKGCONFIG --libs wayland-client) $($PKGCONFIG --libs xkbcommon) $($PKGCONFIG --libs pangocairo) "
|
2022-09-10 08:44:23 +03:00
|
|
|
AS_IF([test x$enable_x11 != xno], [LIBS="$LIBS $($PKGCONFIG --libs x11)"] )
|
2022-03-04 17:40:29 +03:00
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs dbus-1) -ldl"
|
2022-11-26 12:43:21 +03:00
|
|
|
# CXXFLAGS="$CXXFLAGS -I../libdecor/src"
|
2022-03-04 17:40:29 +03:00
|
|
|
DSOFLAGS="$LIBS $DSOFLAGS"
|
|
|
|
enable_pango=yes
|
|
|
|
LIBDECORDIR="libdecor/build"
|
2022-05-19 18:18:53 +03:00
|
|
|
LDFLAGS="$LDFLAGS -rdynamic"
|
|
|
|
AC_SUBST([UNAME])
|
|
|
|
UNAME="$(uname -s)"
|
2022-08-25 23:04:39 +03:00
|
|
|
AS_CASE([$UNAME],
|
2022-11-27 12:19:15 +03:00
|
|
|
[Linux], [LDFLAGS="$LDFLAGS -no-pie"]
|
2022-05-19 18:18:53 +03:00
|
|
|
)
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-04 17:40:29 +03:00
|
|
|
AC_SEARCH_LIBS([dlopen], [dl])
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-22 23:28:29 +03:00
|
|
|
AS_IF([test x$enable_gl != xno], [
|
2022-08-25 23:04:39 +03:00
|
|
|
AS_IF([$PKGCONFIG --exists gl], [
|
2022-11-23 19:24:20 +03:00
|
|
|
AS_IF([$PKGCONFIG --exists egl], [
|
|
|
|
AS_IF([$PKGCONFIG --exists wayland-egl], [
|
|
|
|
AC_DEFINE([HAVE_GL])
|
|
|
|
GLLIBS="$($PKGCONFIG --libs wayland-egl) $($PKGCONFIG --libs egl) $($PKGCONFIG --libs gl) $GLLIBS"
|
|
|
|
])])])
|
2022-08-25 23:04:39 +03:00
|
|
|
AS_IF([$PKGCONFIG --exists glu], [
|
|
|
|
AC_DEFINE([HAVE_GL_GLU_H])
|
2022-05-19 18:18:53 +03:00
|
|
|
GLLIBS="$($PKGCONFIG --libs glu) $GLLIBS"
|
|
|
|
])
|
2022-11-05 07:01:56 +03:00
|
|
|
AC_CHECK_LIB([GL], [glXGetProcAddressARB], [AC_DEFINE([HAVE_GLXGETPROCADDRESSARB])
|
|
|
|
],, [-lm])
|
2022-03-22 23:28:29 +03:00
|
|
|
], [
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2022-03-04 17:40:29 +03:00
|
|
|
])
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-04 17:40:29 +03:00
|
|
|
dnl Check for GTK-3 ...
|
|
|
|
gtk_found=no
|
|
|
|
CFLAGS="$($PKGCONFIG --cflags gtk+-3.0) $CFLAGS"
|
|
|
|
AC_CHECK_HEADERS([gtk/gtk.h], [
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_GTK"
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs gtk+-3.0)"
|
|
|
|
gtk_found=yes
|
|
|
|
])
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-04 17:40:29 +03:00
|
|
|
dnl Check for the Pango library ...
|
|
|
|
pango_found=no
|
|
|
|
CFLAGS="$($PKGCONFIG --cflags pangocairo) $CFLAGS"
|
|
|
|
CXXFLAGS="$($PKGCONFIG --cflags pangocairo) $CXXFLAGS"
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs pangocairo)"
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-04 17:40:29 +03:00
|
|
|
AC_CHECK_HEADERS([pango/pangocairo.h], [
|
|
|
|
AC_DEFINE([USE_PANGO])
|
|
|
|
AC_DEFINE([USE_XFT])
|
|
|
|
pango_found=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Early abort if Pango could not be found
|
|
|
|
AS_IF([test x$pango_found != xyes], [
|
|
|
|
AC_MSG_NOTICE([--enable-wayland: Pango libs and/or headers could not be found.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
])
|
2022-12-08 21:48:31 +03:00
|
|
|
|
2022-11-29 19:01:34 +03:00
|
|
|
dnl check for Xinerama, Xcursor, Xfixes, Xrender, Xregion.h
|
|
|
|
AS_IF([test x$enable_x11 != xno], [
|
|
|
|
xinerama_found=no
|
|
|
|
AS_IF([$PKGCONFIG --exists xinerama], [
|
|
|
|
AC_DEFINE(HAVE_XINERAMA)
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs xinerama)"
|
|
|
|
xinerama_found=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
xcursor_found=no
|
|
|
|
AS_IF([$PKGCONFIG --exists xcursor], [
|
|
|
|
AC_DEFINE(HAVE_XCURSOR)
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs xcursor)"
|
|
|
|
xcursor_found=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
xfixes_found=no
|
|
|
|
AS_IF([$PKGCONFIG --exists xfixes], [
|
|
|
|
AC_DEFINE(HAVE_XFIXES)
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs xfixes)"
|
|
|
|
xfixes_found=yes
|
|
|
|
])
|
2022-12-08 21:48:31 +03:00
|
|
|
|
2022-11-29 19:01:34 +03:00
|
|
|
xrender_found=no
|
|
|
|
AS_IF([$PKGCONFIG --exists xrender], [
|
|
|
|
AC_DEFINE(HAVE_XRENDER)
|
|
|
|
LIBS="$LIBS $($PKGCONFIG --libs xrender)"
|
|
|
|
xrender_found=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([X11/Xregion.h], [
|
|
|
|
AC_DEFINE([HAVE_X11_XREGION_H])
|
|
|
|
], [], [#include <X11/Xlib.h>])
|
|
|
|
])
|
2022-03-04 17:40:29 +03:00
|
|
|
|
|
|
|
], [
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
dnl Check for X11...
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
AS_IF([test x$no_x = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_ERROR([Configure could not find required X11 libraries, aborting.])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "x$X_PRE_LIBS" != x], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_WARN([Ignoring libraries "$X_PRE_LIBS" requested by configure.])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
LIBS="$LIBS -lX11 $X_EXTRA_LIBS"
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
|
2022-10-14 13:44:30 +03:00
|
|
|
AS_CASE([$host_os], [darwin*], [
|
|
|
|
DARWIN_LDFLAGS="$LDFLAGS"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
LDFLAGS="$X_LIBS $LDFLAGS"
|
|
|
|
DSOFLAGS="$X_LIBS $DSOFLAGS"
|
2021-12-19 00:42:30 +03:00
|
|
|
AC_DEFINE([FLTK_USE_X11])
|
2021-02-14 05:22:03 +03:00
|
|
|
BUILD="X11"
|
|
|
|
AS_IF([test "x$x_includes" != x], [
|
2021-02-16 16:21:13 +03:00
|
|
|
ac_cpp="$ac_cpp -I$x_includes"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2022-03-04 18:29:18 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
dnl Check for OpenGL unless disabled...
|
|
|
|
GLLIBS=
|
|
|
|
|
|
|
|
AS_IF([test x$enable_gl != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_SEARCH_LIBS([dlopen], [dl])
|
|
|
|
AC_CHECK_HEADER([GL/gl.h], [
|
|
|
|
AC_CHECK_LIB([GL], [glXMakeCurrent], [
|
|
|
|
AC_DEFINE([HAVE_GL])
|
|
|
|
GLLIBS="-lGL"
|
|
|
|
], [
|
|
|
|
AC_CHECK_LIB([MesaGL], [glXMakeCurrent], [
|
|
|
|
AC_DEFINE([HAVE_GL])
|
|
|
|
GLLIBS="-lMesaGL"
|
|
|
|
],, [-lm]),
|
|
|
|
], [-lm])
|
|
|
|
AC_CHECK_LIB([GL], [glXGetProcAddressARB], [
|
|
|
|
AC_DEFINE([HAVE_GLXGETPROCADDRESSARB])
|
|
|
|
],, [-lm])
|
|
|
|
])
|
|
|
|
AC_CHECK_HEADER([GL/glu.h], [
|
|
|
|
AC_DEFINE([HAVE_GL_GLU_H])
|
|
|
|
AS_IF([test x$ac_cv_lib_GL_glXMakeCurrent = xyes], [
|
|
|
|
GLLIBS="-lGLU $GLLIBS"
|
|
|
|
])
|
|
|
|
AS_IF([test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes], [
|
|
|
|
GLLIBS="-lMesaGLU $GLLIBS"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test x$ac_cv_lib_GL_glXMakeCurrent != xyes -a x$ac_cv_lib_MesaGL_glXMakeCurrent != xyes], [
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2021-02-16 16:21:13 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
xinerama_found=no
|
|
|
|
AS_IF([test x$enable_xinerama != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_LIB([Xinerama], [XineramaIsActive], [
|
|
|
|
AC_DEFINE([HAVE_XINERAMA])
|
|
|
|
LIBS="-lXinerama $LIBS"
|
|
|
|
xinerama_found=yes
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check for the Xft library unless disabled...
|
|
|
|
xft_found=no
|
2022-11-18 11:10:22 +03:00
|
|
|
AS_IF([test x$enable_xft != xno -a x$enable_wayland = xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Try pkg-config first (freetype2 deprecated freetype-config from some version on)
|
|
|
|
FT_FLAGS=""
|
|
|
|
AS_IF([test "x$PKGCONFIG" != x], [
|
|
|
|
FT_FLAGS="$($PKGCONFIG --cflags xft)"
|
|
|
|
AS_IF([test "x$FT_FLAGS" = x], [
|
|
|
|
FT_FLAGS="$($PKGCONFIG --cflags freetype2)"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
# if that failed, try freetype-config
|
|
|
|
AS_IF([test "x$FT_FLAGS" = x], [
|
|
|
|
AC_PATH_PROG([FTCONFIG], [freetype-config])
|
|
|
|
AS_IF([test "x$FTCONFIG" != x], [
|
|
|
|
FT_FLAGS="$($FTCONFIG --cflags)"
|
|
|
|
], [
|
|
|
|
# abort if both methods failed
|
|
|
|
AC_MSG_NOTICE([please install pkg-config or use 'configure --disable-xft'.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
CPPFLAGS="$FT_FLAGS $CPPFLAGS"
|
|
|
|
CXXFLAGS="$FT_FLAGS $CXXFLAGS"
|
|
|
|
CFLAGS="$FT_FLAGS $CFLAGS"
|
|
|
|
|
|
|
|
AC_CHECK_LIB([fontconfig], [FcPatternCreate])
|
|
|
|
AC_CHECK_HEADER([X11/Xft/Xft.h], [
|
|
|
|
AC_CHECK_LIB([Xft], [XftDrawCreate], [
|
|
|
|
AC_DEFINE([USE_XFT])
|
|
|
|
LIBS="-lXft $LIBS"
|
|
|
|
BUILD="XFT"
|
|
|
|
xft_found=yes
|
|
|
|
])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Issue a warning message if Xft was not found, abort configure
|
|
|
|
dnl if Xft was requested explicitly (but not found)
|
|
|
|
AS_IF([test x$enable_xft != xno -a x$xft_found != xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
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'.])
|
|
|
|
AS_IF([test x$enable_xft = xyes], [
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
2022-03-15 08:42:06 +03:00
|
|
|
dnl Option usecairo
|
|
|
|
AS_IF([test x$enable_usecairo = xyes], [
|
|
|
|
enable_pango=yes
|
|
|
|
BUILD="CAIRO"
|
|
|
|
AC_DEFINE([FLTK_USE_CAIRO])
|
|
|
|
AC_MSG_NOTICE([Processing usecairo option])
|
|
|
|
]
|
|
|
|
)
|
2022-08-29 15:26:28 +03:00
|
|
|
|
2021-02-16 15:53:35 +03:00
|
|
|
dnl test if Pango is asked but xft was not found
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_pango = xyes -a x$xft_found = xno], [
|
2021-02-16 15:53:35 +03:00
|
|
|
AC_MSG_WARN([could not find the Xft headers and/or libraries required for Pango.])
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_MSG_NOTICE([please install Xft headers and libraries or don't use configure with '--enable-pango'.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
])
|
|
|
|
|
2021-02-16 15:53:35 +03:00
|
|
|
dnl Check for the Pango library unless disabled...
|
2021-02-14 05:22:03 +03:00
|
|
|
pango_found=no
|
|
|
|
AS_IF([test x$enable_pango = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AS_IF([test x$PKGCONFIG != x], [
|
2021-02-17 13:27:28 +03:00
|
|
|
dnl pkg-config is available, use it...
|
|
|
|
dnl AC_MSG_NOTICE([--enable-pango: using pkg-config ...])
|
2022-10-13 16:04:32 +03:00
|
|
|
CXXFLAGS="$($PKGCONFIG --cflags pangocairo) $CXXFLAGS"
|
|
|
|
AS_CASE([$host_os], [darwin*], [], [*], [
|
|
|
|
CXXFLAGS="$($PKGCONFIG --cflags pangoxft) $CXXFLAGS"
|
|
|
|
])
|
|
|
|
AS_CASE([$host_os], [darwin*], [
|
2022-10-14 13:44:30 +03:00
|
|
|
DARWIN_SAVE_LIBS=$LIBS
|
|
|
|
DARWIN_PANGO_LIBS="$($PKGCONFIG --libs pangocairo)"
|
|
|
|
LIBS="$($PKGCONFIG --libs pangocairo) $LIBS"
|
2022-10-13 16:04:32 +03:00
|
|
|
], [*], [
|
2022-10-14 13:44:30 +03:00
|
|
|
LIBS="$($PKGCONFIG --libs pangocairo --libs pangoxft) $LIBS"
|
2022-10-13 16:04:32 +03:00
|
|
|
])
|
2021-02-17 13:27:28 +03:00
|
|
|
], [
|
|
|
|
dnl pkg-config is not available, issue warning and continue...
|
|
|
|
AC_MSG_WARN([--enable-pango: please install pkg-config. Continuing anyway.])
|
|
|
|
])
|
2021-02-16 16:21:13 +03:00
|
|
|
|
2021-02-17 13:27:28 +03:00
|
|
|
CPPFLAGS="$CXXFLAGS"
|
2022-10-13 16:04:32 +03:00
|
|
|
AS_CASE([$host_os], [darwin*],
|
|
|
|
[AC_CHECK_HEADERS([pango/pango.h], [
|
|
|
|
AC_CHECK_LIB([pango-1.0], [pango_layout_new], [
|
|
|
|
AC_DEFINE([USE_PANGO])
|
|
|
|
pango_found=yes
|
2022-10-14 13:44:30 +03:00
|
|
|
LIBS=$DARWIN_SAVE_LIBS
|
2022-10-13 16:04:32 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
],[*], [
|
|
|
|
AC_CHECK_HEADERS([pango/pango.h pango/pangoxft.h], [
|
2021-02-17 13:27:28 +03:00
|
|
|
AC_CHECK_LIB([pango-1.0], [pango_layout_new], [
|
|
|
|
AC_CHECK_LIB([pangoxft-1.0], [pango_xft_render_layout], [
|
|
|
|
AC_DEFINE([USE_PANGO])
|
|
|
|
pango_found=yes
|
2021-02-16 16:21:13 +03:00
|
|
|
])
|
|
|
|
])
|
2022-10-13 16:04:32 +03:00
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
2021-02-17 13:27:28 +03:00
|
|
|
dnl Early abort if --enable-pango was requested but Pango could not be found
|
|
|
|
AS_IF([test x$pango_found != xyes], [
|
|
|
|
AC_MSG_NOTICE([--enable-pango: Pango libs and/or headers could not be found.])
|
|
|
|
AC_MSG_ERROR([Aborting.])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check for the Xfixes extension unless disabled...
|
|
|
|
xfixes_found=no
|
|
|
|
AS_IF([test x$enable_xfixes != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_HEADER([X11/extensions/Xfixes.h], [
|
|
|
|
AC_CHECK_LIB([Xfixes], [XFixesQueryExtension], [
|
|
|
|
AC_DEFINE([HAVE_XFIXES])
|
|
|
|
LIBS="-lXfixes $LIBS"
|
|
|
|
xfixes_found=yes
|
|
|
|
])
|
|
|
|
], [], [#include <X11/Xlib.h>])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check for the Xcursor library unless disabled...
|
|
|
|
xcursor_found=no
|
|
|
|
AS_IF([test x$enable_xcursor != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_HEADER([X11/Xcursor/Xcursor.h], [
|
|
|
|
AC_CHECK_LIB([Xcursor], [XcursorImageCreate], [
|
|
|
|
AC_DEFINE([HAVE_XCURSOR])
|
|
|
|
LIBS="-lXcursor $LIBS"
|
|
|
|
xcursor_found=yes
|
|
|
|
])
|
|
|
|
], [], [#include <X11/Xlib.h>])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl Check for the Xrender library unless disabled...
|
|
|
|
xrender_found=no
|
|
|
|
AS_IF([test x$enable_xrender != xno], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_CHECK_HEADER([X11/extensions/Xrender.h], [
|
|
|
|
AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [
|
|
|
|
AC_DEFINE([HAVE_XRENDER])
|
|
|
|
LIBS="-lXrender $LIBS"
|
|
|
|
xrender_found=yes
|
|
|
|
])
|
|
|
|
], [], [#include <X11/Xlib.h>])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2022-11-01 22:06:22 +03:00
|
|
|
|
2022-10-14 13:44:30 +03:00
|
|
|
AS_CASE([$host_os], [darwin*], [
|
|
|
|
AS_IF([test x$pango_found = xyes], [
|
|
|
|
#place X_LIBS after homebrew's pango libs
|
|
|
|
LIBS="$DARWIN_PANGO_LIBS $X_LIBS $LIBS"
|
|
|
|
#remove X_LIBS from LDFLAGS while keeping its initial content
|
|
|
|
LDFLAGS="$DARWIN_LDFLAGS"
|
|
|
|
])
|
|
|
|
])
|
2022-11-01 22:06:22 +03:00
|
|
|
|
2021-02-14 05:22:03 +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>])
|
2022-03-31 17:00:11 +03:00
|
|
|
|
2022-03-04 18:29:18 +03:00
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
|
|
|
|
# Make symlinks since UNIX/Linux is case sensitive,
|
|
|
|
# but Cygwin in general not.
|
|
|
|
AS_CASE([$host_os], [cygwin*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
HLINKS="#"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
# Make symlinks since UNIX/Linux is case sensitive,
|
|
|
|
# but only if explicitly configured (default=no)
|
|
|
|
AS_IF([test "x$with_links" != xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
HLINKS="#"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
# Install/Uninstall FLUID application support files
|
|
|
|
INSTALL_DESKTOP="install-linux"
|
|
|
|
UNINSTALL_DESKTOP="uninstall-linux"
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([GLDEMOS])
|
|
|
|
AC_SUBST([GLLIBS])
|
|
|
|
AC_SUBST([HLINKS])
|
|
|
|
AC_SUBST([OSX_ONLY])
|
|
|
|
AC_SUBST([THREADS])
|
|
|
|
|
2022-03-04 17:40:29 +03:00
|
|
|
AC_SUBST([LIBDECORDIR])
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([INSTALL_DESKTOP])
|
|
|
|
AC_SUBST([UNINSTALL_DESKTOP])
|
|
|
|
|
|
|
|
AC_SUBST([BUILD])
|
2015-12-15 19:53:52 +03:00
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Figure out the appropriate formatted man page extension...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE(["$host_os"], [*bsd* | darwin*], [
|
|
|
|
# *BSD
|
|
|
|
CAT1EXT=0
|
|
|
|
CAT3EXT=0
|
|
|
|
CAT6EXT=0
|
|
|
|
], [irix*], [
|
|
|
|
# SGI IRIX
|
|
|
|
CAT1EXT=z
|
|
|
|
CAT3EXT=z
|
|
|
|
CAT6EXT=z
|
|
|
|
], [*], [
|
|
|
|
# All others
|
|
|
|
CAT1EXT=1
|
|
|
|
CAT3EXT=3
|
|
|
|
CAT6EXT=6
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([CAT1EXT])
|
|
|
|
AC_SUBST([CAT3EXT])
|
|
|
|
AC_SUBST([CAT6EXT])
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Fix "mandir" variable...
|
2021-02-15 02:09:15 +03:00
|
|
|
AS_IF([test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"], [
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE(["$host_os"], [*bsd* | darwin* | linux*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# *BSD, Darwin, and Linux
|
|
|
|
mandir="\${prefix}/share/man"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [irix*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# SGI IRIX
|
|
|
|
mandir="\${prefix}/share/catman"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2001-02-12 18:12:14 +03:00
|
|
|
|
2001-10-18 22:53:20 +04:00
|
|
|
dnl Fix "libdir" variable...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test "$prefix" = NONE], [
|
2001-11-28 01:03:29 +03:00
|
|
|
prefix=/usr/local
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2001-10-19 00:47:10 +04:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test "$exec_prefix" = NONE], [
|
2001-12-30 07:45:34 +03:00
|
|
|
exec_prefix="\${prefix}"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
|
|
|
AS_CASE([$host_os], [irix[1-5]*], [
|
|
|
|
], [irix*], [
|
|
|
|
AS_IF([test "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"], [
|
2021-02-16 16:21:13 +03:00
|
|
|
libdir="/usr/lib32"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
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"
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([MAKEDEPEND])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
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
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test -n "$GCC"], [
|
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.
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [darwin[1-7]], [
|
|
|
|
], [darwin*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
OPTIM="-Wno-deprecated-declarations $OPTIM"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2007-05-20 20:32:37 +04:00
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
# Set the default compiler optimizations...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
2020-07-01 19:03:10 +03:00
|
|
|
#
|
|
|
|
# Note: Can't use -fomit-frame-pointer - prevents tools like
|
|
|
|
# libsafe from working!
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# "-Os" seems to be the best compromise between speed and
|
|
|
|
# code size. "-O3" and higher seem to make no effective
|
|
|
|
# difference in the speed of the code, but does bloat the
|
|
|
|
# library 10+%.
|
|
|
|
#
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test "x$with_optim" != x], [
|
2020-07-01 19:03:10 +03:00
|
|
|
OPTIM="$with_optim $OPTIM"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2020-07-01 19:03:10 +03:00
|
|
|
OPTIM="-Os $OPTIM"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2002-01-13 22:17:36 +03:00
|
|
|
|
|
|
|
# Generate position-independent code when needed...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test $PICFLAG = 1], [
|
2020-07-01 19:03:10 +03:00
|
|
|
OPTIM="$OPTIM -fPIC"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
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:33:05 +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-10-01 00:44:04 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
2020-07-01 19:03:10 +03:00
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[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:33:05 +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-10-01 00:44:04 +03:00
|
|
|
AC_COMPILE_IFELSE(
|
2020-07-01 19:03:10 +03:00
|
|
|
[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"
|
|
|
|
|
2022-08-24 16:09:30 +03:00
|
|
|
dnl Make sure that shared libraries don't have undefined references
|
|
|
|
# See if ld supports -no-undefined...
|
|
|
|
AC_MSG_CHECKING([if ld supports -no-undefined])
|
|
|
|
OLDLDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -Wl,-no-undefined"
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[DSOFLAGS="$DSOFLAGS -Wl,-no-undefined"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_RESULT(no)])
|
|
|
|
LDFLAGS="$OLDLDFLAGS"
|
2015-02-17 15:47:07 +03:00
|
|
|
|
2014-08-21 16:08:02 +04:00
|
|
|
# See if ld supports -Bsymbolic-functions...
|
2016-08-01 11:33:05 +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-10-01 00:44:04 +03:00
|
|
|
AC_LINK_IFELSE(
|
2020-07-01 19:03:10 +03:00
|
|
|
[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:33:05 +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-10-01 00:44:04 +03:00
|
|
|
AC_LINK_IFELSE(
|
2020-07-01 19:03:10 +03:00
|
|
|
[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...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [solaris*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AC_MSG_CHECKING([if GCC supports -fpermissive])
|
2021-02-14 05:22:03 +03:00
|
|
|
|
2021-02-16 16:21:13 +03:00
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fpermissive"
|
|
|
|
AC_COMPILE_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[]], [[]])],
|
|
|
|
[CXXFLAGS="$CXXFLAGS -fpermissive"
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
[CFLAGS="$OLDCFLAGS"
|
|
|
|
AC_MSG_RESULT(no)])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
], [
|
|
|
|
AS_CASE(["$host_os"], [irix*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Running some flavor of IRIX; see which version and
|
|
|
|
# set things up according...
|
|
|
|
AS_IF([test "$uversion" -ge 62], [
|
|
|
|
# We are running IRIX 6.2 or higher; uncomment the following
|
|
|
|
# lines if you don't have IDO 7.2 or higher:
|
|
|
|
#
|
|
|
|
# CXX="CC -n32 -mips3"
|
|
|
|
# CC="cc -n32 -mips3"
|
|
|
|
# LD="ld -n32 -mips3"
|
|
|
|
# MAKEDEPEND="CC -M"
|
|
|
|
|
|
|
|
AS_IF([test "x`grep abi=n32 /etc/compiler.defaults`" = x], [
|
|
|
|
AC_MSG_WARN([FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI "-n32 -mips3"])
|
|
|
|
])
|
|
|
|
|
|
|
|
OPTIM="-fullwarn $OPTIM"
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
|
|
|
AS_IF([test "x$with_optim" != x], [
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
], [
|
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
AS_IF([test $uversion -gt 62], [
|
|
|
|
OPTIM="-OPT:Olimit=4000 $OPTIM"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [hpux*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Running HP-UX; these options should work for the HP compilers.
|
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
|
|
|
AS_IF([test "x$with_optim" != x], [
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
], [
|
|
|
|
OPTIM="+O2 $OPTIM"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test $PICFLAG = 1], [
|
|
|
|
OPTIM="+z $OPTIM"
|
|
|
|
])
|
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS +W336,501,736,740,749,829"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [OSF1*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Running Digital/Tru64 UNIX; these options should work for the
|
|
|
|
# Digital/Compaq/NewHP compilers.
|
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
|
|
|
AS_IF([test "x$with_optim" != x], [
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
], [
|
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
])
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [solaris*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Solaris
|
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
|
|
|
AS_IF([test "x$with_optim" != x], [
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
], [
|
|
|
|
OPTIM="-xO3 $OPTIM"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test $PICFLAG = 1], [
|
|
|
|
OPTIM="-KPIC $OPTIM"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [aix*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
AS_IF([test -z "$DEBUGFLAG"], [
|
|
|
|
AS_IF([test "x$with_optim" != x], [
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
], [
|
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_MSG_WARN([The AIX C and C++ compilers are known not to correctly compile the FLTK library.])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [*], [
|
2021-02-16 16:21:13 +03:00
|
|
|
# Running some other operating system; inform the user they
|
|
|
|
# should contribute the necessary options via the STR form..
|
|
|
|
AC_MSG_WARN([Building FLTK with default compiler optimizations])
|
|
|
|
AC_MSG_WARN([Send the FLTK developers your uname and compiler options via https://www.fltk.org/bugs.php])
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
1998-11-05 19:04:53 +03:00
|
|
|
|
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)
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [darwin*], [
|
|
|
|
AS_IF([test "x$with_archflags" != x], [
|
2021-02-16 16:21:13 +03:00
|
|
|
CFLAGS="$(echo $CFLAGS | sed -e 's/$with_archflags//g')"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2011-02-24 13:27:33 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define the FLTK documentation directory...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [mingw*], [
|
|
|
|
# Determine the path where MSys has /usr installed
|
2021-02-15 02:09:15 +03:00
|
|
|
msyspath="$(mount | grep '/usr ' | cut -d ' ' -f -1 | sed -e's,\\,/, g')"
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
# Then substitute that in the Windows path instead of /usr
|
|
|
|
AC_DEFINE_UNQUOTED([FLTK_DOCDIR], "$msyspath/local/share/doc/fltk")
|
|
|
|
], [*], [
|
|
|
|
AS_IF([test x$prefix = xNONE], [
|
|
|
|
AC_DEFINE_UNQUOTED([FLTK_DOCDIR], "/usr/local/share/doc/fltk")
|
|
|
|
], [
|
|
|
|
AC_DEFINE_UNQUOTED([FLTK_DOCDIR], "$prefix/share/doc/fltk")
|
|
|
|
])
|
|
|
|
])
|
2001-08-11 20:09:26 +04:00
|
|
|
|
2002-04-28 20:41:17 +04:00
|
|
|
dnl Define the FLTK data directory...
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$prefix = xNONE], [
|
|
|
|
AC_DEFINE_UNQUOTED([FLTK_DATADIR], "/usr/local/share/fltk")
|
|
|
|
], [
|
|
|
|
AC_DEFINE_UNQUOTED([FLTK_DATADIR], "$prefix/share/fltk")
|
|
|
|
])
|
|
|
|
|
2002-04-28 20:41:17 +04:00
|
|
|
|
2007-11-21 00:52:54 +03:00
|
|
|
dnl Summarize results of configure tests...
|
|
|
|
echo ""
|
|
|
|
echo "Configuration Summary"
|
|
|
|
echo "-------------------------------------------------------------------------"
|
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os_gui], [cygwin* | mingw*], [
|
2021-02-26 20:00:07 +03:00
|
|
|
AS_IF([test x$gdiplus_found = xyes], [graphics="GDI+"], [graphics="GDI"])
|
2021-02-14 05:22:03 +03:00
|
|
|
], [darwin*], [
|
|
|
|
graphics="Quartz"
|
|
|
|
], [*], [
|
2022-11-18 11:10:22 +03:00
|
|
|
AS_IF([test x$enable_wayland = xno], [
|
2022-03-04 17:40:29 +03:00
|
|
|
graphics="X11"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$xft_found = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
graphics="$graphics + Xft"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$xfixes_found = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
graphics="$graphics + Xfixes"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$xinerama_found = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
graphics="$graphics + Xinerama"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$xcursor_found = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
graphics="$graphics + Xcursor"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$xrender_found = xyes], [
|
2021-02-16 16:21:13 +03:00
|
|
|
graphics="$graphics + Xrender"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2022-03-15 08:42:06 +03:00
|
|
|
AS_IF([test x$enable_usecairo = xyes], [
|
|
|
|
graphics="$graphics + Cairo"
|
|
|
|
])
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$pango_found = xyes], [
|
2021-02-16 15:53:35 +03:00
|
|
|
graphics="$graphics + Pango"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
])
|
2007-11-21 00:52:54 +03:00
|
|
|
|
|
|
|
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"
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_CASE([$host_os], [mingw*], [
|
2011-02-26 01:19:09 +03:00
|
|
|
echo " MSys docpath=$msyspath/local/share/doc/fltk"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl
|
|
|
|
echo "Cross-compiling: $fltk_cross_compiling"
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test "$fltk_cross_compiling" = "yes"], [
|
|
|
|
echo " Build: $build -> Host: $host"
|
|
|
|
])
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Graphics: $graphics"
|
2020-06-10 17:24:39 +03:00
|
|
|
dnl
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$JPEG = x], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo "Image Libraries: JPEG=System"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo "Image Libraries: JPEG=Builtin"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$PNG = x], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " PNG=System"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " PNG=Builtin"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$ZLIB = x], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " ZLIB=System"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " ZLIB=Builtin"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$enable_cairo = xyes], [
|
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"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
|
|
|
AS_IF([test x$enable_cairoext = xyes], [
|
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=internal_use"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2008-09-25 22:26:33 +04:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$enable_largefile != xno], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Large Files: YES"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Large Files: NO"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2007-11-21 00:52:54 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$GLDEMOS = x], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " OpenGL: NO"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " OpenGL: YES"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2007-11-21 00:52:54 +03:00
|
|
|
|
2021-02-14 05:22:03 +03:00
|
|
|
AS_IF([test x$THREADS = x], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Threads: NO"
|
2021-02-14 05:22:03 +03:00
|
|
|
], [
|
2007-11-21 00:52:54 +03:00
|
|
|
echo " Threads: YES"
|
2021-02-14 05:22:03 +03:00
|
|
|
])
|
2007-11-21 00:52:54 +03:00
|
|
|
|
2015-07-13 01:32:30 +03:00
|
|
|
dnl Set empty BINARY_DIR variable for fltk-config.in (CMake compatibility)
|
|
|
|
BINARY_DIR=
|
2021-02-14 05:22:03 +03:00
|
|
|
AC_SUBST([BINARY_DIR])
|
2015-07-13 01:32:30 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Write all of the files...
|
2021-02-07 04:05:50 +03:00
|
|
|
AC_CONFIG_HEADERS([config.h:configh.in])
|
2021-12-19 00:42:30 +03:00
|
|
|
AC_CONFIG_HEADERS([FL/fl_config.h:fl_config.in])
|
2016-10-01 00:44:04 +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
|