diff --git a/ChangeLog b/ChangeLog index 15a3a4aa..75328858 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-07-13 Bob Friesenhahn + + * tools/tiffcrop.c: Patch from Richard Nolde to avoid a + potentially unterminated buffer due to using an exceptionally long + file name. + 2010-07-08 Andrey Kiselev * tools/tiff2pdf.c: Fixed ID buffer filling in diff --git a/Makefile.in b/Makefile.in index 7e96cf3c..bf0e0ba3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -260,12 +260,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/build/Makefile.in b/build/Makefile.in index b4b386bb..c27cce5e 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -220,12 +220,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/configure b/configure index 87b7d532..9f082ccc 100755 --- a/configure +++ b/configure @@ -618,7 +618,7 @@ GL_CFLAGS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC -acx_pthread_config +ax_pthread_config X_EXTRA_LIBS X_LIBS X_PRE_LIBS @@ -797,7 +797,6 @@ with_jpeg12_include_dir with_jpeg12_lib enable_cxx with_x -with_apple_opengl_framework enable_strip_chopping with_default_strip_size enable_extrasample_as_alpha @@ -1510,8 +1509,6 @@ Optional Packages: --with-jpeg12-lib=LIBRARY path to libjpeg 12bit library --with-x use the X Window System - --with-apple-opengl-framework - use Apple OpenGL framework (Mac OS X only) --with-default-strip-size=SIZE default size of the strip in bytes (when strip chopping enabled) [[default=8192]] @@ -17829,15 +17826,9 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -acx_pthread_ok=no +ax_pthread_ok=no -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" @@ -17864,13 +17855,13 @@ return pthread_join (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes + ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test x"$acx_pthread_ok" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi @@ -17878,54 +17869,26 @@ $as_echo "$acx_pthread_ok" >&6; } CFLAGS="$save_CFLAGS" fi -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthread or - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; + + *-darwin*) + ax_pthread_flags="-pthread $ax_pthread_flags" + ;; esac -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do case $flag in none) @@ -17944,11 +17907,11 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; } set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_acx_pthread_config+set}" = set; then : +if test "${ac_cv_prog_ax_pthread_config+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test -n "$acx_pthread_config"; then - ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -17957,7 +17920,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_acx_pthread_config="yes" + ac_cv_prog_ax_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -17965,20 +17928,20 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" + test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi fi -acx_pthread_config=$ac_cv_prog_acx_pthread_config -if test -n "$acx_pthread_config"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 -$as_echo "$acx_pthread_config" >&6; } +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test x"$acx_pthread_config" = xno; then continue; fi + if test x"$ax_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; @@ -17995,30 +17958,26 @@ $as_echo_n "checking for the pthreads library -l$flag... " >&6; } LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + static void routine(void* a) {a=0;} + static void* start_routine(void* a) {return a;} int main () { -pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); +pthread_t th; pthread_attr_t attr; + pthread_create(&th,0,start_routine,0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - acx_pthread_ok=yes + ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext @@ -18026,9 +17985,9 @@ rm -f core conftest.err conftest.$ac_objext \ LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 -$as_echo "$acx_pthread_ok" >&6; } - if test "x$acx_pthread_ok" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then break; fi @@ -18037,15 +17996,13 @@ $as_echo "$acx_pthread_ok" >&6; } done fi -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then +if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do @@ -18055,7 +18012,7 @@ $as_echo_n "checking for joinable pthread attribute... " >&6; } int main () { -int attr=$attr; +int attr=$attr; return attr; ; return 0; } @@ -18092,9 +18049,11 @@ $as_echo "${flag}" >&6; } LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" - # More AIX lossage: must compile with cc_r - # Extract the first word of "cc_r", so it can be a program name with args. -set dummy cc_r; ac_word=$2 + if test x"$GCC" != xyes; then + for ac_prog in xlc_r cc_r +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then : @@ -18110,7 +18069,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_PTHREAD_CC="cc_r" + ac_cv_prog_PTHREAD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -18118,7 +18077,6 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC @@ -18131,6 +18089,13 @@ $as_echo "no" >&6; } fi + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" + + else + PTHREAD_CC=$CC + fi else PTHREAD_CC="$CC" fi @@ -18139,14 +18104,13 @@ fi -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then +if test x"$ax_pthread_ok" = xyes; then $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h : else - acx_pthread_ok=no + ax_pthread_ok=no fi ac_ext=c @@ -18157,31 +18121,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# -# There isn't a reliable way to know we should use the Apple OpenGL framework -# without a configure option. A Mac OS X user may have installed an -# alternative GL implementation (e.g., Mesa), which may or may not depend on X. -# -# Check whether --with-apple-opengl-framework was given. -if test "${with_apple_opengl_framework+set}" = set; then : - withval=$with_apple_opengl_framework; -fi - -if test "X$with_apple_opengl_framework" = "Xyes"; then - -$as_echo "#define HAVE_APPLE_OPENGL_FRAMEWORK 1" >>confdefs.h - - GL_LIBS="-framework OpenGL" -else - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Microsoft C compiler" >&5 $as_echo_n "checking whether we are using the Microsoft C compiler... " >&6; } if test "${ax_cv_c_compiler_ms+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -18211,25 +18158,38 @@ ax_cv_c_compiler_ms=$ax_compiler_ms fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_ms" >&5 $as_echo "$ax_cv_c_compiler_ms" >&6; } - if test X$ax_compiler_ms = Xno; then - GL_CFLAGS="${PTHREAD_CFLAGS}" - GL_LIBS="${PTHREAD_LIBS} -lm" - fi +if test X$ax_compiler_ms = Xno; then : + GL_CFLAGS="${PTHREAD_CFLAGS}"; GL_LIBS="${PTHREAD_LIBS} -lm" +fi - # - # Use x_includes and x_libraries if they have been set (presumably by - # AC_PATH_X). - # - if test "X$no_x" != "Xyes"; then - if test -n "$x_includes"; then - GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}" - fi - if test -n "$x_libraries"; then - GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}" - fi - fi +if test "X$no_x" != "Xyes"; then : + if test -n "$x_includes"; then : + GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}" +fi + if test -n "$x_libraries"; then : + GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}" +fi +fi - for ac_header in windows.h +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +for ac_header in GL/gl.h OpenGL/gl.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + +for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = x""yes; then : @@ -18242,31 +18202,43 @@ fi done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL library" >&5 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL library" >&5 $as_echo_n "checking for OpenGL library... " >&6; } if test "${ax_cv_check_gl_libgl+set}" = set; then : $as_echo_n "(cached) " >&6 else ax_cv_check_gl_libgl="no" - ax_save_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" - ax_save_LIBS="${LIBS}" - LIBS="" - ax_check_libs="-lopengl32 -lGL" - for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` - else - ax_try_lib="${ax_lib}" - fi - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +case $host_cpu in + x86_64) ax_check_gl_libdir=lib64 ;; + *) ax_check_gl_libdir=lib ;; +esac +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lopengl32 -lGL" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then : + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# if HAVE_WINDOWS_H && defined(_WIN32) +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) # include # endif -# include +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif int main () { @@ -18277,23 +18249,158 @@ glBegin(0) _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_check_gl_libgl="${ax_try_lib}"; break +else + ax_check_gl_nvidia_flags="-L/usr/${ax_check_gl_libdir}/nvidia" LIBS="${ax_try_lib} ${ax_check_gl_nvidia_flags} ${GL_LIBS} ${ax_save_LIBS}" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_nvidia_flags}"; break +else + ax_check_gl_dylib_flag='-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' LIBS="${ax_try_lib} ${ax_check_gl_dylib_flag} ${GL_LIBS} ${ax_save_LIBS}" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl="${ax_try_lib} ${ax_check_gl_dylib_flag}"; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - done - LIBS=${ax_save_LIBS} - CPPFLAGS=${ax_save_CPPFLAGS} +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +done + +if test "X$ax_cv_check_gl_libgl" = Xno -a "X$no_x" = Xyes; then : + LIBS='-framework OpenGL' +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GL_H +# include +# elif defined(HAVE_OPENGL_GL_H) +# include +# else +# error no gl.h +# endif +int +main () +{ +glBegin(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_gl_libgl="$LIBS" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_libgl" >&5 $as_echo "$ax_cv_check_gl_libgl" >&6; } - if test "X${ax_cv_check_gl_libgl}" = "Xno"; then - no_gl="yes" - GL_CFLAGS="" - GL_LIBS="" - else - GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}" - fi +if test "X$ax_cv_check_gl_libgl" = Xno; then : + no_gl=yes; GL_CFLAGS=""; GL_LIBS="" +else + GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + +GLU_CFLAGS="${GL_CFLAGS}" + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +for ac_header in GL/glu.h OpenGL/glu.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility library" >&5 +$as_echo_n "checking for OpenGL Utility library... " >&6; } +if test "${ax_cv_check_glu_libglu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ax_cv_check_glu_libglu="no" +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" + +LIBS="${GL_LIBS} ${ax_save_LIBS}" +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +if test X$ax_compiler_ms = Xyes; then : ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18301,57 +18408,52 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi - - - - -GLU_CFLAGS="${GL_CFLAGS}" -if test "X${with_apple_opengl_framework}" != "Xyes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility library" >&5 -$as_echo_n "checking for OpenGL Utility library... " >&6; } -if test "${ax_cv_check_glu_libglu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ax_cv_check_glu_libglu="no" - ax_save_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" - ax_save_LIBS="${LIBS}" - LIBS="" - ax_check_libs="-lglu32 -lGLU" - for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` - else - ax_try_lib="${ax_lib}" - fi - LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" - # - # libGLU typically links with libstdc++ on POSIX platforms. However, - # setting the language to C++ means that test program source is named - # "conftest.cc"; and Microsoft cl doesn't know what to do with such a - # file. - # - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - if test X$ax_compiler_ms = Xyes; then - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# if HAVE_WINDOWS_H && defined(_WIN32) +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) # include # endif -# include +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif +int +main () +{ +gluBeginCurve(0) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_glu_libglu=yes +else + LIBS="" +ax_check_libs="-lglu32 -lGLU" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then : + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLU_H +# include +# elif defined(HAVE_OPENGL_GLU_H) +# include +# else +# error no glu.h +# endif int main () { @@ -18365,85 +18467,148 @@ if ac_fn_c_try_link "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test X$ax_compiler_ms = Xyes; then - ac_ext=cpp +done + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test X$ax_compiler_ms = Xyes; then : + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - fi - ac_ext=c +fi +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - done - LIBS=${ax_save_LIBS} - CPPFLAGS=${ax_save_CPPFLAGS} + +LIBS=${ax_save_LIBS} +CPPFLAGS=${ax_save_CPPFLAGS} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_libglu" >&5 $as_echo "$ax_cv_check_glu_libglu" >&6; } - if test "X${ax_cv_check_glu_libglu}" = "Xno"; then - no_glu="yes" - GLU_CFLAGS="" - GLU_LIBS="" - else - GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}" - fi +if test "X$ax_cv_check_glu_libglu" = Xno; then : + no_glu=yes; GLU_CFLAGS=""; GLU_LIBS="" +else + if test "X$ax_cv_check_glu_libglu" = Xyes; then : + GLU_LIBS="$GL_LIBS" +else + GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}" +fi fi - -if test "X$with_apple_opengl_framework" = "Xyes"; then - GLUT_CFLAGS="${GLU_CFLAGS}" - GLUT_LIBS="-framework GLUT -lobjc ${GL_LIBS}" +if test "X$ax_cv_check_glu_libglu" != Xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for varargs GLU tesselator callback function type" >&5 +$as_echo_n "checking for varargs GLU tesselator callback function type... " >&6; } +if test "${ax_cv_varargs_glu_tesscb+set}" = set; then : + $as_echo_n "(cached) " >&6 else - GLUT_CFLAGS=${GLU_CFLAGS} - GLUT_LIBS=${GLU_LIBS} + ax_cv_varargs_glu_tesscb=no +ax_save_CFLAGS="$CFLAGS" +CFLAGS="$GL_CFLAGS $CFLAGS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # - # If X is present, assume GLUT depends on it. - # - if test "X${no_x}" != "Xyes"; then - GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}" - fi +# ifdef HAVE_GL_GLU_H +# include +# else +# include +# endif +int +main () +{ +GLvoid (*func)(...); gluTessCallback(0, 0, func) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ax_cv_varargs_glu_tesscb=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$ax_save_CFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_varargs_glu_tesscb" >&5 +$as_echo "$ax_cv_varargs_glu_tesscb" >&6; } +if test X$ax_cv_varargs_glu_tesscb = Xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +$as_echo "#define HAVE_VARARGS_GLU_TESSCB 1" >>confdefs.h + +fi +fi - ax_save_CPPFLAGS="${CPPFLAGS}" - CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}" +for ac_header in GL/glut.h GLUT/glut.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLUT library" >&5 +fi + +done + +CPPFLAGS="${ax_save_CPPFLAGS}" + +GLUT_CFLAGS=${GLU_CFLAGS} +GLUT_LIBS=${GLU_LIBS} + + + +if test X$no_x != Xyes; then : + GLUT_LIBS="${X_PRE_LIBS} -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLUT library" >&5 $as_echo_n "checking for GLUT library... " >&6; } if test "${ax_cv_check_glut_libglut+set}" = set; then : $as_echo_n "(cached) " >&6 else ax_cv_check_glut_libglut="no" - ax_save_LIBS="${LIBS}" - LIBS="" - ax_check_libs="-lglut32 -lglut" - for ax_lib in ${ax_check_libs}; do - if test X$ax_compiler_ms = Xyes; then - ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` - else - ax_try_lib="${ax_lib}" - fi - LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ax_save_CPPFLAGS="${CPPFLAGS}" +CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" +ax_save_LIBS="${LIBS}" +LIBS="" +ax_check_libs="-lglut32 -lglut" +for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then : + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` +else + ax_try_lib="${ax_lib}" +fi + LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # if HAVE_WINDOWS_H && defined(_WIN32) # include # endif -# include +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif int main () { @@ -18457,28 +18622,54 @@ if ac_fn_c_try_link "$LINENO"; then : fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +done - done - LIBS=${ax_save_LIBS} +if test "X$ax_cv_check_glut_libglut" = Xno -a "X$no_x" = Xyes; then : + LIBS='-framework GLUT' +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# ifdef HAVE_GL_GLUT_H +# include +# elif defined(HAVE_GLUT_GLUT_H) +# include +# else +# error no glut.h +# endif +int +main () +{ +glutMainLoop() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_glut_libglut="$LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_libglut" >&5 -$as_echo "$ax_cv_check_glut_libglut" >&6; } - CPPFLAGS="${ax_save_CPPFLAGS}" - ac_ext=c +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +CPPFLAGS="${ax_save_CPPFLAGS}" +LIBS="${ax_save_LIBS}" +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_libglut" >&5 +$as_echo "$ax_cv_check_glut_libglut" >&6; } - if test "X${ax_cv_check_glut_libglut}" = "Xno"; then - no_glut="yes" - GLUT_CFLAGS="" - GLUT_LIBS="" - else - GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}" - fi +if test "X$ax_cv_check_glut_libglut" = Xno; then : + no_glut="yes"; GLUT_CFLAGS=""; GLUT_LIBS="" +else + GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}" fi diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 2aa1524a..299a4553 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -219,12 +219,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/addtiffo/Makefile.in b/contrib/addtiffo/Makefile.in index b4f4c097..36698112 100644 --- a/contrib/addtiffo/Makefile.in +++ b/contrib/addtiffo/Makefile.in @@ -211,12 +211,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/dbs/Makefile.in b/contrib/dbs/Makefile.in index d28b58f4..635e79dc 100644 --- a/contrib/dbs/Makefile.in +++ b/contrib/dbs/Makefile.in @@ -260,12 +260,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/dbs/xtiff/Makefile.in b/contrib/dbs/xtiff/Makefile.in index a5979d87..874a9949 100644 --- a/contrib/dbs/xtiff/Makefile.in +++ b/contrib/dbs/xtiff/Makefile.in @@ -182,12 +182,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/iptcutil/Makefile.in b/contrib/iptcutil/Makefile.in index 6207a44f..60a6707c 100644 --- a/contrib/iptcutil/Makefile.in +++ b/contrib/iptcutil/Makefile.in @@ -210,12 +210,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/mfs/Makefile.in b/contrib/mfs/Makefile.in index 6678dbb7..0b661aa6 100644 --- a/contrib/mfs/Makefile.in +++ b/contrib/mfs/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/pds/Makefile.in b/contrib/pds/Makefile.in index 2f130bff..7d688b5c 100644 --- a/contrib/pds/Makefile.in +++ b/contrib/pds/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/ras/Makefile.in b/contrib/ras/Makefile.in index a29e53eb..e5c660c9 100644 --- a/contrib/ras/Makefile.in +++ b/contrib/ras/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/stream/Makefile.in b/contrib/stream/Makefile.in index c6b2aedb..2062657b 100644 --- a/contrib/stream/Makefile.in +++ b/contrib/stream/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/tags/Makefile.in b/contrib/tags/Makefile.in index be3cac4c..4319ae36 100644 --- a/contrib/tags/Makefile.in +++ b/contrib/tags/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/contrib/win_dib/Makefile.in b/contrib/win_dib/Makefile.in index afa722d5..85c1861a 100644 --- a/contrib/win_dib/Makefile.in +++ b/contrib/win_dib/Makefile.in @@ -179,12 +179,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/html/Makefile.in b/html/Makefile.in index 58b21000..0f29580b 100644 --- a/html/Makefile.in +++ b/html/Makefile.in @@ -245,12 +245,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/html/images/Makefile.in b/html/images/Makefile.in index a397f30c..21e463c3 100644 --- a/html/images/Makefile.in +++ b/html/images/Makefile.in @@ -204,12 +204,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/html/man/Makefile.in b/html/man/Makefile.in index 37d2c707..8c16402b 100644 --- a/html/man/Makefile.in +++ b/html/man/Makefile.in @@ -204,12 +204,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in index bbf1b06c..bed1a13f 100644 --- a/libtiff/Makefile.in +++ b/libtiff/Makefile.in @@ -285,12 +285,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/libtiff/tif_config.h.in b/libtiff/tif_config.h.in index 9a6668d8..b69eb2d1 100644 --- a/libtiff/tif_config.h.in +++ b/libtiff/tif_config.h.in @@ -18,9 +18,6 @@ packages produce RGBA files but don't mark the alpha properly. */ #undef DEFAULT_EXTRASAMPLE_AS_ALPHA -/* Use the Apple OpenGL framework. */ -#undef HAVE_APPLE_OPENGL_FRAMEWORK - /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H @@ -36,6 +33,18 @@ /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT +/* Define to 1 if you have the header file. */ +#undef HAVE_GLUT_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLUT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_GL_GL_H + /* Define as 0 or 1 according to the floating point format suported by the machine */ #undef HAVE_IEEEFP @@ -88,6 +97,12 @@ /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GLU_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_OPENGL_GL_H + /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW @@ -148,6 +163,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Use nonstandard varargs form for the GLU tesselator callback */ +#undef HAVE_VARARGS_GLU_TESSCB + /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H diff --git a/man/Makefile.in b/man/Makefile.in index 08e1e8b0..3d3686e9 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -206,12 +206,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/port/Makefile.in b/port/Makefile.in index 51b36a9c..20d57356 100644 --- a/port/Makefile.in +++ b/port/Makefile.in @@ -210,12 +210,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/test/Makefile.in b/test/Makefile.in index 03704a2e..ee951945 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -312,12 +312,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tools/Makefile.in b/tools/Makefile.in index cf06ef8c..f0993d7b 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -320,12 +320,12 @@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 0ff6d22e..509c7b99 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.18 2010-06-16 01:54:48 bfriesen Exp $ */ +/* $Id: tiffcrop.c,v 1.19 2010-07-13 15:51:39 bfriesen Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -6,16 +6,16 @@ * Original code: * Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1991-1997 Silicon Graphics, Inc. - * Additions (c) Richard Nolde 2006-2009 + * Additions (c) Richard Nolde 2006-2010 * - * Permission to use, copy, modify, distribute, and sell this software and + * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided * that (i) the above copyright notices and this permission notice appear in * all copies of the software and related documentation, and (ii) the names of * Sam Leffler and Silicon Graphics may not be used in any advertising or * publicity relating to the software without the specific, prior written * permission of Sam Leffler and Silicon Graphics. - * + * * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. @@ -108,7 +108,7 @@ */ static char tiffcrop_version_id[] = "2.3"; -static char tiffcrop_rev_date[] = "06-15-2010"; +static char tiffcrop_rev_date[] = "07-12-2010"; #include "tif_config.h" #include "tiffiop.h" @@ -149,13 +149,14 @@ extern int getopt(int, char**, char*); #endif #define strneq(a,b,n) (strncmp((a),(b),(n)) == 0) -/* NB: the uint32 casts are to silence certain ANSI-C compilers */ -#define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) -#define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) - #define TRUE 1 #define FALSE 0 +#ifndef TIFFhowmany +#define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) +#define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) +#endif + /* * Definitions and data structures required to support cropping and image * manipulations. @@ -204,6 +205,7 @@ extern int getopt(int, char**, char*); #define MAX_IMAGES 2048 /* number of images in descrete list, not in the file */ #define MAX_SAMPLES 8 /* maximum number of samples per pixel supported */ #define MAX_BITS_PER_SAMPLE 64 /* maximum bit depth supported */ +#define MAX_EXPORT_PAGES 999999 /* maximum number of export pages per file */ #define DUMP_NONE 0 #define DUMP_TEXT 1 @@ -1674,9 +1676,6 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 (opt_ptr = strtok (NULL, ",")), i++) { opt_offset = strpbrk(opt_ptr, ":="); - /* - opt_offset = strchr(opt_ptr, ':'); - */ if (opt_offset == NULL) { TIFFError("Invalid dump option", "%s", optarg); @@ -1721,12 +1720,18 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32 { /* Look for dump level specification */ if (strncmp (opt_ptr, "lev", 3) == 0) dump->level = atoi(opt_offset + 1); - /* Look for input data dump file name */ + /* Look for input data dump file name */ if (strncmp (opt_ptr, "in", 2) == 0) + { strncpy (dump->infilename, opt_offset + 1, PATH_MAX - 20); - /* Look for output data dump file name */ + dump->infilename[PATH_MAX - 20] = '\0'; + } + /* Look for output data dump file name */ if (strncmp (opt_ptr, "out", 3) == 0) - strncpy (dump->outfilename, opt_offset + 1, PATH_MAX - 20); + { + strncpy (dump->outfilename, opt_offset + 1, PATH_MAX - 20); + dump->outfilename[PATH_MAX - 20] = '\0'; + } if (strncmp (opt_ptr, "deb", 3) == 0) dump->debug = atoi(opt_offset + 1); } @@ -2035,7 +2040,6 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, char export_ext[16]; char exportname[PATH_MAX]; - strcpy (export_ext, ".tiff"); if (autoindex && (*tiffout != NULL)) { /* Close any export file that was previously opened */ @@ -2043,7 +2047,11 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, *tiffout = NULL; } - strncpy (exportname, outname, PATH_MAX - 15); + strcpy (export_ext, ".tiff"); + memset (exportname, '\0', PATH_MAX); + + /* Leave room for page number portion of the new filename */ + strncpy (exportname, outname, PATH_MAX - 16); if (*tiffout == NULL) /* This is a new export file */ { if (autoindex) @@ -2057,13 +2065,21 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex, else strncpy (export_ext, ".tiff", 5); export_ext[5] = '\0'; - - sprintf (filenum, "-%03d%s", findex, export_ext); - filenum[15] = '\0'; - strncat (exportname, filenum, 14); - } - - *tiffout = TIFFOpen(exportname, mode); + + /* MAX_EXPORT_PAGES limited to 6 digits to prevent string overflow of pathname */ + if (findex > MAX_EXPORT_PAGES) + { + TIFFError("update_output_file", "Maximum of %d pages per file exceeded.\n", MAX_EXPORT_PAGES); + return 1; + } + + sprintf (filenum, "-%03d%s", findex, export_ext); + filenum[14] = '\0'; + strncat (exportname, filenum, 15); + } + exportname[PATH_MAX - 1] = '\0'; + + *tiffout = TIFFOpen(exportname, mode); if (*tiffout == NULL) { TIFFError("update_output_file", "Unable to open output file %s\n", exportname);