Add check for tiff

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9922 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-05-11 22:23:11 +00:00
parent fc383e05d2
commit 59a548942b
7 changed files with 278 additions and 10 deletions

View file

@ -1,5 +1,6 @@
config.log
config.status
config.cache
config.make
gnustep-gui.spec
gnustep-gui-debug.spec

View file

@ -1,3 +1,9 @@
2001-05-11 Adam Fedor <fedor@gnu.org>
* configure.in: Check for tiffio.h. Add path to include dirs
* config.make.in: New file
* Source/GNUmakefile: Include config.make
2001-05-07 Adam Fedor <fedor@gnu.org>
* Source/NSApplication.m (_NSAppKitUncaughtExceptionHandler): Abort

View file

@ -32,6 +32,7 @@ GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../gui.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
include ../config.make
# The library to be compiled
LIBRARY_NAME=libgnustep-gui

View file

@ -68,7 +68,7 @@ ADDITIONAL_OBJCFLAGS = -Wall
# ADDITIONAL_CFLAGS =
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS = -I../Headers
ADDITIONAL_INCLUDE_DIRS += -I../Headers
# Additional LDFLAGS to pass to the linker
# ADDITIONAL_LDFLAGS =

7
config.make.in Normal file
View file

@ -0,0 +1,7 @@
# -*-makefile-*-
# Extra make variables for gui library
#
ADDITIONAL_INCLUDE_DIRS += @ADDITIONAL_INCLUDE_DIRS@
ADDITIONAL_LDFLAGS += @ADDITIONAL_LDFLAGS@

228
configure vendored
View file

@ -11,6 +11,10 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--with-tiff-library=DIR TIFF library file are in DIR"
ac_help="$ac_help
--with-tiff-include=DIR TIFF include files are in DIR"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@ -525,7 +529,7 @@ fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
echo "configure:529: checking for main in -lm" >&5
echo "configure:533: checking for main in -lm" >&5
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -533,14 +537,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 537 "configure"
#line 541 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -570,12 +574,12 @@ fi
for ac_func in rintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:574: checking for $ac_func" >&5
echo "configure:578: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 579 "configure"
#line 583 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -598,7 +602,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -623,6 +627,208 @@ fi
done
#--------------------------------------------------------------------
# Find for TIFF
# Do a superficial find only - The tiff library is actually linked with
# the backend, and typically in conjunction with other graphic libraries.
#--------------------------------------------------------------------
# Check whether --with-tiff_library or --without-tiff_library was given.
if test "${with_tiff_library+set}" = set; then
withval="$with_tiff_library"
:
else
with_tiff_library=
fi
# Check whether --with-tiff_include or --without-tiff_include was given.
if test "${with_tiff_include+set}" = set; then
withval="$with_tiff_include"
:
else
with_tiff_include=
fi
save_cpp=${CPPFLAGS}
save_ldf=${LDFLAGS}
if test "$with_tiff_include" != ""; then
CPPFLAGS="-I$with_tiff_include ${CPPFLAGS}"
ADDITIONAL_INCLUDE_DIRS="-I$with_tiff_include"
fi
if test -n "$with_tiff_library"; then
LDFLAGS="-L$with_tiff_library $LDFLAGS"
ADDITIONAL_LDFLAGS="-L$with_tiff_library"
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:664: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 679 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 696 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 713 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
echo "configure:745: checking for tiffio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 750 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
fi
if test $ac_cv_header_tiffio_h = no; then
echo "configure: warning: Cannot find libtiff header tiffio" 1>&2
echo "* The GUI library requres the TIFF library"
echo "* Use --with-tiff-include to specify the tiff header directory"
echo "* and --with-tiff-library to specify the tiff library directory"
echo "* if it is not in the usual place(s)"
{ echo "configure: error: gnustep-gui will not compile without tiff includes" 1>&2; exit 1; }
fi
echo $ac_n "checking for main in -ltiff""... $ac_c" 1>&6
echo "configure:785: checking for main in -ltiff" >&5
ac_lib_var=`echo tiff'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ltiff $LIBS"
cat > conftest.$ac_ext <<EOF
#line 793 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo tiff | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-ltiff $LIBS"
else
echo "$ac_t""no" 1>&6
fi
CPPFLAGS="$save_cpp"
LDFLAGS="$save_ldf"
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@ -723,7 +929,7 @@ done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo " Headers/gnustep/gui/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "config.make Headers/gnustep/gui/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -755,6 +961,9 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@CPP@%$CPP%g
s%@ADDITIONAL_LDFLAGS@%$ADDITIONAL_LDFLAGS%g
s%@ADDITIONAL_INCLUDE_DIRS@%$ADDITIONAL_INCLUDE_DIRS%g
CEOF
EOF
@ -796,7 +1005,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-""}
CONFIG_FILES=\${CONFIG_FILES-"config.make"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@ -971,3 +1180,6 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

View file

@ -30,6 +30,47 @@ AC_CONFIG_HEADER(Headers/gnustep/gui/config.h)
AC_CHECK_LIB(m, main)
AC_CHECK_FUNCS(rintf)
AC_OUTPUT()
#--------------------------------------------------------------------
# Find for TIFF
# Do a superficial find only - The tiff library is actually linked with
# the backend, and typically in conjunction with other graphic libraries.
#--------------------------------------------------------------------
AC_ARG_WITH(tiff_library,
[ --with-tiff-library=DIR TIFF library file are in DIR], ,
with_tiff_library=)
AC_ARG_WITH(tiff_include,
[ --with-tiff-include=DIR TIFF include files are in DIR], ,
with_tiff_include=)
save_cpp=${CPPFLAGS}
save_ldf=${LDFLAGS}
if test "$with_tiff_include" != ""; then
CPPFLAGS="-I$with_tiff_include ${CPPFLAGS}"
ADDITIONAL_INCLUDE_DIRS="-I$with_tiff_include"
fi
if test -n "$with_tiff_library"; then
LDFLAGS="-L$with_tiff_library $LDFLAGS"
ADDITIONAL_LDFLAGS="-L$with_tiff_library"
fi
AC_CHECK_HEADER(tiffio.h)
if test $ac_cv_header_tiffio_h = no; then
AC_MSG_WARN(Cannot find libtiff header tiffio)
echo "* The GUI library requres the TIFF library"
echo "* Use --with-tiff-include to specify the tiff header directory"
echo "* and --with-tiff-library to specify the tiff library directory"
echo "* if it is not in the usual place(s)"
AC_MSG_ERROR(gnustep-gui will not compile without tiff includes)
fi
AC_CHECK_LIB(tiff, main)
CPPFLAGS="$save_cpp"
LDFLAGS="$save_ldf"
AC_SUBST(ADDITIONAL_LDFLAGS)
AC_SUBST(ADDITIONAL_INCLUDE_DIRS)
AC_OUTPUT(config.make)