diff options
author | Aaron M. Ucko <ucko@debian.org> | 2006-01-20 17:40:10 +0000 |
---|---|---|
committer | Aaron M. Ucko <ucko@debian.org> | 2006-01-20 17:40:10 +0000 |
commit | 28040bcfe284d3e7a8ad56042c7fb05e31101ed5 (patch) | |
tree | f17deefa289219f380dd9f90c490256fb04a1e74 /configure.in | |
parent | 888584a8dfb8916539a1adb6eabfbee2b6a0b7ab (diff) | |
parent | a7324bb0c2a26bb02be3362dff2126dc6c6af3a4 (diff) |
Merge new upstream release (1.1.7) into trunk.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 160 |
1 files changed, 122 insertions, 38 deletions
diff --git a/configure.in b/configure.in index fb85431..b0a12ec 100644 --- a/configure.in +++ b/configure.in @@ -1,11 +1,11 @@ dnl -*- sh -*- dnl the "configure" script is made from this by running GNU "autoconf" dnl -dnl "$Id: configure.in,v 1.33.2.31.2.122 2004/11/20 03:44:17 easysw Exp $" +dnl "$Id: configure.in 4756 2006-01-15 18:36:16Z mike $" dnl dnl Configuration script for the Fast Light Tool Kit (FLTK). dnl -dnl Copyright 1998-2004 by Bill Spitzak and others. +dnl Copyright 1998-2006 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 @@ -22,7 +22,9 @@ 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@fltk.org". +dnl Please report all bugs and problems on the following page: +dnl +dnl http://www.fltk.org/str.php dnl dnl We need at least autoconf 2.13... @@ -34,14 +36,12 @@ AC_INIT(src/Fl.cxx) dnl FLTK library versions... FL_MAJOR_VERSION=1 FL_MINOR_VERSION=1 -FL_PATCH_VERSION=6 -FL_RELEASE_VERSION= +FL_PATCH_VERSION=7 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) dnl Get the operating system and version number... @@ -78,9 +78,10 @@ case $uname in esac dnl Define the libraries and link options we'll need. -LINKFLTK="-lfltk" -LINKFLTKGL="-lfltk_gl" -LINKFLTKIMG="-lfltk_images" +LINKFLTK="../lib/libfltk.a" +LINKFLTKFORMS="../lib/libfltk_forms.a" +LINKFLTKGL="../lib/libfltk_gl.a" +LINKFLTKIMG="../lib/libfltk_images.a" GLDEMOS="gldemos" LIBEXT=".a" @@ -96,6 +97,7 @@ AC_SUBST(IMGLIBNAME) AC_SUBST(LIBEXT) AC_SUBST(LIBNAME) AC_SUBST(LINKFLTK) +AC_SUBST(LINKFLTKFORMS) AC_SUBST(LINKFLTKGL) AC_SUBST(LINKFLTKIMG) @@ -183,7 +185,19 @@ if test x$enable_shared = xyes; then SHAREDSUFFIX="_s" ;; CYGWIN* | MINGW*) - AC_MSG_WARN(Shared libraries are not supported under CygWin.) + PICFLAG=0 + if test x$enable_cygwin != xyes; then + DSONAME="mgwfltknox-$FL_API_VERSION.dll" + FLDSONAME="mgwfltknox_forms-$FL_API_VERSION.dll" + GLDSONAME="mgwfltknox_gl-$FL_API_VERSION.dll" + IMGDSONAME="mgwfltknox_images-$FL_API_VERSION.dll" + else + DSONAME="cygfltknox-$FL_API_VERSION.dll" + FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll" + GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll" + IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll" + fi + DSOCOMMAND="\$(CXX) -shared -Wl,--whole-archive -Wl,--export-all-symbols -Wl,--enable-auto-import -o \$@" ;; *) AC_MSG_WARN(Shared libraries may not be supported. Trying -shared option with compiler.) @@ -206,7 +220,7 @@ else PICFLAG=0 SHAREDSUFFIX="" FLUID="fluid" - LINKSHARED="-L../lib -lfltk_images -lfltk_forms -lfltk" + LINKSHARED="../lib/libfltk_images.a ../lib/libfltk_forms.a ../lib/libfltk.a" fi AC_SUBST(DSOCOMMAND) @@ -367,9 +381,68 @@ AC_CHECK_FUNC(snprintf,[ AC_CHECK_HEADER(strings.h, AC_DEFINE(HAVE_STRINGS_H)) AC_CHECK_FUNCS(strcasecmp strlcat strlcpy) +AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H)) +AC_CHECK_FUNCS(localeconv) + dnl FLTK library uses math library functions... AC_SEARCH_LIBS(pow, m) +dnl Check for largefile support... +AC_SYS_LARGEFILE + +dnl Define largefile options as needed... +LARGEFILE="" +if test x$enable_largefile != xno; then + LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" + + if test $ac_cv_sys_large_files = 1; then + LARGEFILE="$LARGEFILE -D_LARGE_FILES" + fi + + if test $ac_cv_sys_file_offset_bits = 64; then + LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64" + fi +fi +AC_SUBST(LARGEFILE) + +dnl Check for "long long" support... +AC_CACHE_CHECK(for long long int, ac_cv_c_long_long, + [if test "$GCC" = yes; then + ac_cv_c_long_long=yes + else + AC_TRY_COMPILE(,[long long int i;], + ac_cv_c_long_long=yes, + ac_cv_c_long_long=no) + fi]) + +if test $ac_cv_c_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG) +fi + +AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL)) + +dnl Check for audio libraries... +AUDIOLIBS="" + +case $uname in + CYGWIN* | MINGW*) + dnl Cygwin environment... + AUDIOLIBS="-lwinmm" + ;; + + Darwin*) + AUDIOLIBS="-framework CoreAudio" + ;; + + *) + AC_CHECK_HEADER(alsa/asoundlib.h, + AC_DEFINE(HAVE_ALSA_ASOUNDLIB_H) + AUDIOLIBS="-lasound") + ;; +esac + +AC_SUBST(AUDIOLIBS) + dnl Check for image libraries... SAVELIBS="$LIBS" IMAGELIBS="" @@ -483,6 +556,9 @@ THREADS= AC_ARG_WITH(links, [ --with-links make header links for common misspellings]) +INSTALL_DESKTOP="" +UNINSTALL_DESKTOP="" + case $uname in CYGWIN* | MINGW*) dnl Cygwin environment... @@ -506,10 +582,13 @@ case $uname in GLDEMOS="" fi - if test x$have_pthread = xyes; then - AC_DEFINE(HAVE_PTHREAD) + if test "x$enable_threads" = xyes; then + if test x$have_pthread = xyes; then + AC_DEFINE(HAVE_PTHREAD) + fi + THREADS="threads.exe" - fi + fi # Don't make symlinks since Windows is not case sensitive. if test "x$with_links" != xyes; then @@ -544,6 +623,10 @@ case $uname in # Add a postbuild step after linking applications POSTBUILD="/Developer/Tools/Rez -t APPL -o" + + # Install/Uninstall FLUID application + INSTALL_DESKTOP="install-osx" + UNINSTALL_DESKTOP="uninstall-osx" ;; *) @@ -607,6 +690,15 @@ case $uname in GLDEMOS="" fi + dnl Check for Xinerama support unless disabled... + AC_ARG_ENABLE(xinerama, [ --enable-xinerama turn on Xinerama support [default=no]]) + + if test x$enable_xinerama = xyes; then + AC_CHECK_LIB(Xinerama,XineramaIsActive, + AC_DEFINE(HAVE_XINERAMA) + LIBS="-lXinerama $LIBS") + fi + dnl Check for the Xft library unless disabled... AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [default=no]]) @@ -648,6 +740,10 @@ case $uname in if test "x$with_links" = xno; then HLINKS="#" fi + + # Install/Uninstall FLUID application support files + INSTALL_DESKTOP="install-linux" + UNINSTALL_DESKTOP="uninstall-linux" ;; esac @@ -657,27 +753,34 @@ AC_SUBST(HLINKS) AC_SUBST(POSTBUILD) AC_SUBST(THREADS) +AC_SUBST(INSTALL_DESKTOP) +AC_SUBST(UNINSTALL_DESKTOP) + dnl Figure out the appropriate formatted man page extension... case "$uname" in *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=3 ;; esac AC_SUBST(CAT1EXT) AC_SUBST(CAT3EXT) +AC_SUBST(CAT6EXT) dnl Fix "mandir" variable... if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/usr"; then @@ -715,31 +818,12 @@ dnl Add warnings to compiler switches: dnl do this last so messing with switches does not break tests if test -n "$GCC"; then - # 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 - # CUPS doesn't (currently) use any of the stdc++ library. - # - # 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! - # - # Previous versions of GCC do not have the reliance on the stdc++ - # or g++ libraries, so the extra supc++ library is not needed. - - # For debian we use option 1) - - LIBS="$LIBS -lstdc++" - - CXX="$CC" - # Show all standard warnings + unused variables, conversion errors, # and inlining problems when compiling... - OPTIM="-Wall -Wunused -Wconversion $OPTIM" + OPTIM="-Wall -Wunused -Wno-format-y2k $OPTIM" # The following additional warnings are useful for tracking down problems... - #OPTIM="-Wshadow $OPTIM" + #OPTIM="-Wshadow -Wconversion $OPTIM" # Set the default compiler optimizations... if test -z "$DEBUGFLAG"; then @@ -751,7 +835,7 @@ if test -n "$GCC"; then # They all seem to make either no difference or enlarge # the code by a few hundred bytes. # - # "-O2" seems to be the best compromise between speed and + # "-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+%. @@ -760,7 +844,7 @@ if test -n "$GCC"; then if test "x$with_optim" != x; then OPTIM="$with_optim $OPTIM" else - OPTIM="-O2 $OPTIM" + OPTIM="-Os $OPTIM" fi fi @@ -917,5 +1001,5 @@ dnl Make sure the fltk-config script is executable... chmod +x fltk-config dnl -dnl End of "$Id: configure.in,v 1.33.2.31.2.122 2004/11/20 03:44:17 easysw Exp $". +dnl End of "$Id: configure.in 4756 2006-01-15 18:36:16Z mike $". dnl |