esac
-if test "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
- echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
+ echo "$as_me:$LINENO: checking for strings.h" >&5
+echo $ECHO_N "checking for strings.h... $ECHO_C" >&6
+if test "${ac_cv_header_strings_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_strings_h=no
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5
+echo "${ECHO_T}$ac_cv_header_strings_h" >&6
+ if test "$ac_cv_header_strings_h" = "no"; then
+ echo "$as_me:$LINENO: result: forced no into cache" >&5
+echo "${ECHO_T}forced no into cache" >&6
+ else
+ { echo "$as_me:$LINENO: WARNING: strings.h is not compatible with Mac OS X" >&5
+echo "$as_me: WARNING: strings.h is not compatible with Mac OS X" >&2;}
+ fi
+fi
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
done
-fi
for ac_header in stdlib.h
elif test "$wxUSE_MSW" = 1; then
OPENGL_LIBS="-lopengl32 -lglu32"
else
+
+
+ac_find_includes=
+for ac_dir in $SEARCH_INCLUDE /usr/include;
+ do
+ if test -f "$ac_dir/GL/gl.h"; then
+ ac_find_includes=$ac_dir
+ break
+ fi
+ done
+
+ if test "$ac_find_includes" != "" ; then
+ echo "$as_me:$LINENO: result: found in $ac_find_includes" >&5
+echo "${ECHO_T}found in $ac_find_includes" >&6
+ set -x
+
+ if test "x$ac_find_includes" = "x/usr/include"; then
+ ac_path_to_include=""
+ else
+ echo "$CPPFLAGS" | grep "\-I$ac_find_includes" > /dev/null
+ result=$?
+ if test $result = 0; then
+ ac_path_to_include=""
+ else
+ ac_path_to_include=" -I$ac_find_includes"
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS$ac_path_to_include"
+ set +x
+ fi
+
if test "${ac_cv_header_GL_gl_h+set}" = set; then
echo "$as_me:$LINENO: checking for GL/gl.h" >&5
echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6
dnl test for strings.h needed under AIX, but do not check for it wxMac as
dnl it exists but is only a simple redirection to string.h and it is in
dnl conflict with Strings.h in FlatCarbon headers
-if test "$wxUSE_MAC" != 1 -a "$wxUSE_COCOA" != 1; then
- dnl defines HAVE_STRINGS_H
- AC_CHECK_HEADERS(strings.h)
+dnl
+dnl Autoconf 2.5 tends to check for strings.h on its own, so avoiding the
+dnl test (as the current configure script does) is not possible. Instead,
+dnl you must remind autoconf that strings.h is NOT valid. The autoconf
+dnl test succeeds because there is a strings.h file that simply includes
+dnl string.h. Unfortunately, there is also a strings.h as part of the
+dnl FlatCarbon headers. -- David Elliott
+if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1; then
+ AC_CACHE_CHECK([for strings.h], ac_cv_header_strings_h,
+ [ac_cv_header_strings_h=no])
+ if test "$ac_cv_header_strings_h" = "no"; then
+ AC_MSG_RESULT([forced no into cache])
+ else
+ AC_MSG_WARN([strings.h is not compatible with Mac OS X])
+ fi
fi
+dnl defines HAVE_STRINGS_H
+AC_CHECK_HEADERS(strings.h)
dnl defines HAVE_STDLIB_H
AC_CHECK_HEADERS(stdlib.h)
elif test "$wxUSE_MSW" = 1; then
OPENGL_LIBS="-lopengl32 -lglu32"
else
+ dnl David Elliott: Without this snippet AC_CHECK_HEADER fails to find
+ dnl GL/gl.h on Mac OS X where it is located in
+ dnl /usr/X11R6/include/GL/gl.h:
+
+ WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, GL/gl.h)
+ if test "$ac_find_includes" != "" ; then
+ AC_MSG_RESULT(found in $ac_find_includes)
+ set -x
+ WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
+ CPPFLAGS="$CPPFLAGS$ac_path_to_include"
+ set +x
+ fi
+
AC_CHECK_HEADER(GL/gl.h,
[
found_gl=0