summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-20 16:41:24 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-20 16:41:24 +0000
commit53fcfae9cbd78186fb0d35b1e2cd8bccba9f1602 (patch)
tree405b190a0290339fe148df6fbb21d5b3bb8385a2 /configure.in
parent89ba91ad3754738af957e69b20eee5785e5cc2e2 (diff)
Updated autoconf files to support shared libraries and JPEG library.
Updated README files. Removed old files. git-svn-id: file:///fltk/svn/fltk/trunk@24 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in113
1 files changed, 74 insertions, 39 deletions
diff --git a/configure.in b/configure.in
index 46b856b68..c6d875db5 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,71 @@
dnl# -*- sh -*-
dnl# the "configure" script is made from this by running GNU "autoconf"
+dnl#
+dnl# "$Id"
+dnl#
+dnl# for the Fast Light Tool Kit (FLTK).
+dnl#
+dnl# Copyright 1998 by Bill Spitzak and others.
+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#
+dnl# Please report all bugs and problems to "fltk-bugs@easysw.com".
+dnl#
AC_INIT(src/Fl.C)
+
+AC_PROG_RANLIB
+
+LIBNAME="libfltk.a"
+if test "$RANLIB" != ":"; then
+ LIBCOMMAND="ar crv"
+else
+ LIBCOMMAND="ar crvs"
+fi
+
+DEBUGFLAG=""
+
+AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],if eval "test x$enable_debug = xyes"; then
+ DEBUGFLAG="-g"
+fi)
+AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=no]],if eval "test x$enable_shared = xyes"; then
+ RANLIB=":"
+ case `uname` in
+ SunOS* | UNIX_S*)
+ LIBNAME="libfltk.so.1"
+ LIBCOMMAND="\$(CXX) -G $DEBUGFLAG -o"
+ ;;
+ HP-UX*)
+ LIBNAME="libfltk.sl.1"
+ LIBCOMMAND="ld -b -z +h libfltk.sl.1 $DEBUGFLAGS -o"
+ ;;
+ *)
+ echo "Warning: shared libraries may not be supported. Trying -shared"
+ echo " option to compiler."
+ OSF1* | IRIX*)
+ LIBNAME="libfltk.so.1"
+ LIBCOMMAND="\$(CXX) -shared $DEBUGFLAG -o"
+ ;;
+ esac
+fi)
+
+if test -n "$DEBUGFLAG"; then
+ CFLAGS="$DEBUGFLAG $CFLAGS"
+fi
+
AC_PROG_CC
AC_PROG_CXX
dnl# AC_PROG_INSTALL
@@ -33,8 +97,6 @@ AC_HEADER_DIRENT
AC_CHECK_FUNCS(scandir)
-AC_PROG_RANLIB
-
AC_PATH_XTRA
echo "Ignoring libraries \"$X_PRE_LIBS\" requested by configure."
dnl# LIBS="$LIBS$X_LIBS$X_PRE_LIBS"
@@ -62,45 +124,18 @@ if test "$ac_cv_have_overlay" = yes; then
AC_DEFINE(HAVE_OVERLAY)
fi
+dnl Check for other libraries...
+
+AC_CHECK_LIB(jpeg,jpeg_destroy_decompress)
+
MAKEDEPEND="\$(CXX) -M"
-dnl# add warnings and optimization to compiler switches:
-dnl# do this last so messing with switches does not break tests
-if test -n "$GXX"; then
- CFLAGS="-Wall -O2"
- CFLAGS_D="-Wall -Wno-return-type -g -DDEBUG"
- CXXFLAGS="-Wall -Wno-return-type -O2"
- CXXFLAGS_D="-Wall -Wno-return-type -g -DDEBUG"
-else
-if test "`(uname) 2>/dev/null`" = IRIX; then
- if expr "`(uname -r)`" \>= 6.2; then
- # compiler names:
- CXX="CC -n32"
- CC="cc -n32"
- LD="ld -n32"
- MAKEDEPEND="CC -M"
- # -woff 3322 is necessary due to errors in Xlib headers on IRIX
- CFLAGS="-fullwarn -O2"
- CFLAGS_D="-fullwarn -gslim -DDEBUG"
- CXXFLAGS="-fullwarn -woff 1685 -woff 3322 -O2"
- CXXFLAGS_D="-fullwarn -woff 1685 -woff 3322 -gslim -DDEBUG"
- else
- CFLAGS="-O2"
- CFLAGS_D="-g -DDEBUG"
- CXXFLAGS="+w +pp -O2"
- CXXFLAGS_D="+w +pp -g -DDEBUG"
- fi
-else
- CFLAGS="-O"
- CFLAGS_D="-g -DDEBUG"
- CXXFLAGS="-O"
- CXXFLAGS_D="-g -DDEBUG"
-fi
-fi
+AC_SUBST(LIBNAME)
+AC_SUBST(LIBCOMMAND)
AC_SUBST(MAKEDEPEND)
-AC_SUBST(CFLAGS_D)
-AC_SUBST(CXXFLAGS_D)
AC_CONFIG_HEADER(config.h:configh.in)
-AC_OUTPUT(makeinclude )
+AC_OUTPUT(makeinclude)
-dnl# end of configure.in
+dnl#
+dnl# End of "$Id: configure.in,v 1.2 1998/10/20 16:41:18 mike Exp $".
+dnl#