2000-04-27 04:17:54 +04:00
|
|
|
dnl -*- sh -*-
|
|
|
|
dnl the "configure" script is made from this by running GNU "autoconf"
|
|
|
|
dnl
|
2001-08-08 16:47:59 +04:00
|
|
|
dnl "$Id: configure.in,v 1.33.2.31.2.6 2001/08/08 12:47:59 easysw Exp $"
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
|
|
|
dnl Configuration script for the Fast Light Tool Kit (FLTK).
|
|
|
|
dnl
|
2001-01-22 18:13:41 +03:00
|
|
|
dnl Copyright 1998-2001 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
|
|
|
|
1998-12-07 17:35:53 +03:00
|
|
|
AC_INIT(src/Fl.cxx)
|
1998-10-20 20:41:24 +04:00
|
|
|
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
|
2001-08-02 22:08:36 +04:00
|
|
|
LINKFLTK="-lfltk"
|
|
|
|
LINKFLTKGL="-lfltkgl"
|
2001-08-02 22:15:44 +04:00
|
|
|
GLDEMOS="gldemos"
|
2001-08-02 22:08:36 +04:00
|
|
|
|
|
|
|
LIBNAME="../lib/libfltk.a"
|
|
|
|
GLLIBNAME="../lib/libfltkgl.a"
|
1998-10-20 20:41:24 +04:00
|
|
|
if test "$RANLIB" != ":"; then
|
1998-11-05 19:04:53 +03:00
|
|
|
LIBCOMMAND="ar cr"
|
1998-10-20 20:41:24 +04:00
|
|
|
else
|
1998-11-05 19:04:53 +03:00
|
|
|
LIBCOMMAND="ar crs"
|
1998-10-20 20:41:24 +04:00
|
|
|
fi
|
1999-03-09 22:24:42 +03:00
|
|
|
DSOCOMMAND="echo"
|
1999-03-25 18:26:44 +03:00
|
|
|
DSONAME=""
|
1998-10-20 20:41:24 +04:00
|
|
|
|
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`
|
2000-04-26 02:17:00 +04:00
|
|
|
uversion=`uname -r | sed -e 's/-.*$//g;s/[\.]//g'`
|
1999-02-22 23:53:35 +03:00
|
|
|
if test "$uname" = "IRIX64"; then
|
|
|
|
uname="IRIX"
|
|
|
|
fi
|
|
|
|
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl Clear debugging flags and only enable debugging if the user asks for
|
|
|
|
dnl it.
|
1999-02-01 22:40:25 +03:00
|
|
|
|
1998-12-02 18:39:39 +03:00
|
|
|
DEBUGFLAG=""
|
1999-03-04 17:48:08 +03:00
|
|
|
PICFLAG=0
|
1999-02-01 22:40:25 +03:00
|
|
|
CFLAGS="${CFLAGS:=}"
|
|
|
|
CXXFLAGS="${CXXFLAGS:=}"
|
1998-10-20 20:41:24 +04:00
|
|
|
|
1999-02-01 22:40:25 +03:00
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],[if eval "test x$enable_debug = xyes"; then
|
2001-08-02 22:08:36 +04:00
|
|
|
DEBUGFLAG="-g "
|
1999-02-01 22:40:25 +03:00
|
|
|
fi])
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_ARG_ENABLE(gl, [ --enable-gl turn on OpenGL support [default=yes]])
|
1998-10-21 18:00:53 +04:00
|
|
|
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],[
|
|
|
|
if eval "test x$enable_shared = xyes"; then
|
2001-08-02 22:08:36 +04:00
|
|
|
PICFLAG=1
|
|
|
|
case $uname in
|
|
|
|
SunOS* | UNIX_S*)
|
|
|
|
DSONAME="libfltk.so.1.1"
|
|
|
|
GLDSONAME="libfltkgl.so.1.1"
|
|
|
|
DSOCOMMAND="\$(CXX) -h \$@ \$(LDLIBS) -G $DEBUGFLAG -o"
|
|
|
|
;;
|
|
|
|
HP-UX*)
|
|
|
|
DSONAME="libfltk.sl.1.1"
|
|
|
|
GLDSONAME="libfltkgl.sl.1.1"
|
|
|
|
DSOCOMMAND="ld -b -z +h \$@ $DEBUGFLAG -o"
|
|
|
|
;;
|
2001-08-05 19:34:28 +04:00
|
|
|
IRIX* | OSF1*)
|
2001-08-02 22:08:36 +04:00
|
|
|
DSONAME="libfltk.so.1.1"
|
|
|
|
GLDSONAME="libfltkgl.so.1.1"
|
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
2001-08-05 20:10:09 +04:00
|
|
|
;;
|
2001-08-05 19:34:28 +04:00
|
|
|
FreeBSD* | NetBSD* | OpenBSD*)
|
|
|
|
DSONAME="libfltk.so.1.1"
|
|
|
|
GLDSONAME="libfltkgl.so.1.1"
|
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
|
2001-08-02 22:08:36 +04:00
|
|
|
;;
|
|
|
|
AIX*)
|
|
|
|
DSONAME="libfltk_s.a"
|
|
|
|
GLDSONAME="libfltkgl_s.a"
|
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-bexpall,-bM:SRE,-bnoentry -o"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Warning: shared libraries may not be supported. Trying -shared"
|
|
|
|
echo " option with compiler."
|
|
|
|
DSONAME="libfltk.so.1.1"
|
|
|
|
GLDSONAME="libfltkgl.so.1.1"
|
|
|
|
DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared $DEBUGFLAG -o"
|
|
|
|
;;
|
|
|
|
esac
|
1998-10-21 18:00:53 +04:00
|
|
|
fi])
|
1998-10-20 20:41:24 +04:00
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
echo 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
|
|
|
|
echo Not using built-in vsnprintf function because you are running HP-UX 10.20.
|
|
|
|
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
|
|
|
|
echo Not using built-in snprintf function because you are running HP-UX 10.20.
|
|
|
|
else
|
1999-02-22 23:53:35 +03:00
|
|
|
AC_DEFINE(HAVE_SNPRINTF)
|
|
|
|
fi)
|
2000-11-20 22:02:20 +03:00
|
|
|
AC_CHECK_FUNCS(vsprintf)
|
2001-04-27 21:00:23 +04:00
|
|
|
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
|
2000-11-20 22:02:20 +03:00
|
|
|
AC_CHECK_FUNCS(strcasecmp)
|
1998-10-06 22:21:25 +04: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"))
|
|
|
|
|
|
|
|
dnl PNG library uses math library functions...
|
|
|
|
AC_CHECK_LIB(m, pow)
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(png.h,
|
|
|
|
AC_CHECK_LIB(png, png_read_rows,
|
|
|
|
AC_DEFINE(HAVE_LIBPNG)
|
|
|
|
IMAGELIBS="-lpng -lm$IMAGELIBS"
|
|
|
|
LIBS="-lpng -lm $LIBS"
|
|
|
|
AC_CHECK_FUNCS(png_get_valid)))
|
|
|
|
|
|
|
|
dnl Restore original LIBS settings...
|
|
|
|
LIBS="$SAVELIBS"
|
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
dnl Check for X11...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_PATH_XTRA
|
2001-04-25 17:34:43 +04:00
|
|
|
|
|
|
|
if test x$no_x = xyes; then
|
|
|
|
AC_MSG_ERROR(Configure could not find required X11 libraries, aborting.)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$X_PRE_LIBS" != x; then
|
|
|
|
AC_MSG_WARN(Ignoring libraries \"$X_PRE_LIBS\" requested by configure.)
|
|
|
|
fi
|
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
LIBS="$LIBS$X_LIBS"
|
2000-10-22 00:01:56 +04:00
|
|
|
CFLAGS="$CFLAGS$X_CFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS$X_CFLAGS"
|
2001-08-05 19:34:28 +04:00
|
|
|
ac_cpp="$ac_cpp -I$x_includes"
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
dnl Check for OpenGL unless disabled...
|
1998-10-06 22:21:25 +04:00
|
|
|
GLLIB=
|
2001-04-25 17:34:43 +04:00
|
|
|
|
|
|
|
if test x$enable_gl != xno; then
|
|
|
|
AC_CHECK_HEADER(GL/gl.h,
|
2001-04-30 21:17:01 +04:00
|
|
|
AC_CHECK_LIB(GL, glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB="-lGL", \
|
|
|
|
AC_CHECK_LIB(MesaGL,glXMakeCurrent, AC_DEFINE(HAVE_GL) GLLIB=" -lMesaGL",,\
|
2001-04-25 17:34:43 +04:00
|
|
|
-lX11 -lXext $X_EXTRA_LIBS -lm), \
|
|
|
|
-lX11 -lXext $X_EXTRA_LIBS -lm)
|
|
|
|
)
|
2001-04-30 21:17:01 +04:00
|
|
|
AC_CHECK_HEADER(GL/glu.h,
|
|
|
|
AC_DEFINE(HAVE_GL_GLU_H)
|
2001-05-07 18:34:22 +04:00
|
|
|
if test x$ac_cv_lib_GL_glXMakeCurrent = xyes; then
|
2001-04-30 21:17:01 +04:00
|
|
|
GLLIB="-lGLU $GLLIB"
|
|
|
|
fi
|
2001-05-07 18:34:22 +04:00
|
|
|
if test x$ac_cv_lib_MesaGL_glXMakeCurrent = xyes; then
|
2001-04-30 21:17:01 +04:00
|
|
|
GLLIB="-lMesaGLU $GLLIB"
|
|
|
|
fi
|
|
|
|
)
|
2001-08-02 22:08:36 +04:00
|
|
|
|
|
|
|
if test x$ac_cv_lib_GL_glXMakeCurrent = xno; then
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
2001-08-02 22:15:44 +04:00
|
|
|
GLDEMOS=""
|
2001-08-02 22:08:36 +04:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
LINKFLTKGL=""
|
|
|
|
GLLIBNAME=""
|
|
|
|
GLDSONAME=""
|
2001-08-02 22:15:44 +04:00
|
|
|
GLDEMOS=""
|
2001-04-25 17:34:43 +04:00
|
|
|
fi
|
|
|
|
|
2001-08-02 22:15:44 +04:00
|
|
|
AC_SUBST(GLDEMOS)
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_SUBST(GLLIB)
|
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
dnl Check for the Xdbe extension...
|
1999-02-22 23:53:35 +03:00
|
|
|
AC_CHECK_HEADER(X11/extensions/Xdbe.h, \
|
1999-04-30 10:41:11 +04:00
|
|
|
if test "$uname" != "SunOS"; then
|
1999-02-22 23:53:35 +03:00
|
|
|
AC_DEFINE(HAVE_XDBE)
|
|
|
|
fi)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2001-04-25 17:34:43 +04:00
|
|
|
dnl Check for overlay visuals...
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_CACHE_CHECK("for X overlay visuals", ac_cv_have_overlay,
|
1998-12-02 18:39:39 +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)
|
2000-04-26 18:14:41 +04:00
|
|
|
|
2001-05-07 18:34:22 +04:00
|
|
|
if test x$ac_cv_have_overlay = xyes; then
|
2000-06-06 18:48:17 +04:00
|
|
|
AC_DEFINE(HAVE_OVERLAY)
|
|
|
|
fi
|
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
|
|
|
|
FreeBSD* | NetBSD* | OpenBSD*)
|
|
|
|
# *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
|
|
|
|
case "$uname" in
|
|
|
|
FreeBSD* | NetBSD* | OpenBSD*)
|
|
|
|
# *BSD
|
|
|
|
mandir="/usr/share/man"
|
|
|
|
;;
|
|
|
|
IRIX*)
|
|
|
|
# SGI IRIX
|
|
|
|
mandir="/usr/share/catman"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# All others
|
|
|
|
mandir="/usr/man"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
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
|
|
|
MAKEDEPEND="\$(CXX) -M"
|
|
|
|
|
1998-11-05 19:04:53 +03:00
|
|
|
if test -n "$GXX"; then
|
2001-04-25 17:34:43 +04:00
|
|
|
# Use gcc instead of c++ or g++, since we don't need the C++
|
2001-08-02 22:08:36 +04:00
|
|
|
# library to depend on... Note that this doesn't work with
|
|
|
|
# GCC 3.0, but then again not much *does* work with GCC 3.0...
|
2001-04-25 17:34:43 +04:00
|
|
|
CXX="$CC"
|
1998-11-05 19:04:53 +03:00
|
|
|
CFLAGS="-Wall $CFLAGS"
|
2000-10-22 00:01:56 +04:00
|
|
|
CXXFLAGS="-Wall $CXXFLAGS"
|
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.
|
|
|
|
#
|
2000-10-22 00:01:56 +04:00
|
|
|
CFLAGS="-O2 $CFLAGS"
|
|
|
|
CXXFLAGS="-O2 $CXXFLAGS"
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
1999-03-04 17:48:08 +03:00
|
|
|
if test $PICFLAG = 1; then
|
|
|
|
CFLAGS="-fPIC $CFLAGS"
|
|
|
|
CXXFLAGS="-fPIC $CXXFLAGS"
|
|
|
|
fi
|
2000-04-26 16:55:29 +04:00
|
|
|
|
2000-04-26 02:17:00 +04:00
|
|
|
# See if GCC supports -fno-exceptions...
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_CHECKING(Testing 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(,,
|
2000-04-26 02:17:00 +04:00
|
|
|
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(yes; disabling them for FLTK...),
|
2000-04-26 02:17:00 +04:00
|
|
|
CFLAGS="$OLDCFLAGS"
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(no))
|
2000-04-26 16:55:29 +04:00
|
|
|
|
|
|
|
# See if we are running Solaris; if so, try the -fpermissive option...
|
|
|
|
if test $uname = SunOS; then
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_CHECKING(Testing if GCC supports -fpermissive...)
|
2000-04-26 16:55:29 +04:00
|
|
|
|
|
|
|
OLDCFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS -fpermissive"
|
|
|
|
AC_TRY_COMPILE(,,
|
|
|
|
CXXFLAGS="$CXXFLAGS -fpermissive"
|
2001-04-25 17:34:43 +04:00
|
|
|
AC_MSG_RESULT(yes),
|
2000-04-26 16:55:29 +04: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
|
1999-02-01 22:40:25 +03:00
|
|
|
case `(uname) 2>/dev/null` in
|
|
|
|
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
|
|
|
|
|
1999-02-01 22:40:25 +03:00
|
|
|
CFLAGS="-fullwarn $CFLAGS"
|
2000-10-22 00:01:56 +04:00
|
|
|
CXXFLAGS="-fullwarn $CXXFLAGS"
|
1999-02-01 22:40:25 +03:00
|
|
|
else
|
|
|
|
CXXFLAGS="+w +pp $CXXFLAGS"
|
1999-02-18 16:42:08 +03:00
|
|
|
fi
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
|
|
|
CFLAGS="-O2 $CFLAGS"
|
|
|
|
CXXFLAGS="-O2 $CXXFLAGS"
|
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
|
|
|
|
CFLAGS="+O2 $CFLAGS"
|
1999-02-22 23:53:35 +03:00
|
|
|
CXXFLAGS="+O2 +W336,501,736,740,749,829 $CXXFLAGS"
|
1999-02-01 22:40:25 +03:00
|
|
|
fi
|
2001-08-08 16:47:59 +04:00
|
|
|
CFLAGS="+DAportable $CFLAGS"
|
|
|
|
CXXFLAGS="+DAportable $CXXFLAGS"
|
1999-02-01 22:40:25 +03:00
|
|
|
;;
|
1999-05-19 23:07:15 +04:00
|
|
|
SunOS*)
|
|
|
|
# Solaris
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
2000-11-10 00:53:00 +03:00
|
|
|
CFLAGS="-xO3"
|
|
|
|
CXXFLAGS="-xO3"
|
1999-05-19 23:07:15 +04:00
|
|
|
fi
|
|
|
|
if test $PICFLAG = 1; then
|
|
|
|
CFLAGS="-KPIC $CFLAGS"
|
|
|
|
CXXFLAGS="-PIC $CXXFLAGS"
|
|
|
|
fi
|
|
|
|
;;
|
2001-04-13 23:13:14 +04:00
|
|
|
AIX*)
|
|
|
|
if test -z "$DEBUGFLAG"; then
|
|
|
|
CFLAGS="-O2 $CFLAGS"
|
|
|
|
CXXFLAGS="-O2 $CXXFLAGS"
|
|
|
|
fi
|
2001-08-02 22:08:36 +04:00
|
|
|
echo "WARNING: The AIX C and C++ compilers are known not to correctly"
|
|
|
|
echo " compile the FLTK library. We recommend using GCC 2.95.2"
|
|
|
|
echo " under AIX."
|
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...
|
1999-02-01 22:40:25 +03:00
|
|
|
echo "Building FLTK with default compiler optimizations; contact"
|
2000-06-06 01:21:24 +04:00
|
|
|
echo "fltk-bugs@fltk.org with uname and compiler options needed"
|
1999-02-01 22:40:25 +03:00
|
|
|
echo "for your platform, or set the CFLAGS and CXXFLAGS options"
|
|
|
|
echo "before running configure."
|
|
|
|
;;
|
|
|
|
esac
|
1998-11-05 19:04:53 +03:00
|
|
|
fi
|
|
|
|
|
1999-02-01 22:40:25 +03:00
|
|
|
CFLAGS="$DEBUGFLAG $CFLAGS"
|
|
|
|
CXXFLAGS="$DEBUGFLAG $CXXFLAGS"
|
1999-01-31 10:43:16 +03:00
|
|
|
|
1999-03-09 22:24:42 +03:00
|
|
|
AC_SUBST(DSOCOMMAND)
|
2001-08-02 22:08:36 +04:00
|
|
|
AC_SUBST(DSONAME)
|
|
|
|
AC_SUBST(GLDSONAME)
|
|
|
|
AC_SUBST(GLLIBNAME)
|
1998-10-20 20:41:24 +04:00
|
|
|
AC_SUBST(LIBCOMMAND)
|
2001-08-02 22:08:36 +04:00
|
|
|
AC_SUBST(LIBNAME)
|
|
|
|
AC_SUBST(LINKFLTKGL)
|
|
|
|
AC_SUBST(LINKFLTK)
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_SUBST(MAKEDEPEND)
|
2001-08-02 22:08:36 +04:00
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
AC_CONFIG_HEADER(config.h:configh.in)
|
1998-10-20 20:41:24 +04:00
|
|
|
AC_OUTPUT(makeinclude)
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|
2001-08-08 16:47:59 +04:00
|
|
|
dnl End of "$Id: configure.in,v 1.33.2.31.2.6 2001/08/08 12:47:59 easysw Exp $".
|
2000-04-27 04:17:54 +04:00
|
|
|
dnl
|