diff options
author | salo <salo@pkgsrc.org> | 2007-08-12 21:53:42 +0000 |
---|---|---|
committer | salo <salo@pkgsrc.org> | 2007-08-12 21:53:42 +0000 |
commit | 57c28a45de8659dbd32920b76615c3d164ef4c55 (patch) | |
tree | b8bf3a9b6e23c6e2eea4f1971d40bc7c8c94eb18 /graphics/jasper/patches | |
parent | 457ccce58204cbc23bb77dfcc1e8191303a259c3 (diff) | |
download | pkgsrc-57c28a45de8659dbd32920b76615c3d164ef4c55.tar.gz |
Use correct Autoconf macro for stdbool.h detection and functionality test.
Fixes build of some depending package such as netpbm (with its horrible,
horrible hardcoded _XOPEN_SOURCES definitions all over the place) on Solaris.
Will be submitted upstream.
Diffstat (limited to 'graphics/jasper/patches')
-rw-r--r-- | graphics/jasper/patches/patch-ah | 177 |
1 files changed, 177 insertions, 0 deletions
diff --git a/graphics/jasper/patches/patch-ah b/graphics/jasper/patches/patch-ah new file mode 100644 index 00000000000..5d8cb7c6d6c --- /dev/null +++ b/graphics/jasper/patches/patch-ah @@ -0,0 +1,177 @@ +$NetBSD: patch-ah,v 1.3 2007/08/12 21:53:42 salo Exp $ + +--- configure.orig 2007-01-19 21:54:48.000000000 +0000 ++++ configure 2007-08-12 20:56:30.000000000 +0000 +@@ -20979,6 +20979,163 @@ _ACEOF + + fi + ++echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 ++echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 ++if test "${ac_cv_header_stdbool_h+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++#include <stdbool.h> ++#ifndef bool ++# error bool is not defined ++#endif ++#ifndef false ++# error false is not defined ++#endif ++#if false ++# error false is not 0 ++#endif ++#ifndef true ++# error true is not defined ++#endif ++#if true != 1 ++# error true is not 1 ++#endif ++#ifndef __bool_true_false_are_defined ++# error __bool_true_false_are_defined is not defined ++#endif ++ ++ struct s { _Bool s: 1; _Bool t; } s; ++ ++ char a[true == 1 ? 1 : -1]; ++ char b[false == 0 ? 1 : -1]; ++ char c[__bool_true_false_are_defined == 1 ? 1 : -1]; ++ char d[(bool) -0.5 == true ? 1 : -1]; ++ bool e = &s; ++ char f[(_Bool) -0.0 == false ? 1 : -1]; ++ char g[true]; ++ char h[sizeof (_Bool)]; ++ char i[sizeof s.t]; ++ ++int ++main () ++{ ++ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_header_stdbool_h=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_header_stdbool_h=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 ++echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 ++echo "$as_me:$LINENO: checking for _Bool" >&5 ++echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 ++if test "${ac_cv_type__Bool+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++$ac_includes_default ++int ++main () ++{ ++if ((_Bool *) 0) ++ return 0; ++if (sizeof (_Bool)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_type__Bool=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ac_cv_type__Bool=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 ++echo "${ECHO_T}$ac_cv_type__Bool" >&6 ++if test $ac_cv_type__Bool = yes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE__BOOL 1 ++_ACEOF ++ ++ ++fi ++ ++if test $ac_cv_header_stdbool_h = yes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_STDBOOL_H 1 ++_ACEOF ++ ++fi + + + +@@ -20990,7 +21147,7 @@ fi + + + +-for ac_header in fcntl.h limits.h unistd.h stdint.h stdbool.h io.h windows.h sys/types.h sys/time.h stdlib.h stddef.h ++for ac_header in fcntl.h limits.h unistd.h stdint.h io.h windows.h sys/types.h sys/time.h stdlib.h stddef.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then |