2000-04-27 04:17:54 +04:00
|
|
|
dnl -*- sh -*-
|
|
|
|
dnl the "configure" script is made from this by running GNU "autoconf"
|
|
|
|
dnl
|
2002-08-09 05:09:49 +04:00
|
|
|
dnl "$Id: configure.in,v 1.33.2.31.2.83 2002/08/09 01:09:47 easysw Exp $"
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
|
|
|
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
|
|
|
dnl
|
2002-01-01 18:11:33 +03:00
|
|
|
dnl Copyright 1998-2002 by Bill Spitzak and others.
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
|
|
|
dnl This library is free software; you can redistribute it and/or
|
|
|
|
dnl modify it under the terms of the GNU Library General Public
|
|
|
|
dnl License as published by the Free Software Foundation; either
|
|
|
|
dnl version 2 of the License, or (at your option) any later version.
|
|
|
|
dnl
|
|
|
|
dnl This library is distributed in the hope that it will be useful,
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
dnl Library General Public License for more details.
|
|
|
|
dnl
|
|
|
|
dnl You should have received a copy of the GNU Library General Public
|
|
|
|
dnl License along with this library; if not, write to the Free Software
|
|
|
|
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
dnl USA.
|
|
|
|
dnl
|
2000-06-06 01:21:24 +04:00
|
|
|
dnl Please report all bugs and problems to "fltk-bugs@fltk.org".
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-11-30 00:50:05 +03:00
|
|
|
dnl We need at least autoconf 2.13...
|
|
|
|
AC_PREREQ(2.13)
|
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
dnl Required file in package...
|
1998-12-07 17:35:53 +03:00
|
|
|
AC_INIT(src/Fl.cxx)
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2001-11-28 01:03:29 +03:00
|
|
|
dnl FLTK library versions...
|
|
|
|
FL_MAJOR_VERSION=1
|
|
|
|
FL_MINOR_VERSION=1
|
|
|
|
FL_PATCH_VERSION=0
|
2002-07-21 03:39:08 +04:00
|
|
|
FL_RELEASE_VERSION=rc5
|
2001-11-28 01:03:29 +03:00
|
|
|
FL_API_VERSION=${FL_MAJOR_VERSION}.${FL_MINOR_VERSION}
|
|
|
|
|
|
|
|
AC_SUBST(FL_MAJOR_VERSION)
|
|
|
|
AC_SUBST(FL_MINOR_VERSION)
|
|
|
|
AC_SUBST(FL_PATCH_VERSION)
|
|
|
|
AC_SUBST(FL_RELEASE_VERSION)
|
|
|
|
AC_SUBST(FL_API_VERSION)
|
|
|
|
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl Get the operating system and version number...
|
1999-02-22 23:53:35 +03:00
|
|
|
uname=`uname`
|
2001-11-01 19:55:12 +03:00
|
|
|
uversion=`uname -r | sed -e '1,$s/[[^0-9]]//g'`
|
2002-06-26 16:03:28 +04:00
|
|
|
if test x$uname = xIRIX64; then
|
1999-02-22 23:53:35 +03:00
|
|
|
uname="IRIX"
|
|
|
|
fi
|
2002-06-26 16:03:28 +04:00
|
|
|
if test x$uname = x; then
|
|
|
|
# MingW doesn't provide any output when uname is run, even with "-s"...
|
|
|
|
uname="CYGWIN"
|
|
|
|
fi
|
1999-02-22 23:53:35 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Don't automatically add "-g" to compiler options...
|
1999-02-01 22:40:25 +03:00
|
|
|
CFLAGS="${CFLAGS:=}"
|
2002-01-12 00:42:05 +03:00
|
|
|
CPPFLAGS="${CPPFLAGS:=}"
|
1999-02-01 22:40:25 +03:00
|
|
|
CXXFLAGS="${CXXFLAGS:=}"
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="${OPTIM:=}"
|
|
|
|
|
|
|
|
AC_SUBST(OPTIM)
|
1998-10-20 20:41:24 +04:00
|
|
|
|
2002-04-16 21:11:11 +04:00
|
|
|
dnl OS-specific pre-tests...
|
2001-11-22 16:56:10 +03:00
|
|
|
case $uname in
|
2002-07-10 06:47:14 +04:00
|
|
|
CYGWIN* | MINGW*)
|
2002-04-16 21:11:11 +04:00
|
|
|
# Handle Cygwin option *first*, before all other tests.
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the CygWin libraries [default=no]])
|
|
|
|
if test x$enable_cygwin != xyes; then
|
|
|
|
CFLAGS="$CFLAGS -mno-cygwin"
|
|
|
|
CPPFLAGS="$CPPFLAGS -mno-cygwin"
|
|
|
|
CXXFLAGS="$CXXFLAGS -mno-cygwin"
|
|
|
|
fi
|
2001-11-22 16:56:10 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define the libraries and link options we'll need.
|
|
|
|
LINKFLTK="-lfltk"
|
|
|
|
LINKFLTKGL="-lfltk_gl"
|
2002-06-29 01:04:37 +04:00
|
|
|
LINKFLTKIMG="-lfltk_images"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDEMOS="gldemos"
|
|
|
|
|
|
|
|
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"
|
2002-01-12 00:42:05 +03:00
|
|
|
|
2002-03-26 00:39:01 +03:00
|
|
|
AC_SUBST(FLLIBNAME)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(GLDEMOS)
|
|
|
|
AC_SUBST(GLLIBNAME)
|
2002-06-29 01:04:37 +04:00
|
|
|
AC_SUBST(IMGLIBNAME)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_SUBST(LIBNAME)
|
|
|
|
AC_SUBST(LINKFLTK)
|
|
|
|
AC_SUBST(LINKFLTKGL)
|
2002-06-29 01:04:37 +04:00
|
|
|
AC_SUBST(LINKFLTKIMG)
|
2002-01-12 00:42:05 +03:00
|
|
|
|
|
|
|
dnl Handle compile-time options...
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]])
|
|
|
|
if test x$enable_debug = xyes; then
|
2001-08-02 22:08:36 +04:00
|
|
|
DEBUGFLAG="-g "
|
2002-01-12 00:42:05 +03:00
|
|
|
else
|
|
|
|
DEBUGFLAG=""
|
|
|
|
fi
|
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [default=yes]])
|
2002-01-12 00:42:05 +03:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]])
|
|
|
|
if test x$enable_shared = xyes; then
|
|
|
|
PICFLAG=1
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX=""
|
|
|
|
FLUID="fluid-shared"
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
case $uname in
|
2002-04-16 21:11:11 +04:00
|
|
|
Darwin*)
|
2002-01-12 00:42:05 +03:00
|
|
|
DSONAME="libfltk.$FL_API_VERSION.dylib"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.$FL_API_VERSION.dylib"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.$FL_API_VERSION.dylib"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.$FL_API_VERSION.dylib"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="ld $DSOFLAGS -dylib /usr/lib/dylib1.o -lc"
|
|
|
|
if test "$libdir" != "/usr/lib"; then
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
SunOS* | UNIX_S*)
|
|
|
|
DSONAME="libfltk.so.$FL_API_VERSION"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="\$(CXX) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
|
|
|
|
if test "$libdir" != "/usr/lib"; then
|
|
|
|
DSOLINK="-R$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
HP-UX*)
|
|
|
|
DSONAME="libfltk.sl.$FL_API_VERSION"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.sl.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.sl.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.sl.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="ld -b -z +h \$@ $DEBUGFLAG -o"
|
|
|
|
if test "$libdir" != "/usr/lib"; then
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
2002-05-19 21:44:56 +04:00
|
|
|
IRIX*)
|
|
|
|
DSONAME="libfltk.so.$FL_API_VERSION"
|
|
|
|
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
|
|
|
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
2002-05-19 21:44:56 +04:00
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@,-set_version,sgi1.1 \$(LDLIBS) -shared $DEBUGFLAG -o"
|
|
|
|
if test "$libdir" != "/usr/lib" - a "$libdir" != "/usr/lib32"; then
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
OSF1*)
|
2002-01-12 00:42:05 +03:00
|
|
|
DSONAME="libfltk.so.$FL_API_VERSION"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
|
|
|
if test "$libdir" != "/usr/lib" - a "$libdir" != "/usr/lib32"; then
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
2002-04-16 21:11:11 +04:00
|
|
|
Linux* | *BSD*)
|
2002-01-12 00:42:05 +03:00
|
|
|
DSONAME="libfltk.so.$FL_API_VERSION"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
|
|
|
|
if test "$libdir" != "/usr/lib"; then
|
|
|
|
DSOLINK="-Wl,-rpath,$libdir"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
AIX*)
|
|
|
|
DSONAME="libfltk_s.a"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms_s.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl_s.a"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images_s.a"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX="_s"
|
2002-01-12 00:42:05 +03:00
|
|
|
;;
|
2002-07-10 06:47:14 +04:00
|
|
|
CYGWIN* | MINGW*)
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_MSG_WARN(Shared libraries are not supported under CygWin.)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_WARN(Shared libraries may not be supported. Trying -shared option with compiler.)
|
|
|
|
DSONAME="libfltk.so.$FL_API_VERSION"
|
2002-03-26 00:39:01 +03:00
|
|
|
FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
|
2002-06-29 01:04:37 +04:00
|
|
|
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
|
2002-01-12 00:42:05 +03:00
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
|
|
|
;;
|
|
|
|
esac
|
2002-07-14 21:03:31 +04:00
|
|
|
|
|
|
|
LINKSHARED="-L../src -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=""
|
2002-01-12 00:42:05 +03:00
|
|
|
PICFLAG=0
|
2002-07-14 21:03:31 +04:00
|
|
|
SHAREDSUFFIX=""
|
|
|
|
FLUID="fluid"
|
|
|
|
LINKSHARED="-L../lib -lfltk_images -lfltk_forms -lfltk"
|
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)
|
|
|
|
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)
|
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
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
AC_ARG_ENABLE(threads, [ --enable-threads enable multi-threading support])
|
|
|
|
|
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
|
|
|
|
|
|
|
dnl Find commands...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl AC_PROG_INSTALL
|
2001-02-12 18:12:14 +03:00
|
|
|
AC_PATH_PROG(NROFF,nroff)
|
|
|
|
if test "$NROFF" = ""; then
|
|
|
|
AC_PATH_PROG(GROFF,groff)
|
|
|
|
if test "$GROFF" = ""; then
|
|
|
|
NROFF="echo"
|
|
|
|
else
|
|
|
|
NROFF="$GROFF -T ascii"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_PATH_PROG(HTMLDOC,htmldoc)
|
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
|
|
|
|
AC_PATH_PROG(AR, ar)
|
|
|
|
|
2002-04-10 20:26:33 +04:00
|
|
|
if test "x$AR" = "x:"; then
|
|
|
|
AC_MSG_ERROR(Configure could not find the library archiver, aborting.)
|
|
|
|
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)
|
|
|
|
|
|
|
|
dnl Architecture checks...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_C_BIGENDIAN
|
|
|
|
|
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
|
|
|
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
|
|
|
|
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
|
1999-02-18 18:05:50 +03:00
|
|
|
if test $ac_cv_sizeof_long -eq 4; then
|
|
|
|
AC_DEFINE(U32,unsigned long)
|
|
|
|
fi
|
1998-10-06 22:21:25 +04:00
|
|
|
fi
|
|
|
|
if test $ac_cv_sizeof_int -eq 8; then
|
1999-02-18 18:05:50 +03:00
|
|
|
AC_DEFINE(U64,unsigned)
|
1998-10-06 22:21:25 +04:00
|
|
|
else
|
1999-02-18 18:05:50 +03:00
|
|
|
if test $ac_cv_sizeof_long -eq 8; then
|
|
|
|
AC_DEFINE(U64,unsigned long)
|
|
|
|
fi
|
1998-10-06 22:21:25 +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
|
2001-04-27 21:00:23 +04:00
|
|
|
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H))
|
|
|
|
AC_CHECK_HEADER(sys/stdtypes.h,AC_DEFINE(HAVE_SYS_SELECT_H))
|
1999-08-09 17:35:04 +04:00
|
|
|
AC_CHECK_FUNC(scandir,
|
2001-02-12 18:12:14 +03:00
|
|
|
if test "$uname" = SunOS -o "$uname" = QNX; then
|
2001-11-22 16:56:10 +03:00
|
|
|
AC_MSG_WARN(Not using $uname scandir emulation function.)
|
1999-08-09 17:35:04 +04:00
|
|
|
else
|
1999-02-18 18:05:50 +03:00
|
|
|
AC_DEFINE(HAVE_SCANDIR)
|
|
|
|
fi)
|
1999-08-09 17:35:04 +04:00
|
|
|
AC_CHECK_FUNC(vsnprintf,
|
|
|
|
if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
|
2001-11-22 16:56:10 +03:00
|
|
|
AC_MSG_WARN(Not using built-in vsnprintf function because you are running HP-UX 10.20.)
|
1999-08-09 17:35:04 +04:00
|
|
|
else
|
1999-02-22 23:53:35 +03:00
|
|
|
AC_DEFINE(HAVE_VSNPRINTF)
|
|
|
|
fi)
|
1999-08-09 17:35:04 +04:00
|
|
|
AC_CHECK_FUNC(snprintf,
|
|
|
|
if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then
|
2001-11-22 16:56:10 +03:00
|
|
|
AC_MSG_WARN(Not using built-in snprintf function because you are running HP-UX 10.20.)
|
1999-08-09 17:35:04 +04:00
|
|
|
else
|
1999-02-22 23:53:35 +03:00
|
|
|
AC_DEFINE(HAVE_SNPRINTF)
|
|
|
|
fi)
|
2001-11-28 01:03:29 +03:00
|
|
|
AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H))
|
2002-05-16 16:47:44 +04:00
|
|
|
AC_CHECK_FUNCS(strcasecmp strlcat strlcpy)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
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
|
|
|
|
2001-08-02 23:43:49 +04:00
|
|
|
dnl Check for image libraries...
|
|
|
|
SAVELIBS="$LIBS"
|
|
|
|
IMAGELIBS=""
|
|
|
|
|
|
|
|
AC_SUBST(IMAGELIBS)
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(jpeglib.h,
|
|
|
|
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
|
|
|
AC_DEFINE(HAVE_LIBJPEG)
|
|
|
|
IMAGELIBS="$IMAGELIBS -ljpeg"))
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(zlib.h,
|
|
|
|
AC_CHECK_LIB(z, gzopen,
|
|
|
|
AC_DEFINE(HAVE_LIBZ)
|
|
|
|
IMAGELIBS="$IMAGELIBS -lz"
|
|
|
|
LIBS="$LIBS -lz"))
|
|
|
|
|
2002-04-24 22:29:06 +04:00
|
|
|
AC_CHECK_HEADER(png.h, AC_DEFINE(HAVE_PNG_H))
|
|
|
|
AC_CHECK_HEADER(libpng/png.h, AC_DEFINE(HAVE_LIBPNG_PNG_H))
|
|
|
|
|
|
|
|
if test x$ac_cv_header_png_h = xyes -o x$ac_cv_header_libpng_png_h = xyes; then
|
2001-08-02 23:43:49 +04:00
|
|
|
AC_CHECK_LIB(png, png_read_rows,
|
|
|
|
AC_DEFINE(HAVE_LIBPNG)
|
2001-11-20 23:10:59 +03:00
|
|
|
IMAGELIBS="-lpng $IMAGELIBS"
|
|
|
|
LIBS="-lpng $LIBS"
|
2002-08-05 21:50:25 +04:00
|
|
|
AC_CHECK_FUNCS(png_get_valid png_set_tRNS_to_alpha))
|
2002-04-24 22:29:06 +04:00
|
|
|
fi
|
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
|
|
|
|
|
2001-12-15 00:02:24 +03:00
|
|
|
if test x"$enable_threads" = xyes; then
|
2001-12-09 23:26:24 +03:00
|
|
|
AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H))
|
2002-01-12 00:42:05 +03:00
|
|
|
AC_CHECK_LIB(pthread, pthread_create)
|
2001-12-17 18:36:28 +03:00
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
if test x"$ac_cv_lib_pthread_pthread_create" = xyes -a x$ac_cv_header_pthread_h = xyes; then
|
2001-12-17 18:36:28 +03:00
|
|
|
have_pthread=yes
|
|
|
|
else
|
|
|
|
dnl *BSD uses -pthread option...
|
|
|
|
AC_MSG_CHECKING([for pthread_create using -pthread])
|
|
|
|
SAVELIBS="$LIBS"
|
|
|
|
LIBS="-pthread $LIBS"
|
|
|
|
AC_TRY_LINK([#include <pthread.h>],
|
|
|
|
[pthread_create(0, 0, 0, 0);],
|
|
|
|
LIBS="-pthread $SAVELIBS"
|
|
|
|
have_pthread=yes,
|
|
|
|
LIBS="$SAVELIBS")
|
|
|
|
AC_MSG_RESULT([$have_pthread])
|
|
|
|
fi
|
2001-12-09 23:26:24 +03:00
|
|
|
fi
|
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define OS-specific stuff...
|
|
|
|
HLINKS=
|
2002-06-25 17:36:27 +04:00
|
|
|
POSTBUILD=:
|
2002-01-12 00:42:05 +03:00
|
|
|
THREADS=
|
2001-12-15 00:02:24 +03:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
case $uname in
|
2002-07-10 06:47:14 +04:00
|
|
|
CYGWIN* | MINGW*)
|
2001-11-17 18:55:36 +03:00
|
|
|
dnl Cygwin environment...
|
2002-04-09 13:22:15 +04:00
|
|
|
CFLAGS="-mwindows -DWIN32 $CFLAGS"
|
|
|
|
CXXFLAGS="-mwindows -DWIN32 $CXXFLAGS"
|
|
|
|
LDFLAGS="-mwindows $LDFLAGS"
|
2002-04-10 00:36:28 +04:00
|
|
|
LIBS="$LIBS -lole32 -luuid -lcomctl32 -lwsock32"
|
|
|
|
OPTIM="$OPTIM"
|
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,
|
|
|
|
AC_DEFINE(HAVE_GL)
|
|
|
|
GLLIB="-lopengl32")
|
|
|
|
AC_CHECK_HEADER(GL/glu.h,
|
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
|
|
|
GLLIB="-lglu32 $GLLIB")
|
|
|
|
else
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
|
|
|
fi
|
2001-12-04 22:57:45 +03:00
|
|
|
|
2002-04-16 21:11:11 +04:00
|
|
|
if test x$have_pthread = xyes; then
|
2001-12-09 23:26:24 +03:00
|
|
|
AC_DEFINE(HAVE_PTHREAD)
|
2001-12-15 00:02:24 +03:00
|
|
|
THREADS="threads.exe"
|
2001-12-09 23:26:24 +03:00
|
|
|
fi
|
|
|
|
|
2001-12-04 22:57:45 +03:00
|
|
|
# Don't make symlinks since Windows is not case sensitive.
|
|
|
|
HLINKS="#"
|
2001-11-17 18:55:36 +03:00
|
|
|
;;
|
2002-04-16 21:11:11 +04:00
|
|
|
|
2001-11-27 20:44:08 +03:00
|
|
|
Darwin*)
|
|
|
|
# MacOS X uses Carbon for graphics...
|
|
|
|
LIBS="$LIBS -framework Carbon -framework ApplicationServices"
|
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)
|
|
|
|
THREADS="threads"
|
|
|
|
fi
|
|
|
|
|
2001-11-27 20:44:08 +03:00
|
|
|
if test x$enable_gl != xno; then
|
2001-11-27 20:48:16 +03:00
|
|
|
AC_DEFINE(HAVE_GL)
|
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
2001-12-06 05:20:36 +03:00
|
|
|
GLLIB="-framework AGL -framework OpenGL"
|
2001-11-27 20:44:08 +03:00
|
|
|
else
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
|
|
|
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...
|
|
|
|
HLINKS="#"
|
2001-12-07 01:16:49 +03:00
|
|
|
|
2001-12-06 05:20:36 +03:00
|
|
|
# Add a postbuild step after linking applications
|
2001-12-14 22:34:30 +03:00
|
|
|
POSTBUILD="/Developer/Tools/Rez -t APPL -o"
|
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...
|
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)
|
2001-12-15 00:02:24 +03:00
|
|
|
THREADS="threads"
|
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
|
|
|
|
AC_MSG_ERROR(Configure could not find required X11 libraries, aborting.)
|
|
|
|
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
|
|
|
|
AC_MSG_WARN(Ignoring libraries \"$X_PRE_LIBS\" requested by configure.)
|
|
|
|
fi
|
2001-10-25 21:25:11 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
LIBS="$LIBS -lXext -lX11 $X_EXTRA_LIBS"
|
|
|
|
CFLAGS="$CFLAGS$X_CFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
|
|
|
|
LDFLAGS="$X_LIBS $LDFLAGS"
|
1998-10-06 22:21:25 +04:00
|
|
|
|
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,
|
|
|
|
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \
|
|
|
|
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGL",,\
|
|
|
|
-lm), \
|
|
|
|
-lm)
|
|
|
|
)
|
|
|
|
AC_CHECK_HEADER(GL/glu.h,
|
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
|
|
|
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
|
2001-11-17 18:55:36 +03:00
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
|
|
|
GLDEMOS=""
|
|
|
|
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
|
|
|
|
2002-03-06 22:42:30 +03:00
|
|
|
dnl Check for the Xft library unless disabled...
|
2002-03-08 04:18:09 +03:00
|
|
|
AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [default=no]])
|
2002-03-06 22:42:30 +03:00
|
|
|
|
2002-03-08 04:18:09 +03:00
|
|
|
if test x$enable_xft = xyes; then
|
2002-03-06 22:42:30 +03:00
|
|
|
AC_CHECK_HEADER(X11/Xft/Xft.h,
|
|
|
|
AC_CHECK_LIB(Xft, XftDrawCreate,
|
|
|
|
AC_DEFINE(USE_XFT)
|
|
|
|
LIBS="-lXft $LIBS"))
|
|
|
|
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...
|
|
|
|
AC_ARG_ENABLE(xdbe, [ --enable-xdbe turn on Xdbe support [default=no]])
|
|
|
|
|
|
|
|
if test x$enable_xdbe = xyes; then
|
2002-05-07 04:55:48 +04:00
|
|
|
AC_CHECK_HEADER(X11/extensions/Xdbe.h, AC_DEFINE(HAVE_XDBE),,
|
|
|
|
[#include <X11/Xlib.h>])
|
2002-04-10 20:26:33 +04:00
|
|
|
fi
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-11-17 18:55:36 +03:00
|
|
|
dnl Check for overlay visuals...
|
2002-01-13 22:17:36 +03:00
|
|
|
AC_CACHE_CHECK(for X overlay visuals, ac_cv_have_overlay,
|
2001-11-17 18:55:36 +03:00
|
|
|
if xprop -root 2>/dev/null | grep -c "SERVER_OVERLAY_VISUALS" >/dev/null; then
|
|
|
|
ac_cv_have_overlay=yes
|
|
|
|
else
|
|
|
|
ac_cv_have_overlay=no
|
|
|
|
fi)
|
2002-01-13 22:17:36 +03:00
|
|
|
|
|
|
|
if test x$ac_cv_have_overlay = xyes; then
|
|
|
|
AC_DEFINE(HAVE_OVERLAY)
|
|
|
|
fi
|
|
|
|
;;
|
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)
|
2001-12-06 05:20:36 +03:00
|
|
|
AC_SUBST(POSTBUILD)
|
2001-12-15 00:02:24 +03:00
|
|
|
AC_SUBST(THREADS)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-02-12 18:12:14 +03:00
|
|
|
dnl Figure out the appropriate formatted man page extension...
|
|
|
|
case "$uname" in
|
2001-11-27 20:44:08 +03:00
|
|
|
*BSD* | Darwin*)
|
2001-02-12 18:12:14 +03:00
|
|
|
# *BSD
|
|
|
|
CAT1EXT=0
|
|
|
|
CAT3EXT=0
|
|
|
|
;;
|
|
|
|
IRIX*)
|
|
|
|
# SGI IRIX
|
|
|
|
CAT1EXT=z
|
|
|
|
CAT3EXT=z
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# All others
|
|
|
|
CAT1EXT=1
|
|
|
|
CAT3EXT=3
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(CAT1EXT)
|
|
|
|
AC_SUBST(CAT3EXT)
|
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
|
2001-11-28 01:03:29 +03:00
|
|
|
case "$uname" in
|
|
|
|
*BSD* | Darwin* | Linux*)
|
|
|
|
# *BSD, Darwin, and Linux
|
|
|
|
mandir="\${prefix}/share/man"
|
|
|
|
;;
|
|
|
|
IRIX*)
|
|
|
|
# SGI IRIX
|
|
|
|
mandir="\${prefix}/share/catman"
|
|
|
|
;;
|
|
|
|
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
|
|
|
|
|
2001-12-30 07:45:34 +03:00
|
|
|
if test "$uname" = "IRIX" -a $uversion -ge 62 -a "$libdir" = "\${exec_prefix}/lib" -a "$exec_prefix" = "\${prefix}" -a "$prefix" = "/usr"; then
|
2001-11-28 01:03:29 +03:00
|
|
|
libdir="/usr/lib32"
|
2001-10-18 22:53:20 +04:00
|
|
|
fi
|
|
|
|
|
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
|
2001-11-01 17:54:06 +03:00
|
|
|
# Starting with GCC 3.0, you must link C++ programs against either
|
|
|
|
# libstdc++ (shared by default), or libsupc++ (always static). If
|
|
|
|
# you care about binary portability between Linux distributions,
|
|
|
|
# you need to either 1) build your own GCC with static C++ libraries
|
|
|
|
# or 2) link using gcc and libsupc++. We choose the latter since
|
2002-06-03 20:09:27 +04:00
|
|
|
# CUPS doesn't (currently) use any of the stdc++ library.
|
2001-10-23 15:42:23 +04:00
|
|
|
#
|
|
|
|
# Also, GCC 3.0.x still has problems compiling some code. You may
|
|
|
|
# or may not have success with it. USE 3.0.x WITH EXTREME CAUTION!
|
|
|
|
#
|
2001-11-01 17:54:06 +03:00
|
|
|
# Previous versions of GCC do not have the reliance on the stdc++
|
|
|
|
# or g++ libraries, so the extra supc++ library is not needed.
|
2001-10-23 15:42:23 +04:00
|
|
|
|
2002-06-03 20:09:27 +04:00
|
|
|
AC_MSG_CHECKING(if libsupc++ is required)
|
|
|
|
|
|
|
|
SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
|
2002-07-17 21:05:08 +04:00
|
|
|
case "$SUPC" in
|
|
|
|
libsupc++.a*)
|
|
|
|
# Library not found, so this is and older GCC...
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
;;
|
|
|
|
*)
|
2002-06-03 20:09:27 +04:00
|
|
|
# This is gcc 3.x, and it knows of libsupc++, so we need it
|
|
|
|
LIBS="$LIBS -lsupc++"
|
|
|
|
AC_MSG_RESULT(yes)
|
2002-07-17 21:05:08 +04:00
|
|
|
;;
|
|
|
|
esac
|
2001-10-23 15:42:23 +04:00
|
|
|
|
2001-11-01 17:54:06 +03:00
|
|
|
CXX="$CC"
|
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
# Show all warnings when compiling...
|
2002-08-09 05:09:49 +04:00
|
|
|
OPTIM="-Wall -Wshadow -Wconversion -Winline $OPTIM"
|
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
|
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!
|
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.
|
|
|
|
#
|
2001-11-28 01:03:29 +03:00
|
|
|
# "-O2" seems to be the best compromise between speed and
|
|
|
|
# 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
|
|
|
|
|
|
|
if test "x$with_optim" != x; then
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
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
|
2002-01-13 22:17:36 +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...
|
2001-11-01 19:43:38 +03:00
|
|
|
AC_MSG_CHECKING(if GCC supports -fno-exceptions)
|
2000-04-26 02:17:00 +04:00
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fno-exceptions"
|
2000-04-26 11:59:53 +04:00
|
|
|
AC_TRY_COMPILE(,,
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$OPTIM -fno-exceptions"
|
2001-11-01 17:54:06 +03:00
|
|
|
AC_MSG_RESULT(yes),
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(no))
|
2001-11-01 17:54:06 +03:00
|
|
|
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...
|
2001-11-01 17:54:06 +03:00
|
|
|
if test "$uname" = SunOS; then
|
2001-11-01 19:43:38 +03:00
|
|
|
AC_MSG_CHECKING(if GCC supports -fpermissive)
|
2000-04-26 16:55:29 +04:00
|
|
|
|
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fpermissive"
|
|
|
|
AC_TRY_COMPILE(,,
|
2001-12-19 22:23:32 +03:00
|
|
|
CXXFLAGS="$CXXFLAGS -fpermissive"
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(yes),
|
2001-12-19 22:23:32 +03:00
|
|
|
CFLAGS="$OLDCFLAGS"
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(no))
|
2000-04-26 16:55:29 +04:00
|
|
|
fi
|
1998-11-05 19:04:53 +03:00
|
|
|
else
|
2002-01-07 23:40:02 +03:00
|
|
|
case "$uname" in
|
1999-02-01 22:40:25 +03:00
|
|
|
IRIX*)
|
|
|
|
# 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
|
1999-02-01 22:40:25 +03:00
|
|
|
# We are running IRIX 6.2 or higher; uncomment the following
|
|
|
|
# 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
|
|
|
|
AC_MSG_WARN(FOR BEST RESULTS BEFORE COMPILING: setenv SGI_ABI \"-n32 -mips3\")
|
|
|
|
fi
|
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="-fullwarn $OPTIM"
|
1999-02-18 16:42:08 +03:00
|
|
|
fi
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2002-01-13 22:17:36 +03:00
|
|
|
if test "x$with_optim" != x; then
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2002-06-08 00:15:17 +04:00
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
if test $uversion -gt 62; then
|
|
|
|
OPTIM="-OPT:Olimit=4000 $OPTIM"
|
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
fi
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
|
|
|
;;
|
1999-02-22 23:53:35 +03:00
|
|
|
HP-UX*)
|
1999-02-01 22:40:25 +03:00
|
|
|
# Running HP-UX; these options should work for the HP compilers.
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2002-01-13 22:17:36 +03:00
|
|
|
if test "x$with_optim" != x; then
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
2002-02-15 21:15:46 +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-02-15 21:15:46 +03:00
|
|
|
if test "x$with_optim" = x; then
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$OPTIM +DAportable"
|
|
|
|
fi
|
|
|
|
|
2002-04-26 16:39:32 +04:00
|
|
|
if test $PICFLAG = 1; then
|
|
|
|
OPTIM="+z $OPTIM"
|
|
|
|
fi
|
|
|
|
|
2002-01-13 22:17:36 +03:00
|
|
|
OPTIM="$OPTIM +W336,501,736,740,749,829"
|
1999-02-01 22:40:25 +03:00
|
|
|
;;
|
1999-05-19 23:07:15 +04:00
|
|
|
SunOS*)
|
|
|
|
# Solaris
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2002-01-13 22:17:36 +03:00
|
|
|
if test "x$with_optim" != x; then
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
|
|
|
OPTIM="-xO3 $OPTIM"
|
|
|
|
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
|
|
|
|
;;
|
2001-04-13 23:13:14 +04:00
|
|
|
AIX*)
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2002-01-13 22:17:36 +03:00
|
|
|
if test "x$with_optim" != x; then
|
|
|
|
OPTIM="$with_optim $OPTIM"
|
|
|
|
else
|
|
|
|
OPTIM="-O2 $OPTIM"
|
|
|
|
fi
|
2001-04-13 23:13:14 +04:00
|
|
|
fi
|
2002-01-13 22:17:36 +03:00
|
|
|
|
2001-11-22 16:56:10 +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
|
2000-06-06 01:21:24 +04:00
|
|
|
# should contribute the necessary options to fltk-bugs@fltk.org...
|
2001-11-22 16:56:10 +03:00
|
|
|
AC_MSG_WARN(Building FLTK with default compiler optimizations)
|
|
|
|
AC_MSG_WARN(Contact fltk-bugs@fltk.org with uname and compiler options.)
|
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
|
|
|
|
2002-01-12 00:42:05 +03:00
|
|
|
dnl Define the FLTK documentation directory...
|
2001-08-11 20:09:26 +04:00
|
|
|
if test x$prefix = xNONE; then
|
2001-11-28 01:03:29 +03:00
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "/usr/local/share/doc/fltk")
|
2001-08-11 20:09:26 +04:00
|
|
|
else
|
2001-11-28 01:03:29 +03:00
|
|
|
AC_DEFINE_UNQUOTED(FLTK_DOCDIR, "$prefix/share/doc/fltk")
|
2001-08-11 20:09:26 +04:00
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
|
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)
|
2001-12-03 21:57:45 +03:00
|
|
|
AC_OUTPUT(makeinclude fltk.list fltk-config FL/Makefile)
|
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
|
2002-08-09 05:09:49 +04:00
|
|
|
dnl End of "$Id: configure.in,v 1.33.2.31.2.83 2002/08/09 01:09:47 easysw Exp $".
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|