fermisurfer Git
Revision | 5f5d3867c424171659bee8aec8e89c0915a920f7 (tree) |
---|---|
Zeit | 2018-11-21 01:02:30 |
Autor | ![]() |
Commiter | Mitsuaki Kawamura |
USE c++
Just change the extension: h -> hpp, c -> cpp
Use extern for global variables
@@ -1,7 +1,7 @@ | ||
1 | -# Makefile.in generated by automake 1.15 from Makefile.am. | |
1 | +# Makefile.in generated by automake 1.15.1 from Makefile.am. | |
2 | 2 | # @configure_input@ |
3 | 3 | |
4 | -# Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
4 | +# Copyright (C) 1994-2017 Free Software Foundation, Inc. | |
5 | 5 | |
6 | 6 | # This Makefile.in is free software; the Free Software Foundation |
7 | 7 | # gives unlimited permission to copy and/or distribute it, |
@@ -161,7 +161,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ | ||
161 | 161 | $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ |
162 | 162 | $(top_srcdir)/config/config.sub \ |
163 | 163 | $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ |
164 | - config/compile config/config.guess config/config.sub \ | |
164 | + README config/compile config/config.guess config/config.sub \ | |
165 | 165 | config/depcomp config/install-sh config/missing |
166 | 166 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
167 | 167 | distdir = $(PACKAGE)-$(VERSION) |
@@ -229,13 +229,10 @@ ECHO_T = @ECHO_T@ | ||
229 | 229 | EGREP = @EGREP@ |
230 | 230 | EXEEXT = @EXEEXT@ |
231 | 231 | GLUT_CFLAGS = @GLUT_CFLAGS@ |
232 | -GLUT_LDFLAGS = @GLUT_LDFLAGS@ | |
233 | 232 | GLUT_LIBS = @GLUT_LIBS@ |
234 | 233 | GLU_CFLAGS = @GLU_CFLAGS@ |
235 | -GLU_LDFLAGS = @GLU_LDFLAGS@ | |
236 | 234 | GLU_LIBS = @GLU_LIBS@ |
237 | 235 | GL_CFLAGS = @GL_CFLAGS@ |
238 | -GL_LDFLAGS = @GL_LDFLAGS@ | |
239 | 236 | GL_LIBS = @GL_LIBS@ |
240 | 237 | GREP = @GREP@ |
241 | 238 | INSTALL = @INSTALL@ |
@@ -265,11 +262,6 @@ SET_MAKE = @SET_MAKE@ | ||
265 | 262 | SHELL = @SHELL@ |
266 | 263 | STRIP = @STRIP@ |
267 | 264 | VERSION = @VERSION@ |
268 | -XMKMF = @XMKMF@ | |
269 | -X_CFLAGS = @X_CFLAGS@ | |
270 | -X_EXTRA_LIBS = @X_EXTRA_LIBS@ | |
271 | -X_LIBS = @X_LIBS@ | |
272 | -X_PRE_LIBS = @X_PRE_LIBS@ | |
273 | 265 | abs_builddir = @abs_builddir@ |
274 | 266 | abs_srcdir = @abs_srcdir@ |
275 | 267 | abs_top_builddir = @abs_top_builddir@ |
@@ -550,7 +542,7 @@ distdir: $(DISTFILES) | ||
550 | 542 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ |
551 | 543 | || chmod -R a+r "$(distdir)" |
552 | 544 | dist-gzip: distdir |
553 | - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
545 | + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz | |
554 | 546 | $(am__post_remove_distdir) |
555 | 547 | |
556 | 548 | dist-bzip2: distdir |
@@ -576,7 +568,7 @@ dist-shar: distdir | ||
576 | 568 | @echo WARNING: "Support for shar distribution archives is" \ |
577 | 569 | "deprecated." >&2 |
578 | 570 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 |
579 | - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | |
571 | + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz | |
580 | 572 | $(am__post_remove_distdir) |
581 | 573 | |
582 | 574 | dist-zip: distdir |
@@ -594,7 +586,7 @@ dist dist-all: | ||
594 | 586 | distcheck: dist |
595 | 587 | case '$(DIST_ARCHIVES)' in \ |
596 | 588 | *.tar.gz*) \ |
597 | - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
589 | + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
598 | 590 | *.tar.bz2*) \ |
599 | 591 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ |
600 | 592 | *.tar.lz*) \ |
@@ -604,7 +596,7 @@ distcheck: dist | ||
604 | 596 | *.tar.Z*) \ |
605 | 597 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ |
606 | 598 | *.shar.gz*) \ |
607 | - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | |
599 | + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ | |
608 | 600 | *.zip*) \ |
609 | 601 | unzip $(distdir).zip ;;\ |
610 | 602 | esac |
@@ -1,6 +1,6 @@ | ||
1 | -# generated automatically by aclocal 1.15 -*- Autoconf -*- | |
1 | +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- | |
2 | 2 | |
3 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
3 | +# Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
4 | 4 | |
5 | 5 | # This file is free software; the Free Software Foundation |
6 | 6 | # gives unlimited permission to copy and/or distribute it, |
@@ -21,34 +21,41 @@ If you have problems, you may need to regenerate the build system entirely. | ||
21 | 21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
22 | 22 | |
23 | 23 | # =========================================================================== |
24 | -# http://www.gnu.org/software/autoconf-archive/ax_check_gl.html | |
24 | +# https://www.gnu.org/software/autoconf-archive/ax_check_gl.html | |
25 | 25 | # =========================================================================== |
26 | 26 | # |
27 | 27 | # SYNOPSIS |
28 | 28 | # |
29 | -# AX_CHECK_GL | |
29 | +# AX_CHECK_GL([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) | |
30 | 30 | # |
31 | 31 | # DESCRIPTION |
32 | 32 | # |
33 | -# Check for an OpenGL implementation. If GL is found, the required | |
34 | -# compiler and linker flags are included in the output variables | |
35 | -# "GL_CFLAGS", "GL_LIBS", "GL_LDFLAGS", respectively. If no usable GL | |
36 | -# implementation is found, "no_gl" is set to "yes". | |
37 | -# | |
38 | -# You could disable OpenGL using --with-gl=no | |
39 | -# | |
40 | -# You could choose a specific OpenGL libs using --with-gl=lib_name | |
41 | -# | |
42 | -# Under darwin, cygwin and mingw target you could prefer the OpenGL | |
43 | -# implementation that link with X setting --with-gl=x or without X support | |
44 | -# with --with-gl=nox. Notes that this script try to guess the right | |
45 | -# implementation. | |
46 | -# | |
47 | -# If the header "GL/gl.h" is found, "HAVE_GL_GL_H" is defined. If the | |
48 | -# header "OpenGL/gl.h" is found, HAVE_OPENGL_GL_H is defined. These | |
49 | -# preprocessor definitions may not be mutually exclusive. | |
50 | -# | |
51 | -# You should use something like this in your headers: | |
33 | +# Checks for an OpenGL implementation. If a valid OpenGL implementation is | |
34 | +# found, this macro would set C preprocessor symbol HAVE_GL to 1. | |
35 | +# | |
36 | +# If either a valid OpenGL header or library was not found, by default the | |
37 | +# configuration would exits on error. This behavior can be overwritten by | |
38 | +# providing a custom "ACTION-IF-NOT-FOUND" hook. | |
39 | +# | |
40 | +# If the header, library was found, and been tested for compiling and | |
41 | +# linking the configuration would export the required compiler flags to | |
42 | +# "GL_CFLAGS" and "GL_LIBS". These two variables can also be overwritten | |
43 | +# by user from the command line if they want to link against the library | |
44 | +# they specified instead of having the configuration script to detect the | |
45 | +# flags automatically. Note that having "GL_CFLAGS" or "GL_LIBS" set | |
46 | +# doesn't mean it can compile or link with the flags, since it could be | |
47 | +# overwritten by user. However the "HAVE_GL" symbol and "ACTION-IF-FOUND" | |
48 | +# hook is always guaranteed to reflect a valid OpenGL implementation. | |
49 | +# | |
50 | +# If user didn't specify the "ACTION-IF-FOUND" hook, the configuration | |
51 | +# would prepend "GL_CFLAGS" and "GL_LIBS" to "CFLAGS" and "LIBS", like | |
52 | +# many other autoconf macros do. | |
53 | +# | |
54 | +# OpenGL is one of the libraries that has different header names on | |
55 | +# different platforms. This macro does the header detection, and will | |
56 | +# export the following symbol: "HAVE_GL_GL_H" for having "GL/gl.h" or | |
57 | +# "HAVE_OPENGL_GL_H" for having "OpenGL/gl.h". To write a portable OpenGL | |
58 | +# code, you should include OpenGL header like so: | |
52 | 59 | # |
53 | 60 | # #if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
54 | 61 | # # include <windows.h> |
@@ -61,10 +68,18 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) | ||
61 | 68 | # # error no gl.h |
62 | 69 | # #endif |
63 | 70 | # |
71 | +# On the OSX platform, there's two possible OpenGL implementation. One is | |
72 | +# the OpenGL that ships with OSX, the other comes with X11/XQuartz | |
73 | +# (http://www.xquartz.org). To use the xquartz variant, user can use the | |
74 | +# option --with-xquartz-gl[=path to xquartz root]. By default the | |
75 | +# configuration will check "/opt/X11", which is the default X11 install | |
76 | +# location on OSX. | |
77 | +# | |
64 | 78 | # LICENSE |
65 | 79 | # |
66 | 80 | # Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> |
67 | 81 | # Copyright (c) 2012 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> |
82 | +# Copyright (c) 2016 Felix Chern <idryman@gmail.com> | |
68 | 83 | # |
69 | 84 | # This program is free software; you can redistribute it and/or modify it |
70 | 85 | # under the terms of the GNU General Public License as published by the |
@@ -77,7 +92,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) | ||
77 | 92 | # Public License for more details. |
78 | 93 | # |
79 | 94 | # You should have received a copy of the GNU General Public License along |
80 | -# with this program. If not, see <http://www.gnu.org/licenses/>. | |
95 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
81 | 96 | # |
82 | 97 | # As a special exception, the respective Autoconf Macro's copyright owner |
83 | 98 | # gives unlimited permission to copy, distribute and modify the configure |
@@ -92,8 +107,9 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) | ||
92 | 107 | # modified version of the Autoconf Macro, you may extend this special |
93 | 108 | # exception to the GPL to apply to your modified version as well. |
94 | 109 | |
95 | -#serial 17 | |
110 | +#serial 22 | |
96 | 111 | |
112 | +# example gl program | |
97 | 113 | m4_define([_AX_CHECK_GL_PROGRAM], |
98 | 114 | [AC_LANG_PROGRAM([[ |
99 | 115 | # if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
@@ -121,59 +137,44 @@ AC_DEFUN([_AX_CHECK_GL_INCLUDES_DEFAULT],dnl | ||
121 | 137 | ] |
122 | 138 | ]) |
123 | 139 | |
124 | -dnl local save flags | |
125 | -AC_DEFUN([_AX_CHECK_GL_SAVE_FLAGS], | |
126 | -[dnl | |
127 | -ax_check_gl_saved_libs="${LIBS}" | |
128 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
129 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
130 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
131 | -]) | |
132 | - | |
133 | -dnl local restore flags | |
134 | -AC_DEFUN([_AX_CHECK_GL_RESTORE_FLAGS], | |
135 | -[dnl | |
136 | -LIBS="${ax_check_gl_saved_libs}" | |
137 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
138 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
139 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
140 | -]) | |
141 | 140 | |
142 | -dnl default switch case failure | |
143 | -AC_DEFUN([_AX_CHECK_MSG_FAILURE_ORDER], | |
144 | -[dnl | |
145 | - AC_MSG_FAILURE([Order logic in ax_check_gl is buggy]) | |
141 | +# _AX_CHECK_GL_SAVE_FLAGS(LIST-OF-FLAGS) | |
142 | +# Use this macro before you modify the flags. | |
143 | +# Restore the flags by _AX_CHECK_GL_RESTORE_FLAGS | |
144 | +# | |
145 | +# Example: _AX_CHECK_GL_SAVE_FLAGS([[CFLAGS],[LIBS]]) expands to | |
146 | +# gl_saved_flag_cflags=$CFLAGS | |
147 | +# gl_saved_flag_libs=$LIBS | |
148 | +# CFLAGS="$GL_CFLAGS $CFLAGS" | |
149 | +# LIBS="$GL_LIBS $LIBS" | |
150 | +AC_DEFUN([_AX_CHECK_GL_SAVE_FLAGS], [ | |
151 | + AX_SAVE_FLAGS_WITH_PREFIX([GL],[$1]) | |
152 | + AC_LANG_PUSH([C]) | |
146 | 153 | ]) |
147 | 154 | |
148 | -# set the varible ax_check_gl_need_x | |
149 | -# this variable determine if we need opengl that link with X | |
150 | -# value are default aka try the first library wether if it link or not with x | |
151 | -# yes that means we need a opengl with x | |
152 | -# no that means we do not need an opengl with x | |
153 | -AC_DEFUN([_AX_CHECK_GL_NEED_X], | |
154 | -[dnl | |
155 | - # do not check if empty : allow a subroutine to modify the choice | |
156 | - AS_IF([test "X$ax_check_gl_need_x" = "X"], | |
157 | - [ax_check_gl_need_x="default" | |
158 | - AS_IF([test "X$no_x" = "Xyes"],[ax_check_gl_need_x="no"]) | |
159 | - AS_IF([test "X$ax_check_gl_want_gl" = "Xnox"],[ax_check_gl_need_x="no"]) | |
160 | - AS_IF([test "X$ax_check_gl_want_gl" = "Xx"],[ax_check_gl_need_x="yes"])]) | |
155 | +# _AX_CHECK_GL_RESTORE_FLAGS(LIST-OF-FLAGS) | |
156 | +# Use this marcro to restore the flags you saved using | |
157 | +# _AX_CHECK_GL_SAVE_FLAGS | |
158 | +# | |
159 | +# Example: _AX_CHECK_GL_RESTORE_FLAGS([[CFLAGS],[LIBS]]) expands to | |
160 | +# CFLAGS="$gl_saved_flag_cflags" | |
161 | +# LIBS="$gl_saved_flag_libs" | |
162 | +AC_DEFUN([_AX_CHECK_GL_RESTORE_FLAGS], [ | |
163 | + AX_RESTORE_FLAGS_WITH_PREFIX([GL],[$1]) | |
164 | + AC_LANG_POP([C]) | |
161 | 165 | ]) |
162 | 166 | |
163 | -# compile the example program | |
167 | +# Check if the program compiles | |
164 | 168 | AC_DEFUN([_AX_CHECK_GL_COMPILE], |
165 | 169 | [dnl |
166 | - AC_LANG_PUSH([C]) | |
167 | - _AX_CHECK_GL_SAVE_FLAGS() | |
168 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
170 | + _AX_CHECK_GL_SAVE_FLAGS([CFLAGS]) | |
169 | 171 | AC_COMPILE_IFELSE([_AX_CHECK_GL_PROGRAM], |
170 | 172 | [ax_check_gl_compile_opengl="yes"], |
171 | 173 | [ax_check_gl_compile_opengl="no"]) |
172 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
173 | - AC_LANG_POP([C]) | |
174 | + _AX_CHECK_GL_RESTORE_FLAGS([CFLAGS]) | |
174 | 175 | ]) |
175 | 176 | |
176 | -# compile the example program (cache) | |
177 | +# Compile the example program (cache) | |
177 | 178 | AC_DEFUN([_AX_CHECK_GL_COMPILE_CV], |
178 | 179 | [dnl |
179 | 180 | AC_CACHE_CHECK([for compiling a minimal OpenGL program],[ax_cv_check_gl_compile_opengl], |
@@ -182,22 +183,17 @@ AC_DEFUN([_AX_CHECK_GL_COMPILE_CV], | ||
182 | 183 | ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}" |
183 | 184 | ]) |
184 | 185 | |
185 | -# link the example program | |
186 | +# Link the example program | |
186 | 187 | AC_DEFUN([_AX_CHECK_GL_LINK], |
187 | 188 | [dnl |
188 | - AC_LANG_PUSH([C]) | |
189 | - _AX_CHECK_GL_SAVE_FLAGS() | |
190 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
191 | - LIBS="${GL_LIBS} ${LIBS}" | |
192 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
189 | + _AX_CHECK_GL_SAVE_FLAGS([[CFLAGS],[LIBS],[LDFLAGS]]) | |
193 | 190 | AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM], |
194 | 191 | [ax_check_gl_link_opengl="yes"], |
195 | 192 | [ax_check_gl_link_opengl="no"]) |
196 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
197 | - AC_LANG_POP([C]) | |
193 | + _AX_CHECK_GL_RESTORE_FLAGS([[CFLAGS],[LIBS],[LDFLAGS]]) | |
198 | 194 | ]) |
199 | 195 | |
200 | -# link the example program (cache) | |
196 | +# Link the example program (cache) | |
201 | 197 | AC_DEFUN([_AX_CHECK_GL_LINK_CV], |
202 | 198 | [dnl |
203 | 199 | AC_CACHE_CHECK([for linking a minimal OpenGL program],[ax_cv_check_gl_link_opengl], |
@@ -206,398 +202,155 @@ AC_DEFUN([_AX_CHECK_GL_LINK_CV], | ||
206 | 202 | ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}" |
207 | 203 | ]) |
208 | 204 | |
209 | -dnl Check headers manually (default case) | |
210 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT], | |
211 | -[AC_REQUIRE([AC_PATH_XTRA]) | |
212 | - AC_LANG_PUSH([C]) | |
213 | - _AX_CHECK_GL_SAVE_FLAGS() | |
214 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
215 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
216 | - AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
217 | - # FIXME: use extra cflags | |
218 | - AC_CHECK_HEADERS([GL/gl.h],[ax_check_gl_have_headers="yes"], | |
219 | - [ax_check_gl_have_headers_headers="no"], | |
220 | - [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
221 | - # do not try darwin specific OpenGl/gl.h | |
222 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
223 | - AC_LANG_POP([C]) | |
224 | -]) | |
225 | 205 | |
226 | -# darwin headers without X | |
227 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX],[ | |
228 | - AC_LANG_PUSH([C]) | |
229 | - _AX_CHECK_GL_SAVE_FLAGS() | |
230 | - # FIXME: use -framework opengl as an extra cflags | |
231 | - CFLAGS="-framework opengl ${GL_CFLAGS} ${CFLAGS}" | |
232 | - AC_CHECK_HEADERS([OpenGL/gl.h],[ax_check_gl_have_headers="yes"], | |
233 | - [ax_check_gl_have_headers_headers="no"], | |
234 | - [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
235 | - AS_IF([test "X$ax_check_gl_have_headers" = "yes"], | |
236 | - [GL_CFLAGS="-framework opengl ${GL_CFLAGS}"]) | |
237 | - _AX_CHECK_GL_SAVE_FLAGS() | |
238 | - AC_LANG_POP([C]) | |
239 | -]) | |
240 | - | |
241 | -# check header for darwin | |
242 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS_DARWIN], | |
243 | -[AC_REQUIRE([_AX_CHECK_GL_NEED_X])dnl | |
244 | - AS_CASE(["$ax_check_gl_order"], | |
245 | - # try to use framework | |
246 | - ["gl"],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()], | |
247 | - # try to use framework then mesa (X) | |
248 | - ["gl mesagl"],[ | |
249 | - _AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX() | |
250 | - AS_IF([test "X$ax_check_gl_have_headers" = "yes"], | |
251 | - [ax_check_gl_order="gl" | |
252 | - ax_check_gl_need_x="yes"], | |
253 | - [ax_check_gl_order="mesagl gl" | |
254 | - ax_check_gl_need_x="no"] | |
255 | - # retry with general test | |
256 | - _AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()])], | |
257 | - ["mesagl gl"],[ | |
258 | - _AX_CHECK_GL_MANUAL_HEADERS_DEFAULT() | |
259 | - AS_IF([test "X$ax_check_gl_have_headers" = "yes"], | |
260 | - [ax_check_gl_order="mesagl gl" | |
261 | - ax_check_gl_need_x="no"], | |
262 | - [ax_check_gl_order="gl" | |
263 | - ax_check_gl_need_x="yes" | |
264 | - # retry with framework | |
265 | - _AX_CHECK_GL_MANUAL_HEADERS_DARWIN_NOX()])], | |
266 | - [_AX_CHECK_MSG_FAILURE_ORDER()]) | |
267 | -]) | |
268 | - | |
269 | -dnl Check headers manually: subroutine must set ax_check_gl_have_headers={yes,no} | |
270 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_HEADERS], | |
271 | -[AC_REQUIRE([AC_CANONICAL_HOST]) | |
272 | - AS_CASE([${host}], | |
273 | - [*-darwin*],[_AX_CHECK_GL_MANUAL_HEADERS_DARWIN], | |
274 | - [_AX_CHECK_GL_MANUAL_HEADERS_DEFAULT()]) | |
275 | - AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers], | |
276 | - [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"]) | |
206 | +# _AX_CHECK_GL_MANUAL_LIBS_GENERIC(LIBRARIES-TO-SEARCH) | |
207 | +# Searches library provided in $1, and output the flag | |
208 | +# $ax_check_gl_lib_opengl | |
209 | +AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_GENERIC], [ | |
210 | + AS_IF([test -n "$GL_LIBS"],[], [ | |
211 | + ax_check_gl_manual_libs_generic_extra_libs="$1" | |
212 | + AS_IF([test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"], | |
213 | + [AC_MSG_ERROR([AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
214 | + | |
215 | + _AX_CHECK_GL_SAVE_FLAGS([CFLAGS]) | |
216 | + AC_SEARCH_LIBS([glBegin],[$ax_check_gl_manual_libs_generic_extra_libs], [ | |
217 | + ax_check_gl_lib_opengl="yes" | |
218 | + break | |
219 | + ]) | |
220 | + AS_IF([test "X$ax_check_gl_lib_opengl"="Xyes"], | |
221 | + [GL_LIBS="${ac_cv_search_glBegin}"]) | |
222 | + _AX_CHECK_GL_RESTORE_FLAGS([CFLAGS]) | |
223 | + ]) | |
224 | +]) | |
225 | + | |
226 | +# _WITH_XQUARTZ_GL | |
227 | +# ---------------- | |
228 | +# Provides an option in command line to specify the XQuartz installation | |
229 | +# path on OSX, so that user can link to it instead of using the default | |
230 | +# OSX OpenGL framework. (Mac OSX only) | |
231 | +AC_DEFUN_ONCE([_WITH_XQUARTZ_GL],[ | |
232 | + AC_ARG_WITH([xquartz-gl], | |
233 | + [AS_HELP_STRING([--with-xquartz-gl@<:@=DIR@:>@], | |
234 | + [On Mac OSX, use opengl provided by X11/XQuartz instead of the built-in framework. | |
235 | + If enabled, the default location is @<:@DIR=/opt/X11@:>@. | |
236 | + This option is default to false.])], | |
237 | + [AS_IF([test "X$with_xquartz_gl"="Xyes"], | |
238 | + [with_xquartz_gl="/opt/X11"])], | |
239 | + [with_xquartz_gl=no]) | |
240 | + AS_IF([test "X$with_xquartz_gl" != "Xno"], | |
241 | + [AC_MSG_CHECKING([OSX X11 path]) | |
242 | + AS_IF([test -e "$with_xquartz_gl"], | |
243 | + [AC_MSG_RESULT(["$with_xquartz_gl"]) | |
244 | + CFLAGS="-I$with_xquartz_gl/include $CFLAGS" | |
245 | + LIBS="-L$with_xquartz_gl/lib $LIBS" | |
246 | + ], | |
247 | + [with_xquartz_gl=no | |
248 | + AC_MSG_RESULT([no]) | |
249 | + AC_MSG_WARN([--with-xquartz-gl was given, but test for X11 failed. Fallback to system framework]) | |
250 | + ]) | |
251 | + ]) | |
277 | 252 | ]) |
278 | 253 | |
279 | -# dnl try to found library (generic case) | |
280 | -# dnl $1 is set to the library to found | |
281 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_GENERIC], | |
282 | -[dnl | |
283 | - ax_check_gl_manual_libs_generic_extra_libs="$1" | |
284 | - AS_IF([test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"], | |
285 | - [AC_MSG_ERROR([AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
286 | - | |
287 | - AC_LANG_PUSH([C]) | |
288 | - _AX_CHECK_GL_SAVE_FLAGS() | |
289 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
290 | - LIBS="${GL_LIBS} ${LIBS}" | |
291 | - AC_SEARCH_LIBS([glBegin],[$ax_check_gl_manual_libs_generic_extra_libs], | |
292 | - [ax_check_gl_lib_opengl="yes"], | |
293 | - [ax_check_gl_lib_opengl="no"]) | |
294 | - AS_CASE([$ac_cv_search_glBegin], | |
295 | - ["none required"],[], | |
296 | - [no],[], | |
297 | - [GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}"]) | |
298 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
299 | - AC_LANG_PUSH([C]) | |
254 | +# OSX specific setup for OpenGL check | |
255 | +AC_DEFUN([_AX_CHECK_DARWIN_GL], [ | |
256 | + AC_REQUIRE([_WITH_XQUARTZ_GL]) | |
257 | + AS_IF([test "x$with_xquartz_gl" != "xno"], | |
258 | + [GL_LIBS="${GL_LIBS:--lGL}"], | |
259 | + [GL_LIBS="${GL_LIBS:--framework OpenGL}"]) | |
300 | 260 | ]) |
301 | 261 | |
302 | -# dnl try to found lib under darwin | |
303 | -# darwin opengl hack | |
304 | -# see http://web.archive.org/web/20090410052741/http://developer.apple.com/qa/qa2007/qa1567.html | |
305 | -# and http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/ | |
306 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_DARWIN], | |
307 | -[# ldhack list | |
308 | - ldhack1 = "-Wl,-framework,OpenGL" | |
309 | - ldhack2 = "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" | |
310 | - ldhack3 = "$ldhack1,$ldhack2" | |
311 | - | |
312 | - # select hack | |
313 | - AS_IF([test "X$ax_check_gl_need_x" = "Xyes"], | |
314 | - [# libs already set by -framework cflag | |
315 | - darwinlibs="" | |
316 | - ldhacks="$ldhack1 $ldhack2 $ldhack3"], | |
317 | - [# do not use framework ldflags in case of x version | |
318 | - darwinlibs="GL gl MesaGL" | |
319 | - ldhack="$ldhack2"]) | |
320 | - | |
321 | - ax_check_gl_link_opengl="no" | |
322 | - for extralibs in " " $darwinlibs; do | |
323 | - for extraldflags in " " ldhacks; do | |
324 | - AC_LANG_PUSH([C]) | |
325 | - _AX_CHECK_GL_SAVE_FLAGS() | |
326 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
327 | - LIBS="$extralibs ${GL_LIBS} ${LIBS}" | |
328 | - LDFLAGS="$extraldflags ${GL_LDFLAGS} ${LDFLAGS}" | |
329 | - AC_LINK_IFELSE([_AX_CHECK_GL_PROGRAM], | |
330 | - [ax_check_gl_link_opengl="yes"], | |
331 | - [ax_check_gl_link_opengl="no"]) | |
332 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
333 | - AC_LANG_POP([C]) | |
334 | - AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break]) | |
335 | - done; | |
336 | - AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"],[break]) | |
337 | - done; | |
338 | - GL_LIBS="$extralibs ${GL_LIBS}" | |
339 | - GL_LDFLAGS="$extraldflags ${GL_LDFLAGS}" | |
340 | -]) | |
341 | 262 | |
342 | -dnl Check library manually: subroutine must set | |
343 | -dnl $ax_check_gl_lib_opengl={yes,no} | |
344 | -AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS], | |
263 | +# AX_CHECK_GL_LIB([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
264 | +# --------------------------------------------------------- | |
265 | +# Checks OpenGL headers and library and provides hooks for success and failures. | |
266 | +# When $1 is not set, this macro would modify CFLAGS and LIBS environment variables. | |
267 | +# However, user can override this behavior by providing their own hooks. | |
268 | +# The CFLAGS and LIBS flags required by OpenGL is always exported in | |
269 | +# GL_CFLAGS and GL_LIBS environment variable. | |
270 | +# | |
271 | +# In other words, the default behavior of AX_CHECK_GL_LIB() is equivalent to | |
272 | +# AX_CHECK_GL_LIB( | |
273 | +# [CFLAGS="$GL_CFLAGS $CFLAGS" | |
274 | +# LIBS="$GL_LIBS $LIBS"] | |
275 | +# ) | |
276 | +AC_DEFUN([AX_CHECK_GL], | |
345 | 277 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
278 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
279 | + AC_ARG_VAR([GL_CFLAGS],[C compiler flags for GL, overriding configure script defaults]) | |
280 | + AC_ARG_VAR([GL_LIBS],[Linker flags for GL, overriding configure script defaults]) | |
281 | + | |
282 | + dnl --with-gl or not can be implemented outside of check-gl | |
346 | 283 | AS_CASE([${host}], |
347 | - [*-darwin*],[_AX_CHECK_GL_MANUAL_LIBS_DARWIN()], | |
348 | - # try first cygwin version | |
284 | + [*-darwin*],[_AX_CHECK_DARWIN_GL], | |
285 | + dnl some windows may support X11 opengl, and should be able to linked | |
286 | + dnl by -lGL. However I have no machine to test it. | |
349 | 287 | [*-cygwin*|*-mingw*],[ |
350 | - AS_CASE(["$ax_check_gl_order"], | |
351 | - ["gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32])], | |
352 | - ["gl mesagl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32 GL gl MesaGL])], | |
353 | - ["mesagl gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL opengl32])], | |
354 | - [_AX_CHECK_MSG_FAILURE_ORDER()])], | |
355 | - [AS_CASE(["$ax_check_gl_order"], | |
356 | - ["gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl])], | |
357 | - ["gl mesagl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl MesaGL])], | |
358 | - ["mesagl gl"],[_AX_CHECK_GL_MANUAL_LIBS_GENERIC([MesaGL GL gl])], | |
359 | - [_AX_CHECK_MSG_FAILURE_ORDER()])] | |
360 | - ) | |
361 | - | |
362 | - AC_CACHE_CHECK([for OpenGL libraries],[ax_cv_check_gl_lib_opengl], | |
363 | - [ax_cv_check_gl_lib_opengl="${ax_check_gl_lib_opengl}"]) | |
364 | - ax_check_gl_lib_opengl="${ax_cv_check_gl_lib_opengl}" | |
365 | -]) | |
366 | - | |
367 | -# manually check aka old way | |
368 | -AC_DEFUN([_AX_CHECK_GL_MANUAL], | |
369 | -[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
370 | - AC_REQUIRE([AC_PATH_XTRA])dnl | |
288 | + _AX_CHECK_GL_MANUAL_LIBS_GENERIC([opengl32 GL gl]) | |
289 | + AC_CHECK_HEADERS([windows.h]) | |
290 | + ], | |
291 | + [PKG_PROG_PKG_CONFIG | |
292 | + PKG_CHECK_MODULES([GL],[gl], | |
293 | + [], | |
294 | + [_AX_CHECK_GL_MANUAL_LIBS_GENERIC([GL gl])]) | |
295 | + ]) dnl host specific checks | |
296 | + | |
297 | + dnl this was cache | |
298 | + _AX_CHECK_GL_SAVE_FLAGS([CFLAGS]) | |
299 | + AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], | |
300 | + [ax_check_gl_have_headers="yes";break]) | |
301 | + _AX_CHECK_GL_RESTORE_FLAGS([CFLAGS]) | |
371 | 302 | |
372 | - no_gl="yes" | |
373 | - | |
374 | - _AX_CHECK_GL_MANUAL_HEADERS() | |
375 | 303 | AS_IF([test "X$ax_check_gl_have_headers" = "Xyes"], |
376 | 304 | [_AX_CHECK_GL_COMPILE_CV()], |
377 | - [ax_check_gl_compile_opengl=no]) | |
378 | - | |
305 | + [no_gl=yes]) | |
379 | 306 | AS_IF([test "X$ax_check_gl_compile_opengl" = "Xyes"], |
380 | - [_AX_CHECK_GL_MANUAL_LIBS], | |
381 | - [ax_check_gl_lib_opengl=no]) | |
382 | - | |
383 | - AS_IF([test "X$ax_check_gl_lib_opengl" = "Xyes"], | |
384 | 307 | [_AX_CHECK_GL_LINK_CV()], |
385 | - [ax_check_gl_link_opengl=no]) | |
386 | - | |
387 | - AS_IF([test "X$ax_check_gl_link_opengl" = "Xyes"], | |
388 | - [no_gl="no"], | |
389 | - [no_gl="yes"]) | |
390 | -])dnl | |
391 | - | |
392 | - | |
393 | -# try to test using pkgconfig: set ax_check_gl_pkg_config=no if not found | |
394 | -AC_DEFUN([_AX_CHECK_GL_PKG_CONFIG],dnl | |
395 | -[dnl | |
396 | - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
397 | - | |
398 | - dnl First try mesagl | |
399 | - AS_CASE(["$ax_check_gl_order"], | |
400 | - ["gl"],[PKG_CHECK_MODULES([GL],[mesagl], | |
401 | - [ax_check_gl_pkg_config=yes], | |
402 | - [ax_check_gl_pkg_config=no])], | |
403 | - ["gl mesagl"],[PKG_CHECK_MODULES([GL],[gl], | |
404 | - [ax_check_gl_pkg_config=yes], | |
405 | - [PKG_CHECK_MODULES([GL],[mesagl], | |
406 | - [ax_check_gl_pkg_config=yes], | |
407 | - [ax_check_gl_pkg_config=no])])], | |
408 | - ["mesagl gl"],[PKG_CHECK_MODULES([GL],[mesagl], | |
409 | - [ax_check_gl_pkg_config=yes], | |
410 | - [PKG_CHECK_MODULES([GL],[gl], | |
411 | - [ax_check_gl_pkg_config=yes], | |
412 | - [ax_check_gl_pkg_config=no])])], | |
413 | - [_AX_CHECK_MSG_FAILURE_ORDER]) | |
414 | - | |
415 | - AS_IF([test "X$ax_check_gl_pkg_config" = "Xyes"],[ | |
416 | - # check headers | |
417 | - AC_LANG_PUSH([C]) | |
418 | - _AX_CHECK_GL_SAVE_FLAGS() | |
419 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
420 | - AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
421 | - AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h], | |
422 | - [ax_check_gl_have_headers="yes";break], | |
423 | - [ax_check_gl_have_headers_headers="no"], | |
424 | - [_AX_CHECK_GL_INCLUDES_DEFAULT()]) | |
425 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
426 | - AC_LANG_POP([C]) | |
427 | - AC_CACHE_CHECK([for OpenGL headers],[ax_cv_check_gl_have_headers], | |
428 | - [ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}"]) | |
429 | - | |
430 | - # pkgconfig library are suposed to work ... | |
431 | - AS_IF([test "X$ax_cv_check_gl_have_headers" = "Xno"], | |
432 | - [AC_MSG_ERROR("Pkgconfig detected OpenGL library has no headers!")]) | |
433 | - | |
434 | - _AX_CHECK_GL_COMPILE_CV() | |
435 | - AS_IF([test "X$ax_cv_check_gl_compile_opengl" = "Xno"], | |
436 | - [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for compiling minimal program!")]) | |
437 | - | |
438 | - _AX_CHECK_GL_LINK_CV() | |
439 | - AS_IF([test "X$ax_cv_check_gl_link_opengl" = "Xno"], | |
440 | - [AC_MSG_ERROR("Pkgconfig detected opengl library could not be used for linking minimal program!")]) | |
441 | - ],[ax_check_gl_pkg_config=no]) | |
442 | -]) | |
443 | - | |
444 | -# test if gl link with X | |
445 | -AC_DEFUN([_AX_CHECK_GL_WITH_X], | |
446 | -[ | |
447 | - # try if opengl need X | |
448 | - AC_LANG_PUSH([C]) | |
449 | - _AX_CHECK_GL_SAVE_FLAGS() | |
450 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
451 | - LIBS="${GL_LIBS} ${LIBS}" | |
452 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
453 | - AC_LINK_IFELSE([AC_LANG_CALL([], [glXQueryVersion])], | |
454 | - [ax_check_gl_link_implicitly_with_x="yes"], | |
455 | - [ax_check_gl_link_implicitly_with_x="no"]) | |
456 | - _AX_CHECK_GL_RESTORE_FLAGS() | |
457 | - AC_LANG_POP([C]) | |
458 | -]) | |
459 | - | |
460 | -# internal routine: entry point if gl not disable | |
461 | -AC_DEFUN([_AX_CHECK_GL],[dnl | |
462 | - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
463 | - AC_REQUIRE([AC_PATH_X])dnl | |
464 | - | |
465 | - # does we need X or not | |
466 | - _AX_CHECK_GL_NEED_X() | |
467 | - | |
468 | - # try first pkgconfig | |
469 | - AC_MSG_CHECKING([for a working OpenGL implementation by pkg-config]) | |
470 | - AS_IF([test "X${PKG_CONFIG}" = "X"], | |
471 | - [ AC_MSG_RESULT([no]) | |
472 | - ax_check_gl_pkg_config=no], | |
473 | - [ AC_MSG_RESULT([yes]) | |
474 | - _AX_CHECK_GL_PKG_CONFIG()]) | |
475 | - | |
476 | - # if no pkgconfig or pkgconfig fail try manual way | |
477 | - AS_IF([test "X$ax_check_gl_pkg_config" = "Xno"], | |
478 | - [_AX_CHECK_GL_MANUAL()], | |
479 | - [no_gl=no]) | |
480 | - | |
481 | - # test if need to test X compatibility | |
482 | - AS_IF([test $no_gl = no], | |
483 | - [# test X compatibility | |
484 | - AS_IF([test X$ax_check_gl_need_x != "Xdefault"], | |
485 | - [AC_CACHE_CHECK([wether OpenGL link implictly with X],[ax_cv_check_gl_link_with_x], | |
486 | - [_AX_CHECK_GL_WITH_X() | |
487 | - ax_cv_check_gl_link_with_x="${ax_check_gl_link_implicitly_with_x}"]) | |
488 | - AS_IF([test "X${ax_cv_check_gl_link_with_x}" = "X${ax_check_gl_need_x}"], | |
489 | - [no_gl="no"], | |
490 | - [no_gl=yes])]) | |
491 | - ]) | |
492 | -]) | |
493 | - | |
494 | -# ax_check_gl entry point | |
495 | -AC_DEFUN([AX_CHECK_GL], | |
496 | -[AC_REQUIRE([AC_PATH_X])dnl | |
497 | - AC_REQUIRE([AC_CANONICAL_HOST]) | |
498 | - | |
499 | - AC_ARG_WITH([gl], | |
500 | - [AS_HELP_STRING([--with-gl@<:@=ARG@:>@], | |
501 | - [use opengl (ARG=yes), | |
502 | - using the specific lib (ARG=<lib>), | |
503 | - using the OpenGL lib that link with X (ARG=x), | |
504 | - using the OpenGL lib that link without X (ARG=nox), | |
505 | - or disable it (ARG=no) | |
506 | - @<:@ARG=yes@:>@ ])], | |
507 | - [ | |
508 | - AS_CASE(["$withval"], | |
509 | - ["no"|"NO"],[ax_check_gl_want_gl="no"], | |
510 | - ["yes"|"YES"],[ax_check_gl_want_gl="yes"], | |
511 | - [ax_check_gl_want_gl="$withval"]) | |
512 | - ], | |
513 | - [ax_check_gl_want_gl="yes"]) | |
514 | - | |
515 | - dnl compatibility with AX_HAVE_OPENGL | |
516 | - AC_ARG_WITH([Mesa], | |
517 | - [AS_HELP_STRING([--with-Mesa@<:@=ARG@:>@], | |
518 | - [Prefer the Mesa library over a vendors native OpenGL (ARG=yes except on mingw ARG=no), | |
519 | - @<:@ARG=yes@:>@ ])], | |
520 | - [ | |
521 | - AS_CASE(["$withval"], | |
522 | - ["no"|"NO"],[ax_check_gl_want_mesa="no"], | |
523 | - ["yes"|"YES"],[ax_check_gl_want_mesa="yes"], | |
524 | - [AC_MSG_ERROR([--with-mesa flag is only yes no])]) | |
525 | - ], | |
526 | - [ax_check_gl_want_mesa="default"]) | |
527 | - | |
528 | - # check consistency of parameters | |
529 | - AS_IF([test "X$have_x" = "Xdisabled"], | |
530 | - [AS_IF([test X$ax_check_gl_want_gl = "Xx"], | |
531 | - [AC_MSG_ERROR([You prefer OpenGL with X and asked for no X support])])]) | |
532 | - | |
533 | - AS_IF([test "X$have_x" = "Xdisabled"], | |
534 | - [AS_IF([test X$x_check_gl_want_mesa = "Xyes"], | |
535 | - [AC_MSG_WARN([You prefer mesa but you disable X. Disable mesa because mesa need X]) | |
536 | - ax_check_gl_want_mesa="no"])]) | |
537 | - | |
538 | - # mesa default means yes except on mingw | |
539 | - AC_MSG_CHECKING([wether we should prefer mesa for opengl implementation]) | |
540 | - AS_IF([test X$ax_check_gl_want_mesa = "Xdefault"], | |
541 | - [AS_CASE([${host}], | |
542 | - [*-mingw*],[ax_check_gl_want_mesa=no], | |
543 | - [ax_check_gl_want_mesa=yes])]) | |
544 | - AC_MSG_RESULT($ax_check_gl_want_mesa) | |
545 | - | |
546 | - # set default guess order | |
547 | - AC_MSG_CHECKING([for a working OpenGL order detection]) | |
548 | - AS_IF([test "X$no_x" = "Xyes"], | |
549 | - [ax_check_gl_order="gl"], | |
550 | - [AS_IF([test X$ax_check_gl_want_mesa = "Xyes"], | |
551 | - [ax_check_gl_order="mesagl gl"], | |
552 | - [ax_check_gl_order="gl mesagl"])]) | |
553 | - AC_MSG_RESULT($ax_check_gl_order) | |
554 | - | |
555 | - # set flags | |
556 | - no_gl="yes" | |
557 | - have_GL="no" | |
558 | - | |
559 | - # now do the real testing | |
560 | - AS_IF([test X$ax_check_gl_want_gl != "Xno"], | |
561 | - [_AX_CHECK_GL()]) | |
562 | - | |
563 | - AC_MSG_CHECKING([for a working OpenGL implementation]) | |
564 | - AS_IF([test "X$no_gl" = "Xno"], | |
565 | - [have_GL="yes" | |
566 | - AC_MSG_RESULT([yes]) | |
567 | - AC_MSG_CHECKING([for CFLAGS needed for OpenGL]) | |
568 | - AC_MSG_RESULT(["${GL_CFLAGS}"]) | |
569 | - AC_MSG_CHECKING([for LIBS needed for OpenGL]) | |
570 | - AC_MSG_RESULT(["${GL_LIBS}"]) | |
571 | - AC_MSG_CHECKING([for LDFLAGS needed for OpenGL]) | |
572 | - AC_MSG_RESULT(["${GL_LDFLAGS}"])], | |
573 | - [AC_MSG_RESULT([no]) | |
574 | - GL_CFLAGS="" | |
575 | - GL_LIBS="" | |
576 | - GL_LDFLAGS=""]) | |
577 | - | |
578 | - AC_SUBST([GL_CFLAGS]) | |
579 | - AC_SUBST([GL_LIBS]) | |
580 | - AC_SUBST([GL_LDFLAGS]) | |
308 | + [no_gl=yes]) | |
309 | + AS_IF([test "X$no_gl" = "X"], | |
310 | + [AC_DEFINE([HAVE_GL], [1], [Defined if a valid OpenGL implementation is found.]) | |
311 | + m4_ifval([$1], | |
312 | + [$1], | |
313 | + [CFLAGS="$GL_CFLAGS $CFLAGS" | |
314 | + LIBS="$GL_LIBS $LIBS"]) | |
315 | + ], | |
316 | + [m4_ifval([$2], | |
317 | + [$2], | |
318 | + [AC_MSG_ERROR([Could not find a valid OpenGL implementation])]) | |
319 | + ]) | |
581 | 320 | ]) |
582 | 321 | |
583 | 322 | # =========================================================================== |
584 | -# http://www.gnu.org/software/autoconf-archive/ax_check_glu.html | |
323 | +# https://www.gnu.org/software/autoconf-archive/ax_check_glu.html | |
585 | 324 | # =========================================================================== |
586 | 325 | # |
587 | 326 | # SYNOPSIS |
588 | 327 | # |
589 | -# AX_CHECK_GLU | |
328 | +# AX_CHECK_GLU([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) | |
590 | 329 | # |
591 | 330 | # DESCRIPTION |
592 | 331 | # |
593 | -# Check for GLU. If GLU is found, the required preprocessor and linker | |
594 | -# flags are included in the output variables "GLU_CFLAGS" and "GLU_LIBS", | |
595 | -# respectively. If no GLU implementation is found, "no_glu" is set to | |
596 | -# "yes". | |
332 | +# Checks for GLUT. If a valid GLU implementation is found, the configure | |
333 | +# script would export the C preprocessor symbol "HAVE_GLU=1". | |
334 | +# | |
335 | +# If either a valid GLU header or library was not found, by default the | |
336 | +# configure script would exit on error. This behavior can be overwritten | |
337 | +# by providing a custom "ACTION-IF-NOT-FOUND" hook. | |
338 | +# | |
339 | +# If the header, library was found, and been tested for compiling and | |
340 | +# linking the configuration would export the required compiler flags to | |
341 | +# "GLU_CFLAGS" and "GLU_LIBS" environment variables. These two variables | |
342 | +# can also be overwritten by defining the environment variables before | |
343 | +# executing the configure program. If it was predefined, configure would | |
344 | +# not try to overwrite it, but it would still perform the compile and link | |
345 | +# test. Only when the tests succeeded does the configure script to export | |
346 | +# "HAVE_GLU=1" and to run "ACTION-IF-FOUND" hook. | |
347 | +# | |
348 | +# If user didn't specify the "ACTION-IF-FOUND" hook, the configuration | |
349 | +# would prepend "GLU_CFLAGS" and "GLU_LIBS" to "CFLAGS" and "LIBS", like | |
350 | +# many other autoconf macros do. | |
597 | 351 | # |
598 | 352 | # If the header "GL/glu.h" is found, "HAVE_GL_GLU_H" is defined. If the |
599 | -# header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. These | |
600 | -# preprocessor definitions may not be mutually exclusive. | |
353 | +# header "OpenGL/glu.h" is found, HAVE_OPENGL_GLU_H is defined. | |
601 | 354 | # |
602 | 355 | # You should use something like this in your headers: |
603 | 356 | # |
@@ -612,6 +365,10 @@ AC_DEFUN([AX_CHECK_GL], | ||
612 | 365 | # # error no glu.h |
613 | 366 | # # endif |
614 | 367 | # |
368 | +# On the OSX platform, you can use the option --with-xquartz-gl to use | |
369 | +# X11/Xquartz GLU implementation instead of the system built in GLU | |
370 | +# framework. | |
371 | +# | |
615 | 372 | # Some implementations (in particular, some versions of Mac OS X) are |
616 | 373 | # known to treat the GLU tesselator callback function type as "GLvoid |
617 | 374 | # (*)(...)" rather than the standard "GLvoid (*)()". If the former |
@@ -621,6 +378,7 @@ AC_DEFUN([AX_CHECK_GL], | ||
621 | 378 | # |
622 | 379 | # Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> |
623 | 380 | # Copyright (c) 2013 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> |
381 | +# Copyright (c) 2016 Felix Chern <idryman@gmail.com> | |
624 | 382 | # |
625 | 383 | # This program is free software; you can redistribute it and/or modify it |
626 | 384 | # under the terms of the GNU General Public License as published by the |
@@ -633,7 +391,7 @@ AC_DEFUN([AX_CHECK_GL], | ||
633 | 391 | # Public License for more details. |
634 | 392 | # |
635 | 393 | # You should have received a copy of the GNU General Public License along |
636 | -# with this program. If not, see <http://www.gnu.org/licenses/>. | |
394 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
637 | 395 | # |
638 | 396 | # As a special exception, the respective Autoconf Macro's copyright owner |
639 | 397 | # gives unlimited permission to copy, distribute and modify the configure |
@@ -648,9 +406,9 @@ AC_DEFUN([AX_CHECK_GL], | ||
648 | 406 | # modified version of the Autoconf Macro, you may extend this special |
649 | 407 | # exception to the GPL to apply to your modified version as well. |
650 | 408 | |
651 | -#serial 18 | |
409 | +#serial 23 | |
652 | 410 | |
653 | -# exemple program | |
411 | +# example program | |
654 | 412 | m4_define([_AX_CHECK_GLU_PROGRAM], |
655 | 413 | [AC_LANG_PROGRAM([[ |
656 | 414 | # if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
@@ -679,88 +437,6 @@ AC_DEFUN([_AX_CHECK_GLU_INCLUDES_DEFAULT],dnl | ||
679 | 437 | ] |
680 | 438 | ]) |
681 | 439 | |
682 | -dnl local save flags | |
683 | -AC_DEFUN([_AX_CHECK_GLU_SAVE_FLAGS], | |
684 | -[dnl | |
685 | -ax_check_glu_saved_libs="${LIBS}" | |
686 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
687 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
688 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
689 | -]) | |
690 | - | |
691 | - | |
692 | -dnl local restore flags | |
693 | -AC_DEFUN([_AX_CHECK_GLU_RESTORE_FLAGS], | |
694 | -[dnl | |
695 | -LIBS="${ax_check_glu_saved_libs}" | |
696 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
697 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
698 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
699 | -]) | |
700 | - | |
701 | - | |
702 | -# compile the example program | |
703 | -AC_DEFUN([_AX_CHECK_GLU_COMPILE], | |
704 | -[dnl | |
705 | - AC_LANG_PUSH([C]) | |
706 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
707 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
708 | - AC_COMPILE_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
709 | - [ax_check_glu_compile_opengl="yes"], | |
710 | - [ax_check_glu_compile_opengl="no"]) | |
711 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
712 | - AC_LANG_POP([C]) | |
713 | -]) | |
714 | - | |
715 | -# compile the example program (cache) | |
716 | -AC_DEFUN([_AX_CHECK_GLU_COMPILE_CV], | |
717 | -[dnl | |
718 | - AC_CACHE_CHECK([for compiling a minimal OpenGL Utility (GLU) program],[ax_cv_check_glu_compile_opengl], | |
719 | - [_AX_CHECK_GLU_COMPILE() | |
720 | - ax_cv_check_glu_compile_opengl="${ax_check_glu_compile_opengl}"]) | |
721 | - ax_check_glu_compile_opengl="${ax_cv_check_glu_compile_opengl}" | |
722 | -]) | |
723 | - | |
724 | -# link the example program | |
725 | -AC_DEFUN([_AX_CHECK_GLU_LINK], | |
726 | -[dnl | |
727 | - AC_LANG_PUSH([C]) | |
728 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
729 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
730 | - LIBS="${GLU_LIBS} ${LIBS}" | |
731 | - LDFLAGS="${GLU_LDFLAGS} ${LDFLAGS}" | |
732 | - AC_LINK_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
733 | - [ax_check_glu_link_opengl="yes"], | |
734 | - [ax_check_glu_link_opengl="no"]) | |
735 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
736 | - AC_LANG_POP([C]) | |
737 | -]) | |
738 | - | |
739 | -# link the example program (cache) | |
740 | -AC_DEFUN([_AX_CHECK_GLU_LINK_CV], | |
741 | -[dnl | |
742 | - AC_CACHE_CHECK([for linking a minimal OpenGL Utility (GLU) program],[ax_cv_check_glu_link_opengl], | |
743 | - [_AX_CHECK_GLU_LINK() | |
744 | - ax_cv_check_glu_link_opengl="${ax_check_glu_link_opengl}"]) | |
745 | - ax_check_glu_link_opengl="${ax_cv_check_glu_link_opengl}" | |
746 | -]) | |
747 | - | |
748 | -dnl Check headers manually (default case) | |
749 | -AC_DEFUN([_AX_CHECK_GLU_HEADERS], | |
750 | -[AC_LANG_PUSH([C]) | |
751 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
752 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
753 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
754 | - AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
755 | - AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], | |
756 | - [ax_check_glu_have_headers="yes";break], | |
757 | - [ax_check_glu_have_headers_headers="no"], | |
758 | - [_AX_CHECK_GLU_INCLUDES_DEFAULT()]) | |
759 | - # do not try darwin specific OpenGl/gl.h | |
760 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
761 | - AC_LANG_POP([C]) | |
762 | -]) | |
763 | - | |
764 | 440 | # check tesselation callback function signature. |
765 | 441 | m4_define([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], |
766 | 442 | [AC_LANG_PROGRAM([[ |
@@ -778,210 +454,186 @@ m4_define([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], | ||
778 | 454 | [[GLvoid (*func)(...); gluTessCallback(0, 0, func)]]) |
779 | 455 | ]) |
780 | 456 | |
781 | -# compile the tesselation callback function program | |
782 | -# test with c++ | |
783 | -AC_DEFUN([_AX_CHECK_GLU_COMPILE_VARARGS_TESSVB_PROGRAM], | |
784 | -[AC_REQUIRE([AC_PROG_CXX])dnl | |
785 | - | |
786 | - AC_LANG_PUSH([C++]) | |
787 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
788 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
789 | - AC_COMPILE_IFELSE([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], | |
790 | - [ax_check_glu_compile_varargs_tessvb_program="yes"], | |
791 | - [ax_check_glu_compile_varargs_tessvb_program="no"]) | |
792 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
793 | - AC_LANG_POP([C++]) | |
794 | -]) | |
795 | - | |
796 | 457 | |
458 | +# _AX_CHECK_GLU_SAVE_FLAGS(LIST-OF-FLAGS,[LANG]) | |
459 | +# ---------------------------------------------- | |
460 | +# Save the flags to shell variables. | |
461 | +# Example: _AX_CHECK_GLU_SAVE_FLAGS([[CFLAGS],[LIBS]]) expands to | |
462 | +# AC_LANG_PUSH([C]) | |
463 | +# glu_saved_flag_cflags=$CFLAGS | |
464 | +# glu_saved_flag_libs=$LIBS | |
465 | +# CFLAGS="$GLU_CFLAGS $CFLAGS" | |
466 | +# LIBS="$GLU_LIBS $LIBS" | |
797 | 467 | # |
798 | -# Some versions of Mac OS X include a broken interpretation of the GLU | |
799 | -# tesselation callback function signature. | |
800 | -# | |
801 | -AC_DEFUN([_AX_CHECK_GLU_VARARGS_TESSVB], | |
802 | -[ | |
803 | -AC_CACHE_CHECK([for varargs OpenGL Utility (GLU) tesselator callback function type], | |
804 | - [ax_cv_varargs_glu_tesscb], | |
805 | - [_AX_CHECK_GLU_COMPILE_VARARGS_TESSVB_PROGRAM | |
806 | - ax_cv_varargs_glu_tesscb="${ax_check_glu_compile_varargs_tessvb_program}"]) | |
807 | -ax_check_glu_compile_varargs_tessvb_program="${ax_cv_varargs_glu_tesscb}" | |
808 | - | |
809 | -AS_IF([test X$ax_cv_varargs_glu_tesscb = Xyes], | |
810 | - [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], | |
811 | - [Use nonstandard varargs form for the GLU tesselator callback])]) | |
468 | +# Can optionally support other LANG by specifying $2 | |
469 | +AC_DEFUN([_AX_CHECK_GLU_SAVE_FLAGS], [ | |
470 | + m4_ifval([$2], | |
471 | + [AC_LANG_PUSH([$2])], | |
472 | + [AC_LANG_PUSH([C])]) | |
473 | + AX_SAVE_FLAGS_WITH_PREFIX([GLU],[$1]) dnl defined in ax_check_gl | |
812 | 474 | ]) |
813 | 475 | |
814 | - | |
815 | -# dnl try to found library (generic case) | |
816 | -# dnl $1 is set to the library to found | |
817 | -AC_DEFUN([_AX_CHECK_GLU_MANUAL_LIBS_GENERIC], | |
818 | -[dnl | |
819 | - ax_check_glu_manual_libs_generic_extra_libs="$1" | |
820 | - AS_IF([test "X$ax_check_glu_manual_libs_generic_extra_libs" = "X"], | |
821 | - [AC_MSG_ERROR([AX_CHECK_GLU_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
822 | - | |
823 | - AC_LANG_PUSH([C]) | |
824 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
825 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
826 | - LIBS="${GLU_LIBS} ${LIBS}" | |
827 | - AC_SEARCH_LIBS([gluBeginCurve],[$ax_check_glu_manual_libs_generic_extra_libs], | |
828 | - [ax_check_glu_lib_opengl="yes"], | |
829 | - [ax_check_glu_lib_opengl="no"]) | |
830 | - AS_CASE([$ac_cv_search_gluBeginCurve], | |
831 | - ["none required"],[], | |
832 | - [no],[], | |
833 | - [GLU_LIBS="${ac_cv_search_gluBeginCurve} ${GLU_LIBS}"]) | |
834 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
835 | - AC_LANG_PUSH([C]) | |
476 | +# _AX_CHECK_GLU_RESTORE_FLAGS(LIST-OF-FLAGS) | |
477 | +# Use this marcro to restore the flags you saved using | |
478 | +# _AX_CHECK_GLU_SAVE_FLAGS | |
479 | +# | |
480 | +# Example: _AX_CHECK_GLU_RESTORE_FLAGS([[CFLAGS],[LIBS]]) expands to | |
481 | +# CFLAGS="$glu_saved_flag_cflags" | |
482 | +# LIBS="$glu_saved_flag_libs" | |
483 | +# AC_LANG_POP([C]) | |
484 | +AC_DEFUN([_AX_CHECK_GLU_RESTORE_FLAGS], [ | |
485 | + AX_RESTORE_FLAGS_WITH_PREFIX([GLU],[$1]) dnl defined in ax_check_gl | |
486 | + m4_ifval([$2], | |
487 | + [AC_LANG_POP([$2])], | |
488 | + [AC_LANG_POP([C])]) | |
836 | 489 | ]) |
837 | 490 | |
838 | 491 | |
839 | -dnl Check library manually: subroutine must set | |
840 | -dnl $ax_check_gl_lib_opengl={yes,no} | |
841 | -AC_DEFUN([_AX_CHECK_GLU_MANUAL_LIBS], | |
842 | -[AC_REQUIRE([AC_CANONICAL_HOST]) | |
843 | - GLU_LIBS="${GLU_LIBS} ${GL_LIBS}" | |
844 | - AS_CASE([${host}], | |
845 | - # try first cygwin version | |
846 | - [*-cygwin*],[_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([GLU glu MesaGLU glu32])], | |
847 | - # try first native | |
848 | - [*-mingw*],[_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([glu32 GLU glu MesaGLU])], | |
849 | - [_AX_CHECK_GLU_MANUAL_LIBS_GENERIC([GLU glu MesaGLU])]) | |
850 | - | |
851 | - AC_CACHE_CHECK([for OpenGL Utility (GLU) libraries],[ax_cv_check_glu_lib_opengl], | |
852 | - [ax_cv_check_glu_lib_opengl="${ax_check_glu_lib_opengl}"]) | |
853 | - ax_check_glu_lib_opengl="${ax_cv_check_glu_lib_opengl}" | |
492 | +# Search headers and export $ax_check_glu_have_headers | |
493 | +AC_DEFUN([_AX_CHECK_GLU_HEADERS], [ | |
494 | + _AX_CHECK_GLU_SAVE_FLAGS([CFLAGS]) | |
495 | + AC_CHECK_HEADERS([$1], | |
496 | + [ax_check_glu_have_headers="yes";], | |
497 | + [], | |
498 | + [_AX_CHECK_GLU_INCLUDES_DEFAULT()]) | |
499 | + _AX_CHECK_GLU_RESTORE_FLAGS([CFLAGS]) | |
854 | 500 | ]) |
855 | 501 | |
856 | 502 | |
857 | -dnl Manual way to detect GLU | |
858 | -AC_DEFUN([_AX_CHECK_GLU_MANUAL], | |
859 | -[dnl | |
860 | - | |
861 | -# inherit cflags | |
862 | -GLU_CFLAGS="${GLU_CFLAGS} ${GL_CFLAGS}" | |
863 | - | |
864 | -# check headers | |
865 | -_AX_CHECK_GLU_HEADERS | |
866 | - | |
867 | -AS_IF([test "X$ax_check_glu_have_headers" = "Xyes"], | |
868 | - [_AX_CHECK_GLU_MANUAL_LIBS], | |
869 | - [ax_check_glu_lib_opengl="no"]) | |
870 | - | |
871 | -AS_IF([test "X$ax_check_glu_lib_opengl" = "Xyes"], | |
872 | - [_AX_CHECK_GLU_COMPILE_CV()], | |
873 | - [ax_cv_check_glu_compile_opengl="no"]) | |
874 | - | |
875 | -AS_IF([test "X$ax_cv_check_glu_compile_opengl" = "Xyes"], | |
876 | - [_AX_CHECK_GLU_LINK_CV()], | |
877 | - [ax_cv_check_glu_link_opengl="no"]) | |
878 | - | |
879 | -AS_IF([test "X$ax_cv_check_glu_link_opengl" = "Xyes"], | |
880 | - [no_glu="no"], | |
881 | - [no_glu="yes"]) | |
882 | -]) | |
883 | - | |
884 | -# detect using pkgconfig | |
885 | -AC_DEFUN([_AX_CHECK_GLU_PKG_CONFIG], | |
886 | -[ | |
887 | - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
888 | - | |
889 | - PKG_CHECK_MODULES([GLU],[glu],[ax_check_glu_pkg_config=yes],[ax_check_glu_pkg_config=no]) | |
890 | - | |
891 | - AS_IF([test "X$ax_check_glu_pkg_config" = "Xyes"],[ | |
892 | - # check headers | |
893 | - AC_LANG_PUSH([C]) | |
894 | - _AX_CHECK_GLU_SAVE_FLAGS() | |
895 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
896 | - AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
897 | - AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h], | |
898 | - [ax_check_glu_have_headers="yes";break], | |
899 | - [ax_check_glu_have_headers_headers="no"], | |
900 | - [_AX_CHECK_GLU_INCLUDES_DEFAULT()]) | |
901 | - _AX_CHECK_GLU_RESTORE_FLAGS() | |
902 | - AC_LANG_POP([C]) | |
903 | - AC_CACHE_CHECK([for OpenGL Utility (GLU) headers],[ax_cv_check_glu_have_headers], | |
904 | - [ax_cv_check_glu_have_headers="${ax_check_glu_have_headers}"]) | |
905 | - | |
906 | - # pkgconfig library are suposed to work ... | |
907 | - AS_IF([test "X$ax_cv_check_glu_have_headers" = "Xno"], | |
908 | - [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library has no headers!")]) | |
909 | - | |
910 | - _AX_CHECK_GLU_COMPILE_CV() | |
911 | - AS_IF([test "X$ax_cv_check_glu_compile_opengl" = "Xno"], | |
912 | - [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library could not be used for compiling minimal program!")]) | |
913 | - | |
914 | - _AX_CHECK_GLU_LINK_CV() | |
915 | - AS_IF([test "X$ax_cv_check_glu_link_opengl" = "Xno"], | |
916 | - [AC_MSG_ERROR("Pkgconfig detected OpenGL Utility (GLU) library could not be used for linking minimal program!")]) | |
917 | - ]) | |
918 | -]) | |
919 | - | |
920 | -# entry point | |
921 | -AC_DEFUN([AX_CHECK_GLU],dnl | |
922 | -[ | |
923 | - AC_REQUIRE([AX_CHECK_GL]) | |
924 | - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
503 | +# _AX_CHECK_GLU_SEARCH_LIBS(LIBS) | |
504 | +# ------------------------------- | |
505 | +# Search for a valid GLU lib from $1 and set | |
506 | +# GLU_LIBS respectively | |
507 | +AC_DEFUN([_AX_CHECK_GLU_SEARCH_LIBS], [ | |
508 | + _AX_CHECK_GLU_SAVE_FLAGS([[CFLAGS],[LIBS]]) | |
509 | + AC_SEARCH_LIBS([gluBeginCurve],[$1], | |
510 | + [GLU_LIBS="${GLU_LIBS:-$ac_cv_search_gluBeginCurve}"]) | |
511 | + _AX_CHECK_GLU_RESTORE_FLAGS([[CFLAGS],[LIBS]]) | |
512 | +]) | |
513 | + | |
514 | +# OSX specific GLU checks | |
515 | +AC_DEFUN([_AX_CHECK_DARWIN_GLU], [ | |
516 | + AC_REQUIRE([_WITH_XQUARTZ_GL]) | |
517 | + AS_IF([test "x$with_xquartz_gl" != "xno"], | |
518 | + [GLU_LIBS="${GLU_LIBS:--lGLU}"], | |
519 | + [GLU_LIBS="${GLU_LIBS:--framework OpenGL}"]) | |
520 | +]) | |
521 | + | |
522 | +# AX_CHECK_GLU([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) | |
523 | +# ----------------------------------------------------- | |
524 | +# Checks GLU and provides hooks for success and failures | |
525 | +AC_DEFUN([AX_CHECK_GLU],[ | |
526 | + AC_REQUIRE([AC_CANONICAL_HOST]) | |
527 | + AC_REQUIRE([_WITH_XQUARTZ_GL]) | |
528 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
529 | + AC_ARG_VAR([GLU_CFLAGS],[C compiler flags for GLU, overriding system check]) | |
530 | + AC_ARG_VAR([GLU_LIBS],[Linker flags for GLU, overriding system check]) | |
531 | + | |
532 | + dnl Setup GLU_CFLAGS and GLU_LIBS | |
533 | + AS_CASE([${host}], | |
534 | + [*-darwin*],[_AX_CHECK_DARWIN_GLU], | |
535 | + [*-cygwin*],[_AX_CHECK_GLU_SEARCH_LIBS([GLU glu MesaGLU glu32]) | |
536 | + AC_CHECK_HEADERS([windows.h])], | |
537 | + # try first native | |
538 | + [*-mingw*],[_AX_CHECK_GLU_SEARCH_LIBS([glu32 GLU glu MesaGLU]) | |
539 | + AC_CHECK_HEADERS([windows.h])], | |
540 | + [PKG_PROG_PKG_CONFIG | |
541 | + PKG_CHECK_MODULES([GLU],[glu], | |
542 | + [], | |
543 | + [_AX_CHECK_GLU_SEARCH_LIBS([GLU glu MesaGLU])]) | |
544 | + ]) | |
545 | + | |
546 | + AS_CASE([$host], | |
547 | + [*-darwin*], | |
548 | + [AS_IF([test "X$with_xquartz_gl" = "Xno"], | |
549 | + [_AX_CHECK_GLU_HEADERS([OpenGL/glu.h])], | |
550 | + [_AX_CHECK_GLU_HEADERS([GL/glu.h])] | |
551 | + )], | |
552 | + [_AX_CHECK_GLU_HEADERS([GL/glu.h])]) | |
553 | + | |
554 | + dnl compile test | |
555 | + AS_IF([test "X$ax_check_glu_have_headers" = "Xyes"], | |
556 | + [AC_CACHE_CHECK([for compiling a minimal OpenGL Utility (GLU) program], | |
557 | + [ax_cv_check_glu_compile], | |
558 | + [_AX_CHECK_GLU_SAVE_FLAGS([CFLAGS]) | |
559 | + AC_COMPILE_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
560 | + [ax_cv_check_glu_compile="yes"], | |
561 | + [ax_cv_check_glu_compile="no"]) | |
562 | + _AX_CHECK_GLU_RESTORE_FLAGS([CFLAGS])]) | |
563 | + ]) | |
564 | + | |
565 | + dnl link test | |
566 | + AS_IF([test "X$ax_cv_check_glu_compile" = "Xyes"], | |
567 | + [AC_CACHE_CHECK([for linking a minimal GLU program], | |
568 | + [ax_cv_check_glu_link], | |
569 | + [_AX_CHECK_GLU_SAVE_FLAGS([[CFLAGS],[LIBS]]) | |
570 | + AC_LINK_IFELSE([_AX_CHECK_GLU_PROGRAM], | |
571 | + [ax_cv_check_glu_link="yes"], | |
572 | + [ax_cv_check_glu_link="no"]) | |
573 | + _AX_CHECK_GLU_RESTORE_FLAGS([[CFLAGS],[LIBS]])]) | |
574 | + ]) | |
925 | 575 | |
926 | - # set flags | |
927 | - no_glu="yes" | |
928 | - have_GLU="no" | |
929 | - | |
930 | - AC_MSG_CHECKING([for a working OpenGL Utility (GLU) implementation by pkg-config]) | |
931 | - # try first pkgconfig | |
932 | - AS_IF([test "X${PKG_CONFIG}" = "X"], | |
933 | - [AC_MSG_RESULT([no]) | |
934 | - ax_check_glu_pkg_config=no], | |
935 | - [AC_MSG_RESULT([yes]) | |
936 | - _AX_CHECK_GLU_PKG_CONFIG()]) | |
937 | - | |
938 | - # if no pkg-config or pkg-config fail try manual way | |
939 | - AS_IF([test "X$ax_check_glu_pkg_config" = "Xno"], | |
940 | - [_AX_CHECK_GLU_MANUAL()], | |
941 | - [no_glu=no]) | |
942 | - | |
943 | - # check broken implementation | |
944 | - AS_IF([test "X$no_glu" = "Xno"], | |
945 | - [_AX_CHECK_GLU_VARARGS_TESSVB],[]) | |
946 | - | |
947 | - AC_MSG_CHECKING([for a working OpenGL Utility (GLU) implementation]) | |
948 | - AS_IF([test "X$no_glu" = "Xno"], | |
949 | - [have_GLU="yes" | |
950 | - AC_MSG_RESULT([yes]) | |
951 | - AC_MSG_CHECKING([for CFLAGS needed for OpenGL Utility (GLU)]) | |
952 | - AC_MSG_RESULT(["${GLU_CFLAGS}"]) | |
953 | - AC_MSG_CHECKING([for LIBS needed for OpenGL Utility (GLU)]) | |
954 | - AC_MSG_RESULT(["${GLU_LIBS}"]) | |
955 | - AC_MSG_CHECKING([for LDFLAGS needed for OpenGL Utility (GLU)]) | |
956 | - AC_MSG_RESULT(["${GLU_LDFLAGS}"])], | |
957 | - [AC_MSG_RESULT([no]) | |
958 | - GLU_CFLAGS="" | |
959 | - GLU_LIBS="" | |
960 | - GLU_LDFLAGS=""]) | |
961 | - | |
962 | - AC_SUBST([GLU_CFLAGS]) | |
963 | - AC_SUBST([GLU_LIBS]) | |
964 | - AC_SUBST([GLU_LDFLAGS]) | |
576 | +# | |
577 | +# Some versions of Mac OS X include a broken interpretation of the GLU | |
578 | +# tesselation callback function signature. | |
579 | + AS_IF([test "X$ax_cv_check_glu_link" = "Xyes"], | |
580 | + [AC_CACHE_CHECK([if GLU varargs tesselator is using non-standard form], | |
581 | + [ax_cv_varargs_glu_tesscb], | |
582 | + [_AX_CHECK_GLU_SAVE_FLAGS([CFLAGS],[C++]) | |
583 | + AC_COMPILE_IFELSE([_AX_CHECK_GLU_VARARGS_TESSVB_PROGRAM], | |
584 | + [ax_cv_varargs_glu_tesscb="yes"], | |
585 | + [ax_cv_varargs_glu_tesscb="no"]) | |
586 | + _AX_CHECK_GLU_RESTORE_FLAGS([CFLAGS],[C++])]) | |
587 | + AS_IF([test "X$ax_cv_varargs_glu_tesscb" = "yes"], | |
588 | + [AC_DEFINE([HAVE_VARARGS_GLU_TESSCB], [1], | |
589 | + [Use nonstandard varargs form for the GLU tesselator callback])]) | |
590 | + ]) | |
965 | 591 | |
592 | + dnl hook | |
593 | + AS_IF([test "X$ax_cv_check_glu_link" = "Xyes"], | |
594 | + [AC_DEFINE([HAVE_GLU],[1],[Defined if a valid GLU implementation is found.]) | |
595 | + m4_ifval([$1], | |
596 | + [$1], | |
597 | + [CFLAGS="$GLU_CFLAGS $CFLAGS" | |
598 | + LIBS="$GLU_LIBS $LIBS"])], | |
599 | + [m4_ifval([$2], | |
600 | + [$2], | |
601 | + [AC_MSG_ERROR([Could not find a valid GLU implementation])]) | |
602 | + ]) | |
966 | 603 | ]) |
967 | 604 | |
968 | 605 | # =========================================================================== |
969 | -# http://www.gnu.org/software/autoconf-archive/ax_check_glut.html | |
606 | +# https://www.gnu.org/software/autoconf-archive/ax_check_glut.html | |
970 | 607 | # =========================================================================== |
971 | 608 | # |
972 | 609 | # SYNOPSIS |
973 | 610 | # |
974 | -# AX_CHECK_GLUT | |
611 | +# AX_CHECK_GLUT([ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND]) | |
975 | 612 | # |
976 | 613 | # DESCRIPTION |
977 | 614 | # |
978 | -# Check for GLUT. If GLUT is found, the required compiler and linker flags | |
979 | -# are included in the output variables "GLUT_CFLAGS" and "GLUT_LIBS", | |
980 | -# respectively. If GLUT is not found, "no_glut" is set to "yes". | |
615 | +# Checks for GLUT. If a valid GLUT implementation is found, the configure | |
616 | +# script would export the C preprocessor symbol "HAVE_GLUT=1". | |
617 | +# | |
618 | +# If either a valid GLUT header or library was not found, by default the | |
619 | +# configure script would exit on error. This behavior can be overwritten | |
620 | +# by providing a custom "ACTION-IF-NOT-FOUND" hook. | |
621 | +# | |
622 | +# If the header, library was found, and been tested for compiling and | |
623 | +# linking the configuration would export the required compiler flags to | |
624 | +# "GLUT_CFLAGS" and "GLUT_LIBS" environment variables. These two variables | |
625 | +# can also be overwritten by defining the environment variables before | |
626 | +# executing the configure program. If it was predefined, configure would | |
627 | +# not try to overwrite it, but it would still perform the compile and link | |
628 | +# test. Only when the tests succeeded does the configure script to export | |
629 | +# "HAVE_GLUT=1" and to run "ACTION-IF-FOUND" hook. | |
630 | +# | |
631 | +# If user didn't specify the "ACTION-IF-FOUND" hook, the configuration | |
632 | +# would prepend "GLUT_CFLAGS" and "GLUT_LIBS" to "CFLAGS" and "LIBS", like | |
633 | +# many other autoconf macros do. | |
981 | 634 | # |
982 | 635 | # If the header "GL/glut.h" is found, "HAVE_GL_GLUT_H" is defined. If the |
983 | -# header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. These | |
984 | -# preprocessor definitions may not be mutually exclusive. | |
636 | +# header "GLUT/glut.h" is found, HAVE_GLUT_GLUT_H is defined. | |
985 | 637 | # |
986 | 638 | # You should use something like this in your headers: |
987 | 639 | # |
@@ -996,10 +648,15 @@ AC_DEFUN([AX_CHECK_GLU],dnl | ||
996 | 648 | # # error no glut.h |
997 | 649 | # # endif |
998 | 650 | # |
651 | +# On the OSX platform, you can use the option --with-xquartz-gl to use | |
652 | +# X11/Xquartz GLUT implementation instead of the system built in GLUT | |
653 | +# framework. | |
654 | +# | |
999 | 655 | # LICENSE |
1000 | 656 | # |
1001 | 657 | # Copyright (c) 2009 Braden McDaniel <braden@endoframe.com> |
1002 | 658 | # Copyright (c) 2013 Bastien Roucaries <roucaries.bastien+autoconf@gmail.com> |
659 | +# Copyright (c) 2016 Felix Chern <idryman@gmail.com> | |
1003 | 660 | # |
1004 | 661 | # This program is free software; you can redistribute it and/or modify it |
1005 | 662 | # under the terms of the GNU General Public License as published by the |
@@ -1012,7 +669,7 @@ AC_DEFUN([AX_CHECK_GLU],dnl | ||
1012 | 669 | # Public License for more details. |
1013 | 670 | # |
1014 | 671 | # You should have received a copy of the GNU General Public License along |
1015 | -# with this program. If not, see <http://www.gnu.org/licenses/>. | |
672 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
1016 | 673 | # |
1017 | 674 | # As a special exception, the respective Autoconf Macro's copyright owner |
1018 | 675 | # gives unlimited permission to copy, distribute and modify the configure |
@@ -1027,25 +684,16 @@ AC_DEFUN([AX_CHECK_GLU],dnl | ||
1027 | 684 | # modified version of the Autoconf Macro, you may extend this special |
1028 | 685 | # exception to the GPL to apply to your modified version as well. |
1029 | 686 | |
1030 | -#serial 14 | |
687 | +#serial 17 | |
1031 | 688 | |
1032 | -dnl local save flags | |
1033 | -AC_DEFUN([_AX_CHECK_GLUT_SAVE_FLAGS], | |
1034 | -[dnl | |
1035 | -ax_check_glut_saved_libs="${LIBS}" | |
1036 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
1037 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
1038 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
689 | +AC_DEFUN([_AX_CHECK_GLUT_SAVE_FLAGS], [ | |
690 | + AX_SAVE_FLAGS_WITH_PREFIX([GLUT],[$1]) dnl defined in ax_check_gl | |
691 | + AC_LANG_PUSH([C]) | |
1039 | 692 | ]) |
1040 | 693 | |
1041 | - | |
1042 | -dnl local restore flags | |
1043 | -AC_DEFUN([_AX_CHECK_GLUT_RESTORE_FLAGS], | |
1044 | -[dnl | |
1045 | -LIBS="${ax_check_glut_saved_libs}" | |
1046 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
1047 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
1048 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
694 | +AC_DEFUN([_AX_CHECK_GLUT_RESTORE_FLAGS], [ | |
695 | + AX_RESTORE_FLAGS_WITH_PREFIX([GLUT],[$1]) dnl defined in ax_check_gl | |
696 | + AC_LANG_POP([C]) | |
1049 | 697 | ]) |
1050 | 698 | |
1051 | 699 | dnl Default include : add windows.h |
@@ -1076,173 +724,97 @@ m4_define([_AX_CHECK_GLUT_PROGRAM], | ||
1076 | 724 | [[glutMainLoop()]])]) |
1077 | 725 | |
1078 | 726 | |
1079 | -dnl Check headers manually (default case) | |
1080 | -AC_DEFUN([_AX_CHECK_GLUT_HEADERS], | |
1081 | -[AC_LANG_PUSH([C]) | |
1082 | - _AX_CHECK_GLUT_SAVE_FLAGS() | |
1083 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1084 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
1085 | - AC_CHECK_HEADERS([windows.h],[],[],[AC_INCLUDES_DEFAULT]) | |
1086 | - AC_CHECK_HEADERS([GL/glut.h OpenGL/glut.h], | |
1087 | - [ax_check_glut_have_headers="yes";break], | |
1088 | - [ax_check_glut_have_headers_headers="no"], | |
1089 | - [_AX_CHECK_GLUT_INCLUDES_DEFAULT()]) | |
1090 | - # do not try darwin specific OpenGl/gl.h | |
1091 | - _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1092 | - AC_LANG_POP([C]) | |
1093 | -]) | |
1094 | - | |
1095 | -# dnl try to found library (generic case) | |
1096 | -# dnl $1 is set to the library to found | |
727 | +# _AX_CHECK_GLUT_MANUAL_LIBS_GENERIC(LIST-OF-LIBS) | |
728 | +# ------------------------------------------------ | |
729 | +# Searches libraries provided in $1, and export variable | |
730 | +# $ax_check_glut_lib_glut | |
1097 | 731 | AC_DEFUN([_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC], |
1098 | -[dnl | |
1099 | - ax_check_glut_manual_libs_generic_extra_libs="$1" | |
1100 | - AS_IF([test "X$ax_check_glut_manual_libs_generic_extra_libs" = "X"], | |
1101 | - [AC_MSG_ERROR([AX_CHECK_GLUT_MANUAL_LIBS_GENERIC argument must no be empty])]) | |
1102 | - | |
1103 | - AC_LANG_PUSH([C]) | |
1104 | - _AX_CHECK_GLUT_SAVE_FLAGS() | |
1105 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1106 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
1107 | - AC_SEARCH_LIBS([glutMainLoop],[$ax_check_glut_manual_libs_generic_extra_libs], | |
1108 | - [ax_check_glut_lib_opengl="yes"], | |
1109 | - [ax_check_glut_lib_opengl="no"]) | |
1110 | - AS_CASE([$ac_cv_search_glutMainLoop], | |
1111 | - ["none required"],[], | |
1112 | - [no],[], | |
1113 | - [GLUT_LIBS="${ac_cv_search_glutMainLoop} ${GLU_LIBS}"]) | |
1114 | - _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1115 | - AC_LANG_PUSH([C]) | |
1116 | -]) | |
1117 | - | |
1118 | - | |
1119 | -dnl Check library manually: subroutine must set | |
1120 | -dnl $ax_check_glut_lib_opengl={yes,no} | |
1121 | -dnl for windows part see | |
1122 | -dnl - http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ | |
1123 | -dnl - http://user.xmission.com/~nate/glut.html | |
1124 | -AC_DEFUN([_AX_CHECK_GLUT_MANUAL_LIBS], | |
1125 | -[AC_REQUIRE([AC_CANONICAL_HOST]) | |
1126 | - GLUT_LIBS="${GLUT_LIBS} ${GLU_LIBS}" | |
1127 | - AS_CASE([${host}], | |
1128 | - # try first cygwin version | |
1129 | - [*-cygwin*],[_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([GLUT glut MesaGLUT freeglut freeglut32 glut32])], | |
1130 | - # try first native | |
1131 | - [*-mingw*],[_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([glut32 GLUT glut MesaGLUT freeglut freeglut32])], | |
1132 | - [_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([GLUT glut freeglut MesaGLUT])]) | |
1133 | - | |
1134 | - AC_CACHE_CHECK([for OpenGL Utility Toolkit (GLUT) libraries],[ax_cv_check_glut_lib_opengl], | |
1135 | - [ax_cv_check_glut_lib_opengl="${ax_check_glut_lib_opengl}"]) | |
1136 | - ax_check_glut_lib_opengl="${ax_cv_check_glut_lib_opengl}" | |
1137 | -]) | |
1138 | - | |
1139 | -# compile the example program | |
1140 | -AC_DEFUN([_AX_CHECK_GLUT_COMPILE], | |
1141 | -[dnl | |
1142 | - AC_LANG_PUSH([C]) | |
1143 | - _AX_CHECK_GLUT_SAVE_FLAGS() | |
1144 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1145 | - AC_COMPILE_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
1146 | - [ax_check_glut_compile_opengl="yes"], | |
1147 | - [ax_check_glut_compile_opengl="no"]) | |
1148 | - _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1149 | - AC_LANG_POP([C]) | |
1150 | -]) | |
1151 | - | |
1152 | -# compile the example program (cache) | |
1153 | -AC_DEFUN([_AX_CHECK_GLUT_COMPILE_CV], | |
1154 | -[dnl | |
1155 | - AC_CACHE_CHECK([for compiling a minimal OpenGL Utility Toolkit (GLUT) program],[ax_cv_check_glut_compile_opengl], | |
1156 | - [_AX_CHECK_GLUT_COMPILE() | |
1157 | - ax_cv_check_glut_compile_opengl="${ax_check_glut_compile_opengl}"]) | |
1158 | - ax_check_glut_compile_opengl="${ax_cv_check_glut_compile_opengl}" | |
1159 | -]) | |
1160 | - | |
1161 | -# link the example program | |
1162 | -AC_DEFUN([_AX_CHECK_GLUT_LINK], | |
1163 | -[dnl | |
1164 | - AC_LANG_PUSH([C]) | |
1165 | - _AX_CHECK_GLUT_SAVE_FLAGS() | |
1166 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
1167 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
1168 | - LDFLAGS="${GLUT_LDFLAGS} ${LDFLAGS}" | |
1169 | - AC_LINK_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
1170 | - [ax_check_glut_link_opengl="yes"], | |
1171 | - [ax_check_glut_link_opengl="no"]) | |
1172 | - _AX_CHECK_GLUT_RESTORE_FLAGS() | |
1173 | - AC_LANG_POP([C]) | |
1174 | -]) | |
1175 | - | |
1176 | -# link the example program (cache) | |
1177 | -AC_DEFUN([_AX_CHECK_GLUT_LINK_CV], | |
1178 | -[dnl | |
1179 | - AC_CACHE_CHECK([for linking a minimal OpenGL Utility Toolkit (GLUT) program],[ax_cv_check_glut_link_opengl], | |
1180 | - [_AX_CHECK_GLUT_LINK() | |
1181 | - ax_cv_check_glut_link_opengl="${ax_check_glut_link_opengl}"]) | |
1182 | - ax_check_glut_link_opengl="${ax_cv_check_glut_link_opengl}" | |
1183 | -]) | |
1184 | - | |
1185 | - | |
1186 | -# manually check GLUT | |
1187 | -AC_DEFUN([_AX_CHECK_GLUT_MANUAL],dnl | |
1188 | 732 | [ |
1189 | -GLUT_CFLAGS="${GLUT_CFLAGS} ${GLU_CFLAGS}" | |
1190 | -_AX_CHECK_GLUT_HEADERS | |
1191 | - | |
1192 | -AS_IF([test "X$ax_check_glut_have_headers" = "Xyes"], | |
1193 | - [_AX_CHECK_GLUT_MANUAL_LIBS], | |
1194 | - [ax_check_glut_lib="no"]) | |
1195 | - | |
1196 | -AS_IF([test "X$ax_check_glut_lib_opengl" = "Xyes"], | |
1197 | - [_AX_CHECK_GLUT_COMPILE_CV()], | |
1198 | - [ax_cv_check_glut_compile_opengl="no"]) | |
1199 | - | |
1200 | -AS_IF([test "X$ax_cv_check_glut_compile_opengl" = "Xyes"], | |
1201 | - [_AX_CHECK_GLUT_LINK_CV()], | |
1202 | - [ax_cv_check_glut_link_opengl="no"]) | |
733 | + _AX_CHECK_GLUT_SAVE_FLAGS([[CFLAGS],[LIBS]]) | |
734 | + AC_SEARCH_LIBS([glutMainLoop],[$1], | |
735 | + [GLUT_LIBS="${GLUT_LIBS:-$ac_cv_search_glutMainLoop}"]) | |
736 | + _AX_CHECK_GLUT_RESTORE_FLAGS([[CFLAGS],[LIBS]]) | |
737 | +]) | |
1203 | 738 | |
1204 | -AS_IF([test "X$ax_cv_check_glut_link_opengl" = "Xyes"], | |
1205 | - [no_glut="no"], | |
1206 | - [no_glut="yes"]) | |
739 | +# Wrapper macro to check GLUT header | |
740 | +AC_DEFUN([_AX_CHECK_GLUT_HEADER],[ | |
741 | + _AX_CHECK_GLUT_SAVE_FLAGS([CFLAGS]) | |
742 | + AC_CHECK_HEADERS([$1], | |
743 | + [ax_check_glut_have_headers=yes]) | |
744 | + _AX_CHECK_GLUT_RESTORE_FLAGS([CFLAGS]) | |
1207 | 745 | ]) |
1208 | 746 | |
1209 | 747 | |
1210 | -# main entry point | |
748 | +# AX_CHECK_GLUT_LIB([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | |
749 | +# --------------------------------------------------------- | |
750 | +# Checks GLUT headers and library and provides hooks for success and failures. | |
1211 | 751 | AC_DEFUN([AX_CHECK_GLUT], |
1212 | -[dnl | |
1213 | - AC_REQUIRE([AX_CHECK_GL])dnl | |
1214 | - AC_REQUIRE([AX_CHECK_GLU])dnl | |
752 | +[AC_REQUIRE([AC_CANONICAL_HOST]) | |
753 | + AC_REQUIRE([_WITH_XQUARTZ_GL]) | |
754 | + AC_ARG_VAR([GLUT_CFLAGS],[C compiler flags for GLUT, overriding configure script defaults]) | |
755 | + AC_ARG_VAR([GLUT_LIBS],[Linker flags for GLUT, overriding configure script defaults]) | |
1215 | 756 | |
1216 | - # set flags | |
1217 | - no_glut="yes" | |
1218 | - have_GLUT="no" | |
1219 | - have_glut="no" | |
757 | + AS_CASE([${host}], | |
758 | + [*-darwin*],[AS_IF([test "x$with_xquartz_gl" != "xno"], | |
759 | + [GLUT_LIBS="${GLUT_LIBS:--lGLUT}"], | |
760 | + [GLUT_LIBS="${GLUT_LIBS:--framework GLUT}"])], | |
761 | + [*-cygwin*|*-mingw*],[ | |
762 | + _AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([glut32 glut]) | |
763 | + AC_CHECK_HEADERS([windows.h]) | |
764 | + ], | |
765 | + [_AX_CHECK_GLUT_MANUAL_LIBS_GENERIC([glut]) | |
766 | + ]) dnl host specific checks | |
1220 | 767 | |
1221 | - _AX_CHECK_GLUT_MANUAL | |
768 | + dnl checks header | |
769 | + AS_CASE([${host}], | |
770 | + [*-darwin*],[AS_IF([test "x$with_xquartz_gl" = "xno"], | |
771 | + [_AX_CHECK_GLUT_HEADER([GLUT/glut.h])], | |
772 | + [_AX_CHECK_GLUT_HEADER([GL/glut.h])] | |
773 | + )], | |
774 | + [_AX_CHECK_GLUT_HEADER([GL/glut.h])]) | |
775 | + | |
776 | + dnl compile | |
777 | + AS_IF([test "X$ax_check_glut_have_headers" = "Xyes"], | |
778 | + [AC_CACHE_CHECK([for compiling a minimal GLUT program], | |
779 | + [ax_cv_check_glut_compile], | |
780 | + [_AX_CHECK_GLUT_SAVE_FLAGS([CFLAGS]) | |
781 | + AC_COMPILE_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
782 | + [ax_cv_check_glut_compile="yes"], | |
783 | + [ax_cv_check_glut_compile="no"]) | |
784 | + _AX_CHECK_GLUT_RESTORE_FLAGS([CFLAGS]) | |
785 | + ]) | |
786 | + ]) | |
787 | + | |
788 | + dnl link | |
789 | + AS_IF([test "X$ax_cv_check_glut_compile" = "Xyes"], | |
790 | + [AC_CACHE_CHECK([for linking a minimal GLUT program], | |
791 | + [ax_cv_check_glut_link], | |
792 | + [_AX_CHECK_GLUT_SAVE_FLAGS([[CFLAGS],[LIBS]]) | |
793 | + AC_LINK_IFELSE([_AX_CHECK_GLUT_PROGRAM], | |
794 | + [ax_cv_check_glut_link="yes"], | |
795 | + [ax_cv_check_glut_link="no"]) | |
796 | + _AX_CHECK_GLUT_RESTORE_FLAGS([[CFLAGS],[LIBS]]) | |
797 | + ]) | |
798 | + ]) | |
799 | + | |
800 | + dnl hook | |
801 | + AS_IF([test "X$ax_cv_check_glut_link" = "Xyes"], | |
802 | + [AC_DEFINE([HAVE_GLUT], [1], [Defined if a valid GLUT implementation is found]) | |
803 | + m4_ifval([$1], | |
804 | + [$1], | |
805 | + [CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
806 | + LIBS="$GLUT_LIBS $LIBS"]) | |
807 | + ], | |
808 | + [m4_ifval([$2], | |
809 | + [$2], | |
810 | + [AC_MSG_ERROR([Could not find a valid GLUT implementation])] | |
811 | + ) | |
812 | + ]) | |
1222 | 813 | |
1223 | - AC_MSG_CHECKING([for a working OpenGL Utility Toolkit (GLUT) implementation]) | |
1224 | - AS_IF([test "X$no_glut" = "Xno"], | |
1225 | - [have_GLUT="yes" | |
1226 | - have_glut="yes" | |
1227 | - AC_MSG_RESULT([yes]) | |
1228 | - AC_MSG_CHECKING([for CFLAGS needed for OpenGL Utility Toolkit (GLUT)]) | |
1229 | - AC_MSG_RESULT(["${GLUT_CFLAGS}"]) | |
1230 | - AC_MSG_CHECKING([for LIBS needed for OpenGL Utility Toolkit (GLUT)]) | |
1231 | - AC_MSG_RESULT(["${GLUT_LIBS}"]) | |
1232 | - AC_MSG_CHECKING([for LDFLAGS needed for OpenGL Utility Toolkit (GLUT)]) | |
1233 | - AC_MSG_RESULT(["${GLUT_LDFLAGS}"])], | |
1234 | - [AC_MSG_RESULT([no]) | |
1235 | - GLUT_CFLAGS="" | |
1236 | - GLUT_LIBS="" | |
1237 | - GLUT_LDFLAGS=""]) | |
1238 | - | |
1239 | - AC_SUBST([GLUT_CFLAGS]) | |
1240 | - AC_SUBST([GLUT_LIBS]) | |
1241 | - AC_SUBST([GLUT_LDFLAGS]) | |
1242 | 814 | ]) |
1243 | 815 | |
1244 | 816 | # =========================================================================== |
1245 | -# http://www.gnu.org/software/autoconf-archive/ax_openmp.html | |
817 | +# https://www.gnu.org/software/autoconf-archive/ax_openmp.html | |
1246 | 818 | # =========================================================================== |
1247 | 819 | # |
1248 | 820 | # SYNOPSIS |
@@ -1282,6 +854,7 @@ AC_DEFUN([AX_CHECK_GLUT], | ||
1282 | 854 | # |
1283 | 855 | # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> |
1284 | 856 | # Copyright (c) 2015 John W. Peterson <jwpeterson@gmail.com> |
857 | +# Copyright (c) 2016 Nick R. Papior <nickpapior@gmail.com> | |
1285 | 858 | # |
1286 | 859 | # This program is free software: you can redistribute it and/or modify it |
1287 | 860 | # under the terms of the GNU General Public License as published by the |
@@ -1294,7 +867,7 @@ AC_DEFUN([AX_CHECK_GLUT], | ||
1294 | 867 | # Public License for more details. |
1295 | 868 | # |
1296 | 869 | # You should have received a copy of the GNU General Public License along |
1297 | -# with this program. If not, see <http://www.gnu.org/licenses/>. | |
870 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
1298 | 871 | # |
1299 | 872 | # As a special exception, the respective Autoconf Macro's copyright owner |
1300 | 873 | # gives unlimited permission to copy, distribute and modify the configure |
@@ -1309,16 +882,19 @@ AC_DEFUN([AX_CHECK_GLUT], | ||
1309 | 882 | # modified version of the Autoconf Macro, you may extend this special |
1310 | 883 | # exception to the GPL to apply to your modified version as well. |
1311 | 884 | |
1312 | -#serial 11 | |
885 | +#serial 13 | |
1313 | 886 | |
1314 | 887 | AC_DEFUN([AX_OPENMP], [ |
1315 | 888 | AC_PREREQ([2.69]) dnl for _AC_LANG_PREFIX |
1316 | 889 | |
1317 | 890 | AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS |
1318 | 891 | ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown |
1319 | -# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI), | |
1320 | -# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none | |
1321 | -ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none" | |
892 | +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), | |
893 | +# -qopenmp (icc>=15), -openmp (icc), | |
894 | +# -xopenmp (Sun), -omp (Tru64), | |
895 | +# -qsmp=omp (AIX), | |
896 | +# none | |
897 | +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" | |
1322 | 898 | if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then |
1323 | 899 | ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags" |
1324 | 900 | fi |
@@ -1361,6 +937,146 @@ else | ||
1361 | 937 | fi |
1362 | 938 | ])dnl AX_OPENMP |
1363 | 939 | |
940 | +# ================================================================================= | |
941 | +# https://www.gnu.org/software/autoconf-archive/ax_restore_flags_with_prefix.html | |
942 | +# ================================================================================= | |
943 | +# | |
944 | +# SYNOPSIS | |
945 | +# | |
946 | +# AX_RESTORE_FLAGS_WITH_PREFIX(PREFIX, LIST-OF-FLAGS) | |
947 | +# | |
948 | +# DESCRIPTION | |
949 | +# | |
950 | +# Restore the flags saved by AX_SAVE_FLAGS_WITH_PREFIX. | |
951 | +# | |
952 | +# Expansion example: AX_RESTORE_FLAGS_WITH_PREFIX([GL], [[CFLAGS],[LIBS]]) | |
953 | +# expands to | |
954 | +# | |
955 | +# CFLAGS="$gl_saved_flag_cflags" | |
956 | +# LIBS="$gl_saved_flag_libs" | |
957 | +# | |
958 | +# One common use case is to define a package specific wrapper macro around | |
959 | +# this one, and also restore other variables if needed. For example: | |
960 | +# | |
961 | +# AC_DEFUN([_AX_CHECK_GL_RESTORE_FLAGS], [ | |
962 | +# AX_RESTORE_FLAGS_WITH_PREFIX([GL],[$1]) | |
963 | +# AC_LANG_POP([C]) | |
964 | +# ]) | |
965 | +# | |
966 | +# # Restores CFLAGS, LIBS and language state | |
967 | +# _AX_CHECK_GL_RESTORE_FLAGS([[CFLAGS],[LIBS]]) | |
968 | +# | |
969 | +# LICENSE | |
970 | +# | |
971 | +# Copyright (c) 2016 Felix Chern <idryman@gmail.com> | |
972 | +# | |
973 | +# This program is free software; you can redistribute it and/or modify it | |
974 | +# under the terms of the GNU General Public License as published by the | |
975 | +# Free Software Foundation; either version 2 of the License, or (at your | |
976 | +# option) any later version. | |
977 | +# | |
978 | +# This program is distributed in the hope that it will be useful, but | |
979 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
980 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
981 | +# Public License for more details. | |
982 | +# | |
983 | +# You should have received a copy of the GNU General Public License along | |
984 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
985 | +# | |
986 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
987 | +# gives unlimited permission to copy, distribute and modify the configure | |
988 | +# scripts that are the output of Autoconf when processing the Macro. You | |
989 | +# need not follow the terms of the GNU General Public License when using | |
990 | +# or distributing such scripts, even though portions of the text of the | |
991 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
992 | +# all other use of the material that constitutes the Autoconf Macro. | |
993 | +# | |
994 | +# This special exception to the GPL applies to versions of the Autoconf | |
995 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
996 | +# modified version of the Autoconf Macro, you may extend this special | |
997 | +# exception to the GPL to apply to your modified version as well. | |
998 | + | |
999 | +#serial 3 | |
1000 | + | |
1001 | +AC_DEFUN([AX_RESTORE_FLAGS_WITH_PREFIX],[ | |
1002 | +m4_ifval([$2], [ | |
1003 | +m4_car($2)="$_ax_[]m4_tolower($1)_saved_flag_[]m4_tolower(m4_car($2))" | |
1004 | +$0($1, m4_cdr($2))]) | |
1005 | +]) | |
1006 | + | |
1007 | +# ============================================================================== | |
1008 | +# https://www.gnu.org/software/autoconf-archive/ax_save_flags_with_prefix.html | |
1009 | +# ============================================================================== | |
1010 | +# | |
1011 | +# SYNOPSIS | |
1012 | +# | |
1013 | +# AX_SAVE_FLAGS_WITH_PREFIX(PREFIX, LIST-OF-FLAGS) | |
1014 | +# | |
1015 | +# DESCRIPTION | |
1016 | +# | |
1017 | +# For each flag in LIST-OF-FLAGS, it expands to lower-cased shell variable | |
1018 | +# with the prefix holding the flag original value. The saved variables | |
1019 | +# can be restored by AX_RESTORE_FLAGS_WITH_PREFIX | |
1020 | +# | |
1021 | +# As an example: AX_SAVE_FLAGS_WITH_PREFIX([GL], [[CFLAGS],[LIBS]]) | |
1022 | +# expands to | |
1023 | +# | |
1024 | +# gl_saved_flag_cflags="$CFLAGS" | |
1025 | +# gl_saved_flag_libs="$LIBS" | |
1026 | +# CFLAGS="$GL_CFLAGS $CFLAGS" | |
1027 | +# LIBS="$GL_LIBS $LIBS" | |
1028 | +# | |
1029 | +# One common use case is to define a package specific wrapper macro around | |
1030 | +# this one, and also setup other variables if needed. For example: | |
1031 | +# | |
1032 | +# AC_DEFUN([_AX_CHECK_GL_SAVE_FLAGS], [ | |
1033 | +# AX_SAVE_FLAGS_WITH_PREFIX([GL],[$1]) | |
1034 | +# AC_LANG_PUSH([C]) | |
1035 | +# ]) | |
1036 | +# | |
1037 | +# # pushes GL_CFLAGS and GL_LIBS to CFLAGS and LIBS | |
1038 | +# # also set the current language to test to C | |
1039 | +# _AX_CHECK_GL_SAVE_FLAGS([[CFLAGS],[LIBS]]) | |
1040 | +# | |
1041 | +# LICENSE | |
1042 | +# | |
1043 | +# Copyright (c) 2016 Felix Chern <idryman@gmail.com> | |
1044 | +# | |
1045 | +# This program is free software; you can redistribute it and/or modify it | |
1046 | +# under the terms of the GNU General Public License as published by the | |
1047 | +# Free Software Foundation; either version 2 of the License, or (at your | |
1048 | +# option) any later version. | |
1049 | +# | |
1050 | +# This program is distributed in the hope that it will be useful, but | |
1051 | +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
1052 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
1053 | +# Public License for more details. | |
1054 | +# | |
1055 | +# You should have received a copy of the GNU General Public License along | |
1056 | +# with this program. If not, see <https://www.gnu.org/licenses/>. | |
1057 | +# | |
1058 | +# As a special exception, the respective Autoconf Macro's copyright owner | |
1059 | +# gives unlimited permission to copy, distribute and modify the configure | |
1060 | +# scripts that are the output of Autoconf when processing the Macro. You | |
1061 | +# need not follow the terms of the GNU General Public License when using | |
1062 | +# or distributing such scripts, even though portions of the text of the | |
1063 | +# Macro appear in them. The GNU General Public License (GPL) does govern | |
1064 | +# all other use of the material that constitutes the Autoconf Macro. | |
1065 | +# | |
1066 | +# This special exception to the GPL applies to versions of the Autoconf | |
1067 | +# Macro released by the Autoconf Archive. When you make and distribute a | |
1068 | +# modified version of the Autoconf Macro, you may extend this special | |
1069 | +# exception to the GPL to apply to your modified version as well. | |
1070 | + | |
1071 | +#serial 3 | |
1072 | + | |
1073 | +AC_DEFUN([AX_SAVE_FLAGS_WITH_PREFIX],[ | |
1074 | +m4_ifval([$2], [ | |
1075 | +_ax_[]m4_tolower($1)_saved_flag_[]m4_tolower(m4_car($2))="$m4_car($2)" | |
1076 | +m4_car($2)="$$1_[]m4_car($2) $m4_car($2)" | |
1077 | +$0($1, m4_cdr($2)) | |
1078 | +])]) | |
1079 | + | |
1364 | 1080 | dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
1365 | 1081 | dnl serial 11 (pkg-config-0.29.1) |
1366 | 1082 | dnl |
@@ -1637,7 +1353,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) | ||
1637 | 1353 | AS_VAR_IF([$1], [""], [$5], [$4])dnl |
1638 | 1354 | ])dnl PKG_CHECK_VAR |
1639 | 1355 | |
1640 | -# Copyright (C) 2002-2014 Free Software Foundation, Inc. | |
1356 | +# Copyright (C) 2002-2017 Free Software Foundation, Inc. | |
1641 | 1357 | # |
1642 | 1358 | # This file is free software; the Free Software Foundation |
1643 | 1359 | # gives unlimited permission to copy and/or distribute it, |
@@ -1652,7 +1368,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], | ||
1652 | 1368 | [am__api_version='1.15' |
1653 | 1369 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
1654 | 1370 | dnl require some minimum version. Point them to the right macro. |
1655 | -m4_if([$1], [1.15], [], | |
1371 | +m4_if([$1], [1.15.1], [], | |
1656 | 1372 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
1657 | 1373 | ]) |
1658 | 1374 |
@@ -1668,14 +1384,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) | ||
1668 | 1384 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
1669 | 1385 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
1670 | 1386 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
1671 | -[AM_AUTOMAKE_VERSION([1.15])dnl | |
1387 | +[AM_AUTOMAKE_VERSION([1.15.1])dnl | |
1672 | 1388 | m4_ifndef([AC_AUTOCONF_VERSION], |
1673 | 1389 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
1674 | 1390 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
1675 | 1391 | |
1676 | 1392 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
1677 | 1393 | |
1678 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1394 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
1679 | 1395 | # |
1680 | 1396 | # This file is free software; the Free Software Foundation |
1681 | 1397 | # gives unlimited permission to copy and/or distribute it, |
@@ -1727,7 +1443,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` | ||
1727 | 1443 | |
1728 | 1444 | # AM_CONDITIONAL -*- Autoconf -*- |
1729 | 1445 | |
1730 | -# Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
1446 | +# Copyright (C) 1997-2017 Free Software Foundation, Inc. | |
1731 | 1447 | # |
1732 | 1448 | # This file is free software; the Free Software Foundation |
1733 | 1449 | # gives unlimited permission to copy and/or distribute it, |
@@ -1758,7 +1474,7 @@ AC_CONFIG_COMMANDS_PRE( | ||
1758 | 1474 | Usually this means the macro was only invoked conditionally.]]) |
1759 | 1475 | fi])]) |
1760 | 1476 | |
1761 | -# Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
1477 | +# Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
1762 | 1478 | # |
1763 | 1479 | # This file is free software; the Free Software Foundation |
1764 | 1480 | # gives unlimited permission to copy and/or distribute it, |
@@ -1949,7 +1665,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl | ||
1949 | 1665 | |
1950 | 1666 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
1951 | 1667 | |
1952 | -# Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
1668 | +# Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
1953 | 1669 | # |
1954 | 1670 | # This file is free software; the Free Software Foundation |
1955 | 1671 | # gives unlimited permission to copy and/or distribute it, |
@@ -2025,7 +1741,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
2025 | 1741 | |
2026 | 1742 | # Do all the work for Automake. -*- Autoconf -*- |
2027 | 1743 | |
2028 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
1744 | +# Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
2029 | 1745 | # |
2030 | 1746 | # This file is free software; the Free Software Foundation |
2031 | 1747 | # gives unlimited permission to copy and/or distribute it, |
@@ -2222,7 +1938,7 @@ for _am_header in $config_headers :; do | ||
2222 | 1938 | done |
2223 | 1939 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
2224 | 1940 | |
2225 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1941 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
2226 | 1942 | # |
2227 | 1943 | # This file is free software; the Free Software Foundation |
2228 | 1944 | # gives unlimited permission to copy and/or distribute it, |
@@ -2243,7 +1959,7 @@ if test x"${install_sh+set}" != xset; then | ||
2243 | 1959 | fi |
2244 | 1960 | AC_SUBST([install_sh])]) |
2245 | 1961 | |
2246 | -# Copyright (C) 2003-2014 Free Software Foundation, Inc. | |
1962 | +# Copyright (C) 2003-2017 Free Software Foundation, Inc. | |
2247 | 1963 | # |
2248 | 1964 | # This file is free software; the Free Software Foundation |
2249 | 1965 | # gives unlimited permission to copy and/or distribute it, |
@@ -2264,7 +1980,7 @@ AC_SUBST([am__leading_dot])]) | ||
2264 | 1980 | |
2265 | 1981 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
2266 | 1982 | |
2267 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1983 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
2268 | 1984 | # |
2269 | 1985 | # This file is free software; the Free Software Foundation |
2270 | 1986 | # gives unlimited permission to copy and/or distribute it, |
@@ -2314,7 +2030,7 @@ rm -f confinc confmf | ||
2314 | 2030 | |
2315 | 2031 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
2316 | 2032 | |
2317 | -# Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
2033 | +# Copyright (C) 1997-2017 Free Software Foundation, Inc. | |
2318 | 2034 | # |
2319 | 2035 | # This file is free software; the Free Software Foundation |
2320 | 2036 | # gives unlimited permission to copy and/or distribute it, |
@@ -2353,7 +2069,7 @@ fi | ||
2353 | 2069 | |
2354 | 2070 | # Helper functions for option handling. -*- Autoconf -*- |
2355 | 2071 | |
2356 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2072 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
2357 | 2073 | # |
2358 | 2074 | # This file is free software; the Free Software Foundation |
2359 | 2075 | # gives unlimited permission to copy and/or distribute it, |
@@ -2382,7 +2098,7 @@ AC_DEFUN([_AM_SET_OPTIONS], | ||
2382 | 2098 | AC_DEFUN([_AM_IF_OPTION], |
2383 | 2099 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
2384 | 2100 | |
2385 | -# Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
2101 | +# Copyright (C) 1999-2017 Free Software Foundation, Inc. | |
2386 | 2102 | # |
2387 | 2103 | # This file is free software; the Free Software Foundation |
2388 | 2104 | # gives unlimited permission to copy and/or distribute it, |
@@ -2429,7 +2145,7 @@ AC_LANG_POP([C])]) | ||
2429 | 2145 | # For backward compatibility. |
2430 | 2146 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
2431 | 2147 | |
2432 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2148 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
2433 | 2149 | # |
2434 | 2150 | # This file is free software; the Free Software Foundation |
2435 | 2151 | # gives unlimited permission to copy and/or distribute it, |
@@ -2448,7 +2164,7 @@ AC_DEFUN([AM_RUN_LOG], | ||
2448 | 2164 | |
2449 | 2165 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
2450 | 2166 | |
2451 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
2167 | +# Copyright (C) 1996-2017 Free Software Foundation, Inc. | |
2452 | 2168 | # |
2453 | 2169 | # This file is free software; the Free Software Foundation |
2454 | 2170 | # gives unlimited permission to copy and/or distribute it, |
@@ -2529,7 +2245,7 @@ AC_CONFIG_COMMANDS_PRE( | ||
2529 | 2245 | rm -f conftest.file |
2530 | 2246 | ]) |
2531 | 2247 | |
2532 | -# Copyright (C) 2009-2014 Free Software Foundation, Inc. | |
2248 | +# Copyright (C) 2009-2017 Free Software Foundation, Inc. | |
2533 | 2249 | # |
2534 | 2250 | # This file is free software; the Free Software Foundation |
2535 | 2251 | # gives unlimited permission to copy and/or distribute it, |
@@ -2589,7 +2305,7 @@ AC_SUBST([AM_BACKSLASH])dnl | ||
2589 | 2305 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
2590 | 2306 | ]) |
2591 | 2307 | |
2592 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2308 | +# Copyright (C) 2001-2017 Free Software Foundation, Inc. | |
2593 | 2309 | # |
2594 | 2310 | # This file is free software; the Free Software Foundation |
2595 | 2311 | # gives unlimited permission to copy and/or distribute it, |
@@ -2617,7 +2333,7 @@ fi | ||
2617 | 2333 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
2618 | 2334 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
2619 | 2335 | |
2620 | -# Copyright (C) 2006-2014 Free Software Foundation, Inc. | |
2336 | +# Copyright (C) 2006-2017 Free Software Foundation, Inc. | |
2621 | 2337 | # |
2622 | 2338 | # This file is free software; the Free Software Foundation |
2623 | 2339 | # gives unlimited permission to copy and/or distribute it, |
@@ -2636,7 +2352,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | ||
2636 | 2352 | |
2637 | 2353 | # Check how to create a tarball. -*- Autoconf -*- |
2638 | 2354 | |
2639 | -# Copyright (C) 2004-2014 Free Software Foundation, Inc. | |
2355 | +# Copyright (C) 2004-2017 Free Software Foundation, Inc. | |
2640 | 2356 | # |
2641 | 2357 | # This file is free software; the Free Software Foundation |
2642 | 2358 | # gives unlimited permission to copy and/or distribute it, |
@@ -1,5 +1,17 @@ | ||
1 | 1 | /* config.h.in. Generated from configure.ac by autoheader. */ |
2 | 2 | |
3 | +/* Defined if a valid OpenGL implementation is found. */ | |
4 | +#undef HAVE_GL | |
5 | + | |
6 | +/* Defined if a valid GLU implementation is found. */ | |
7 | +#undef HAVE_GLU | |
8 | + | |
9 | +/* Defined if a valid GLUT implementation is found */ | |
10 | +#undef HAVE_GLUT | |
11 | + | |
12 | +/* Define to 1 if you have the <GLUT/glut.h> header file. */ | |
13 | +#undef HAVE_GLUT_GLUT_H | |
14 | + | |
3 | 15 | /* Define to 1 if you have the <GL/glut.h> header file. */ |
4 | 16 | #undef HAVE_GL_GLUT_H |
5 | 17 |
@@ -15,9 +27,6 @@ | ||
15 | 27 | /* Define to 1 if you have the <memory.h> header file. */ |
16 | 28 | #undef HAVE_MEMORY_H |
17 | 29 | |
18 | -/* Define to 1 if you have the <OpenGL/glut.h> header file. */ | |
19 | -#undef HAVE_OPENGL_GLUT_H | |
20 | - | |
21 | 30 | /* Define to 1 if you have the <OpenGL/glu.h> header file. */ |
22 | 31 | #undef HAVE_OPENGL_GLU_H |
23 | 32 |
@@ -77,6 +86,3 @@ | ||
77 | 86 | |
78 | 87 | /* Version number of package */ |
79 | 88 | #undef VERSION |
80 | - | |
81 | -/* Define to 1 if the X Window System is missing or not being used. */ | |
82 | -#undef X_DISPLAY_MISSING |
@@ -625,25 +625,13 @@ ac_subst_vars='am__EXEEXT_FALSE | ||
625 | 625 | am__EXEEXT_TRUE |
626 | 626 | LTLIBOBJS |
627 | 627 | LIBOBJS |
628 | -GLUT_LDFLAGS | |
629 | 628 | GLUT_LIBS |
630 | 629 | GLUT_CFLAGS |
631 | -GLU_LDFLAGS | |
632 | -am__fastdepCXX_FALSE | |
633 | -am__fastdepCXX_TRUE | |
634 | -CXXDEPMODE | |
635 | -ac_ct_CXX | |
636 | -CXXFLAGS | |
637 | -CXX | |
638 | 630 | GLU_LIBS |
639 | 631 | GLU_CFLAGS |
640 | -GL_LDFLAGS | |
641 | -X_EXTRA_LIBS | |
642 | -X_LIBS | |
643 | -X_PRE_LIBS | |
644 | -X_CFLAGS | |
645 | 632 | EGREP |
646 | 633 | GREP |
634 | +CPP | |
647 | 635 | GL_LIBS |
648 | 636 | GL_CFLAGS |
649 | 637 | PKG_CONFIG_LIBDIR |
@@ -657,11 +645,15 @@ build_os | ||
657 | 645 | build_vendor |
658 | 646 | build_cpu |
659 | 647 | build |
660 | -CPP | |
661 | -XMKMF | |
662 | 648 | am__fastdepCC_FALSE |
663 | 649 | am__fastdepCC_TRUE |
664 | 650 | CCDEPMODE |
651 | +ac_ct_CC | |
652 | +CFLAGS | |
653 | +CC | |
654 | +am__fastdepCXX_FALSE | |
655 | +am__fastdepCXX_TRUE | |
656 | +CXXDEPMODE | |
665 | 657 | am__nodep |
666 | 658 | AMDEPBACKSLASH |
667 | 659 | AMDEP_FALSE |
@@ -671,11 +663,11 @@ am__include | ||
671 | 663 | DEPDIR |
672 | 664 | OBJEXT |
673 | 665 | EXEEXT |
674 | -ac_ct_CC | |
666 | +ac_ct_CXX | |
675 | 667 | CPPFLAGS |
676 | 668 | LDFLAGS |
677 | -CFLAGS | |
678 | -CC | |
669 | +CXXFLAGS | |
670 | +CXX | |
679 | 671 | AM_BACKSLASH |
680 | 672 | AM_DEFAULT_VERBOSITY |
681 | 673 | AM_DEFAULT_V |
@@ -748,30 +740,29 @@ enable_option_checking | ||
748 | 740 | enable_silent_rules |
749 | 741 | enable_dependency_tracking |
750 | 742 | with_openmp |
751 | -with_x | |
752 | -with_gl | |
753 | -with_Mesa | |
743 | +with_xquartz_gl | |
754 | 744 | ' |
755 | 745 | ac_precious_vars='build_alias |
756 | 746 | host_alias |
757 | 747 | target_alias |
758 | -CC | |
759 | -CFLAGS | |
748 | +CXX | |
749 | +CXXFLAGS | |
760 | 750 | LDFLAGS |
761 | 751 | LIBS |
762 | 752 | CPPFLAGS |
763 | -XMKMF | |
764 | -CPP | |
753 | +CCC | |
754 | +CC | |
755 | +CFLAGS | |
765 | 756 | PKG_CONFIG |
766 | 757 | PKG_CONFIG_PATH |
767 | 758 | PKG_CONFIG_LIBDIR |
768 | 759 | GL_CFLAGS |
769 | 760 | GL_LIBS |
761 | +CPP | |
770 | 762 | GLU_CFLAGS |
771 | 763 | GLU_LIBS |
772 | -CXX | |
773 | -CXXFLAGS | |
774 | -CCC' | |
764 | +GLUT_CFLAGS | |
765 | +GLUT_LIBS' | |
775 | 766 | |
776 | 767 | |
777 | 768 | # Initialize some variables set by options. |
@@ -1385,10 +1376,6 @@ Program names: | ||
1385 | 1376 | --program-suffix=SUFFIX append SUFFIX to installed program names |
1386 | 1377 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names |
1387 | 1378 | |
1388 | -X features: | |
1389 | - --x-includes=DIR X include files are in DIR | |
1390 | - --x-libraries=DIR X library files are in DIR | |
1391 | - | |
1392 | 1379 | System types: |
1393 | 1380 | --build=BUILD configure for building on BUILD [guessed] |
1394 | 1381 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
@@ -1417,35 +1404,33 @@ Optional Packages: | ||
1417 | 1404 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
1418 | 1405 | --with-openmp compile with OpenMP (parallelization) support. If |
1419 | 1406 | none is found, OpenMP is not used. Default: yes |
1420 | - --with-x use the X Window System | |
1421 | - --with-gl[=ARG] use opengl (ARG=yes), using the specific lib | |
1422 | - (ARG=<lib>), using the OpenGL lib that link with X | |
1423 | - (ARG=x), using the OpenGL lib that link without X | |
1424 | - (ARG=nox), or disable it (ARG=no) [ARG=yes] | |
1425 | - --with-Mesa[=ARG] Prefer the Mesa library over a vendors native OpenGL | |
1426 | - (ARG=yes except on mingw ARG=no), [ARG=yes] | |
1407 | + --with-xquartz-gl[=DIR] On Mac OSX, use opengl provided by X11/XQuartz | |
1408 | + instead of the built-in framework. If enabled, the | |
1409 | + default location is [DIR=/opt/X11]. This option is | |
1410 | + default to false. | |
1427 | 1411 | |
1428 | 1412 | Some influential environment variables: |
1429 | - CC C compiler command | |
1430 | - CFLAGS C compiler flags | |
1413 | + CXX C++ compiler command | |
1414 | + CXXFLAGS C++ compiler flags | |
1431 | 1415 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a |
1432 | 1416 | nonstandard directory <lib dir> |
1433 | 1417 | LIBS libraries to pass to the linker, e.g. -l<library> |
1434 | 1418 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
1435 | 1419 | you have headers in a nonstandard directory <include dir> |
1436 | - XMKMF Path to xmkmf, Makefile generator for X Window System | |
1437 | - CPP C preprocessor | |
1420 | + CC C compiler command | |
1421 | + CFLAGS C compiler flags | |
1438 | 1422 | PKG_CONFIG path to pkg-config utility |
1439 | 1423 | PKG_CONFIG_PATH |
1440 | 1424 | directories to add to pkg-config's search path |
1441 | 1425 | PKG_CONFIG_LIBDIR |
1442 | 1426 | path overriding pkg-config's built-in search path |
1443 | - GL_CFLAGS C compiler flags for GL, overriding pkg-config | |
1444 | - GL_LIBS linker flags for GL, overriding pkg-config | |
1445 | - GLU_CFLAGS C compiler flags for GLU, overriding pkg-config | |
1446 | - GLU_LIBS linker flags for GLU, overriding pkg-config | |
1447 | - CXX C++ compiler command | |
1448 | - CXXFLAGS C++ compiler flags | |
1427 | + GL_CFLAGS C compiler flags for GL, overriding configure script defaults | |
1428 | + GL_LIBS Linker flags for GL, overriding configure script defaults | |
1429 | + CPP C preprocessor | |
1430 | + GLU_CFLAGS C compiler flags for GLU, overriding system check | |
1431 | + GLU_LIBS Linker flags for GLU, overriding system check | |
1432 | + GLUT_CFLAGS C compiler flags for GLUT, overriding configure script defaults | |
1433 | + GLUT_LIBS Linker flags for GLUT, overriding configure script defaults | |
1449 | 1434 | |
1450 | 1435 | Use these variables to override the choices made by `configure' or to help |
1451 | 1436 | it to find libraries and programs with nonstandard names/locations. |
@@ -1527,6 +1512,44 @@ fi | ||
1527 | 1512 | ## Autoconf initialization. ## |
1528 | 1513 | ## ------------------------ ## |
1529 | 1514 | |
1515 | +# ac_fn_cxx_try_compile LINENO | |
1516 | +# ---------------------------- | |
1517 | +# Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1518 | +ac_fn_cxx_try_compile () | |
1519 | +{ | |
1520 | + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1521 | + rm -f conftest.$ac_objext | |
1522 | + if { { ac_try="$ac_compile" | |
1523 | +case "(($ac_try" in | |
1524 | + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1525 | + *) ac_try_echo=$ac_try;; | |
1526 | +esac | |
1527 | +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1528 | +$as_echo "$ac_try_echo"; } >&5 | |
1529 | + (eval "$ac_compile") 2>conftest.err | |
1530 | + ac_status=$? | |
1531 | + if test -s conftest.err; then | |
1532 | + grep -v '^ *+' conftest.err >conftest.er1 | |
1533 | + cat conftest.er1 >&5 | |
1534 | + mv -f conftest.er1 conftest.err | |
1535 | + fi | |
1536 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1537 | + test $ac_status = 0; } && { | |
1538 | + test -z "$ac_cxx_werror_flag" || | |
1539 | + test ! -s conftest.err | |
1540 | + } && test -s conftest.$ac_objext; then : | |
1541 | + ac_retval=0 | |
1542 | +else | |
1543 | + $as_echo "$as_me: failed program was:" >&5 | |
1544 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
1545 | + | |
1546 | + ac_retval=1 | |
1547 | +fi | |
1548 | + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1549 | + as_fn_set_status $ac_retval | |
1550 | + | |
1551 | +} # ac_fn_cxx_try_compile | |
1552 | + | |
1530 | 1553 | # ac_fn_c_try_compile LINENO |
1531 | 1554 | # -------------------------- |
1532 | 1555 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
@@ -1648,36 +1671,96 @@ fi | ||
1648 | 1671 | |
1649 | 1672 | } # ac_fn_c_try_cpp |
1650 | 1673 | |
1651 | -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1674 | +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1652 | 1675 | # ------------------------------------------------------- |
1653 | -# Tests whether HEADER exists and can be compiled using the include files in | |
1654 | -# INCLUDES, setting the cache variable VAR accordingly. | |
1655 | -ac_fn_c_check_header_compile () | |
1676 | +# Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1677 | +# the include files in INCLUDES and setting the cache variable VAR | |
1678 | +# accordingly. | |
1679 | +ac_fn_c_check_header_mongrel () | |
1656 | 1680 | { |
1657 | 1681 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1682 | + if eval \${$3+:} false; then : | |
1658 | 1683 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1659 | 1684 | $as_echo_n "checking for $2... " >&6; } |
1660 | 1685 | if eval \${$3+:} false; then : |
1661 | 1686 | $as_echo_n "(cached) " >&6 |
1687 | +fi | |
1688 | +eval ac_res=\$$3 | |
1689 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1690 | +$as_echo "$ac_res" >&6; } | |
1662 | 1691 | else |
1663 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1692 | + # Is the header compilable? | |
1693 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1694 | +$as_echo_n "checking $2 usability... " >&6; } | |
1695 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1664 | 1696 | /* end confdefs.h. */ |
1665 | 1697 | $4 |
1666 | 1698 | #include <$2> |
1667 | 1699 | _ACEOF |
1668 | 1700 | if ac_fn_c_try_compile "$LINENO"; then : |
1669 | - eval "$3=yes" | |
1701 | + ac_header_compiler=yes | |
1670 | 1702 | else |
1671 | - eval "$3=no" | |
1703 | + ac_header_compiler=no | |
1672 | 1704 | fi |
1673 | 1705 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1706 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1707 | +$as_echo "$ac_header_compiler" >&6; } | |
1708 | + | |
1709 | +# Is the header present? | |
1710 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1711 | +$as_echo_n "checking $2 presence... " >&6; } | |
1712 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1713 | +/* end confdefs.h. */ | |
1714 | +#include <$2> | |
1715 | +_ACEOF | |
1716 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
1717 | + ac_header_preproc=yes | |
1718 | +else | |
1719 | + ac_header_preproc=no | |
1720 | +fi | |
1721 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
1722 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1723 | +$as_echo "$ac_header_preproc" >&6; } | |
1724 | + | |
1725 | +# So? What about this header? | |
1726 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1727 | + yes:no: ) | |
1728 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1729 | +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1730 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1731 | +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1732 | + ;; | |
1733 | + no:yes:* ) | |
1734 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1735 | +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1736 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1737 | +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1738 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1739 | +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1740 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1741 | +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1742 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1743 | +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1744 | +( $as_echo "## ------------------------------------------- ## | |
1745 | +## Report this to mkawamura@issp.u-tokyo.ac.jp ## | |
1746 | +## ------------------------------------------- ##" | |
1747 | + ) | sed "s/^/$as_me: WARNING: /" >&2 | |
1748 | + ;; | |
1749 | +esac | |
1750 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1751 | +$as_echo_n "checking for $2... " >&6; } | |
1752 | +if eval \${$3+:} false; then : | |
1753 | + $as_echo_n "(cached) " >&6 | |
1754 | +else | |
1755 | + eval "$3=\$ac_header_compiler" | |
1674 | 1756 | fi |
1675 | 1757 | eval ac_res=\$$3 |
1676 | 1758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
1677 | 1759 | $as_echo "$ac_res" >&6; } |
1760 | +fi | |
1678 | 1761 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1679 | 1762 | |
1680 | -} # ac_fn_c_check_header_compile | |
1763 | +} # ac_fn_c_check_header_mongrel | |
1681 | 1764 | |
1682 | 1765 | # ac_fn_c_try_run LINENO |
1683 | 1766 | # ---------------------- |
@@ -1721,10 +1804,11 @@ fi | ||
1721 | 1804 | |
1722 | 1805 | } # ac_fn_c_try_run |
1723 | 1806 | |
1724 | -# ac_fn_c_check_func LINENO FUNC VAR | |
1725 | -# ---------------------------------- | |
1726 | -# Tests whether FUNC exists, setting the cache variable VAR accordingly | |
1727 | -ac_fn_c_check_func () | |
1807 | +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1808 | +# ------------------------------------------------------- | |
1809 | +# Tests whether HEADER exists and can be compiled using the include files in | |
1810 | +# INCLUDES, setting the cache variable VAR accordingly. | |
1811 | +ac_fn_c_check_header_compile () | |
1728 | 1812 | { |
1729 | 1813 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1730 | 1814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
@@ -1734,97 +1818,22 @@ if eval \${$3+:} false; then : | ||
1734 | 1818 | else |
1735 | 1819 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1736 | 1820 | /* end confdefs.h. */ |
1737 | -/* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
1738 | - For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
1739 | -#define $2 innocuous_$2 | |
1740 | - | |
1741 | -/* System header to define __stub macros and hopefully few prototypes, | |
1742 | - which can conflict with char $2 (); below. | |
1743 | - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
1744 | - <limits.h> exists even on freestanding compilers. */ | |
1745 | - | |
1746 | -#ifdef __STDC__ | |
1747 | -# include <limits.h> | |
1748 | -#else | |
1749 | -# include <assert.h> | |
1750 | -#endif | |
1751 | - | |
1752 | -#undef $2 | |
1753 | - | |
1754 | -/* Override any GCC internal prototype to avoid an error. | |
1755 | - Use char because int might match the return type of a GCC | |
1756 | - builtin and then its argument prototype would still apply. */ | |
1757 | -#ifdef __cplusplus | |
1758 | -extern "C" | |
1759 | -#endif | |
1760 | -char $2 (); | |
1761 | -/* The GNU C library defines this for functions which it implements | |
1762 | - to always fail with ENOSYS. Some functions are actually named | |
1763 | - something starting with __ and the normal name is an alias. */ | |
1764 | -#if defined __stub_$2 || defined __stub___$2 | |
1765 | -choke me | |
1766 | -#endif | |
1767 | - | |
1768 | -int | |
1769 | -main () | |
1770 | -{ | |
1771 | -return $2 (); | |
1772 | - ; | |
1773 | - return 0; | |
1774 | -} | |
1821 | +$4 | |
1822 | +#include <$2> | |
1775 | 1823 | _ACEOF |
1776 | -if ac_fn_c_try_link "$LINENO"; then : | |
1824 | +if ac_fn_c_try_compile "$LINENO"; then : | |
1777 | 1825 | eval "$3=yes" |
1778 | 1826 | else |
1779 | 1827 | eval "$3=no" |
1780 | 1828 | fi |
1781 | -rm -f core conftest.err conftest.$ac_objext \ | |
1782 | - conftest$ac_exeext conftest.$ac_ext | |
1829 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1783 | 1830 | fi |
1784 | 1831 | eval ac_res=\$$3 |
1785 | 1832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
1786 | 1833 | $as_echo "$ac_res" >&6; } |
1787 | 1834 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1788 | 1835 | |
1789 | -} # ac_fn_c_check_func | |
1790 | - | |
1791 | -# ac_fn_cxx_try_compile LINENO | |
1792 | -# ---------------------------- | |
1793 | -# Try to compile conftest.$ac_ext, and return whether this succeeded. | |
1794 | -ac_fn_cxx_try_compile () | |
1795 | -{ | |
1796 | - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
1797 | - rm -f conftest.$ac_objext | |
1798 | - if { { ac_try="$ac_compile" | |
1799 | -case "(($ac_try" in | |
1800 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
1801 | - *) ac_try_echo=$ac_try;; | |
1802 | -esac | |
1803 | -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
1804 | -$as_echo "$ac_try_echo"; } >&5 | |
1805 | - (eval "$ac_compile") 2>conftest.err | |
1806 | - ac_status=$? | |
1807 | - if test -s conftest.err; then | |
1808 | - grep -v '^ *+' conftest.err >conftest.er1 | |
1809 | - cat conftest.er1 >&5 | |
1810 | - mv -f conftest.er1 conftest.err | |
1811 | - fi | |
1812 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
1813 | - test $ac_status = 0; } && { | |
1814 | - test -z "$ac_cxx_werror_flag" || | |
1815 | - test ! -s conftest.err | |
1816 | - } && test -s conftest.$ac_objext; then : | |
1817 | - ac_retval=0 | |
1818 | -else | |
1819 | - $as_echo "$as_me: failed program was:" >&5 | |
1820 | -sed 's/^/| /' conftest.$ac_ext >&5 | |
1821 | - | |
1822 | - ac_retval=1 | |
1823 | -fi | |
1824 | - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
1825 | - as_fn_set_status $ac_retval | |
1826 | - | |
1827 | -} # ac_fn_cxx_try_compile | |
1836 | +} # ac_fn_c_check_header_compile | |
1828 | 1837 | cat >config.log <<_ACEOF |
1829 | 1838 | This file contains any messages produced by compilers while |
1830 | 1839 | running configure, to aid debugging if configure makes a mistake. |
@@ -2791,21 +2800,27 @@ ac_config_headers="$ac_config_headers config.h" | ||
2791 | 2800 | echo "" |
2792 | 2801 | echo " Check compiler" |
2793 | 2802 | echo "" |
2794 | -ac_ext=c | |
2795 | -ac_cpp='$CPP $CPPFLAGS' | |
2796 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2797 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2798 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2799 | -if test -n "$ac_tool_prefix"; then | |
2800 | - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
2801 | -set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
2803 | +ac_ext=cpp | |
2804 | +ac_cpp='$CXXCPP $CPPFLAGS' | |
2805 | +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2806 | +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2807 | +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
2808 | +if test -z "$CXX"; then | |
2809 | + if test -n "$CCC"; then | |
2810 | + CXX=$CCC | |
2811 | + else | |
2812 | + if test -n "$ac_tool_prefix"; then | |
2813 | + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
2814 | + do | |
2815 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2816 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2802 | 2817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2803 | 2818 | $as_echo_n "checking for $ac_word... " >&6; } |
2804 | -if ${ac_cv_prog_CC+:} false; then : | |
2819 | +if ${ac_cv_prog_CXX+:} false; then : | |
2805 | 2820 | $as_echo_n "(cached) " >&6 |
2806 | 2821 | else |
2807 | - if test -n "$CC"; then | |
2808 | - ac_cv_prog_CC="$CC" # Let the user override the test. | |
2822 | + if test -n "$CXX"; then | |
2823 | + ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
2809 | 2824 | else |
2810 | 2825 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2811 | 2826 | for as_dir in $PATH |
@@ -2814,7 +2829,7 @@ do | ||
2814 | 2829 | test -z "$as_dir" && as_dir=. |
2815 | 2830 | for ac_exec_ext in '' $ac_executable_extensions; do |
2816 | 2831 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
2817 | - ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
2832 | + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
2818 | 2833 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
2819 | 2834 | break 2 |
2820 | 2835 | fi |
@@ -2824,28 +2839,32 @@ IFS=$as_save_IFS | ||
2824 | 2839 | |
2825 | 2840 | fi |
2826 | 2841 | fi |
2827 | -CC=$ac_cv_prog_CC | |
2828 | -if test -n "$CC"; then | |
2829 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2830 | -$as_echo "$CC" >&6; } | |
2842 | +CXX=$ac_cv_prog_CXX | |
2843 | +if test -n "$CXX"; then | |
2844 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
2845 | +$as_echo "$CXX" >&6; } | |
2831 | 2846 | else |
2832 | 2847 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2833 | 2848 | $as_echo "no" >&6; } |
2834 | 2849 | fi |
2835 | 2850 | |
2836 | 2851 | |
2852 | + test -n "$CXX" && break | |
2853 | + done | |
2837 | 2854 | fi |
2838 | -if test -z "$ac_cv_prog_CC"; then | |
2839 | - ac_ct_CC=$CC | |
2840 | - # Extract the first word of "gcc", so it can be a program name with args. | |
2841 | -set dummy gcc; ac_word=$2 | |
2855 | +if test -z "$CXX"; then | |
2856 | + ac_ct_CXX=$CXX | |
2857 | + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
2858 | +do | |
2859 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2860 | +set dummy $ac_prog; ac_word=$2 | |
2842 | 2861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
2843 | 2862 | $as_echo_n "checking for $ac_word... " >&6; } |
2844 | -if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
2863 | +if ${ac_cv_prog_ac_ct_CXX+:} false; then : | |
2845 | 2864 | $as_echo_n "(cached) " >&6 |
2846 | 2865 | else |
2847 | - if test -n "$ac_ct_CC"; then | |
2848 | - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2866 | + if test -n "$ac_ct_CXX"; then | |
2867 | + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
2849 | 2868 | else |
2850 | 2869 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2851 | 2870 | for as_dir in $PATH |
@@ -2854,7 +2873,7 @@ do | ||
2854 | 2873 | test -z "$as_dir" && as_dir=. |
2855 | 2874 | for ac_exec_ext in '' $ac_executable_extensions; do |
2856 | 2875 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
2857 | - ac_cv_prog_ac_ct_CC="gcc" | |
2876 | + ac_cv_prog_ac_ct_CXX="$ac_prog" | |
2858 | 2877 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
2859 | 2878 | break 2 |
2860 | 2879 | fi |
@@ -2864,217 +2883,21 @@ IFS=$as_save_IFS | ||
2864 | 2883 | |
2865 | 2884 | fi |
2866 | 2885 | fi |
2867 | -ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2868 | -if test -n "$ac_ct_CC"; then | |
2869 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
2870 | -$as_echo "$ac_ct_CC" >&6; } | |
2886 | +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
2887 | +if test -n "$ac_ct_CXX"; then | |
2888 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
2889 | +$as_echo "$ac_ct_CXX" >&6; } | |
2871 | 2890 | else |
2872 | 2891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
2873 | 2892 | $as_echo "no" >&6; } |
2874 | 2893 | fi |
2875 | 2894 | |
2876 | - if test "x$ac_ct_CC" = x; then | |
2877 | - CC="" | |
2878 | - else | |
2879 | - case $cross_compiling:$ac_tool_warned in | |
2880 | -yes:) | |
2881 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
2882 | -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
2883 | -ac_tool_warned=yes ;; | |
2884 | -esac | |
2885 | - CC=$ac_ct_CC | |
2886 | - fi | |
2887 | -else | |
2888 | - CC="$ac_cv_prog_CC" | |
2889 | -fi | |
2890 | - | |
2891 | -if test -z "$CC"; then | |
2892 | - if test -n "$ac_tool_prefix"; then | |
2893 | - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
2894 | -set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
2895 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2896 | -$as_echo_n "checking for $ac_word... " >&6; } | |
2897 | -if ${ac_cv_prog_CC+:} false; then : | |
2898 | - $as_echo_n "(cached) " >&6 | |
2899 | -else | |
2900 | - if test -n "$CC"; then | |
2901 | - ac_cv_prog_CC="$CC" # Let the user override the test. | |
2902 | -else | |
2903 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2904 | -for as_dir in $PATH | |
2905 | -do | |
2906 | - IFS=$as_save_IFS | |
2907 | - test -z "$as_dir" && as_dir=. | |
2908 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
2909 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2910 | - ac_cv_prog_CC="${ac_tool_prefix}cc" | |
2911 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2912 | - break 2 | |
2913 | - fi | |
2914 | -done | |
2915 | - done | |
2916 | -IFS=$as_save_IFS | |
2917 | - | |
2918 | -fi | |
2919 | -fi | |
2920 | -CC=$ac_cv_prog_CC | |
2921 | -if test -n "$CC"; then | |
2922 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2923 | -$as_echo "$CC" >&6; } | |
2924 | -else | |
2925 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2926 | -$as_echo "no" >&6; } | |
2927 | -fi | |
2928 | - | |
2929 | - | |
2930 | - fi | |
2931 | -fi | |
2932 | -if test -z "$CC"; then | |
2933 | - # Extract the first word of "cc", so it can be a program name with args. | |
2934 | -set dummy cc; ac_word=$2 | |
2935 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2936 | -$as_echo_n "checking for $ac_word... " >&6; } | |
2937 | -if ${ac_cv_prog_CC+:} false; then : | |
2938 | - $as_echo_n "(cached) " >&6 | |
2939 | -else | |
2940 | - if test -n "$CC"; then | |
2941 | - ac_cv_prog_CC="$CC" # Let the user override the test. | |
2942 | -else | |
2943 | - ac_prog_rejected=no | |
2944 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2945 | -for as_dir in $PATH | |
2946 | -do | |
2947 | - IFS=$as_save_IFS | |
2948 | - test -z "$as_dir" && as_dir=. | |
2949 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
2950 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2951 | - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2952 | - ac_prog_rejected=yes | |
2953 | - continue | |
2954 | - fi | |
2955 | - ac_cv_prog_CC="cc" | |
2956 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2957 | - break 2 | |
2958 | - fi | |
2959 | -done | |
2960 | - done | |
2961 | -IFS=$as_save_IFS | |
2962 | - | |
2963 | -if test $ac_prog_rejected = yes; then | |
2964 | - # We found a bogon in the path, so make sure we never use it. | |
2965 | - set dummy $ac_cv_prog_CC | |
2966 | - shift | |
2967 | - if test $# != 0; then | |
2968 | - # We chose a different compiler from the bogus one. | |
2969 | - # However, it has the same basename, so the bogon will be chosen | |
2970 | - # first if we set CC to just the basename; use the full file name. | |
2971 | - shift | |
2972 | - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
2973 | - fi | |
2974 | -fi | |
2975 | -fi | |
2976 | -fi | |
2977 | -CC=$ac_cv_prog_CC | |
2978 | -if test -n "$CC"; then | |
2979 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
2980 | -$as_echo "$CC" >&6; } | |
2981 | -else | |
2982 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
2983 | -$as_echo "no" >&6; } | |
2984 | -fi | |
2985 | - | |
2986 | - | |
2987 | -fi | |
2988 | -if test -z "$CC"; then | |
2989 | - if test -n "$ac_tool_prefix"; then | |
2990 | - for ac_prog in cl.exe | |
2991 | - do | |
2992 | - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2993 | -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2994 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
2995 | -$as_echo_n "checking for $ac_word... " >&6; } | |
2996 | -if ${ac_cv_prog_CC+:} false; then : | |
2997 | - $as_echo_n "(cached) " >&6 | |
2998 | -else | |
2999 | - if test -n "$CC"; then | |
3000 | - ac_cv_prog_CC="$CC" # Let the user override the test. | |
3001 | -else | |
3002 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3003 | -for as_dir in $PATH | |
3004 | -do | |
3005 | - IFS=$as_save_IFS | |
3006 | - test -z "$as_dir" && as_dir=. | |
3007 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
3008 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3009 | - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
3010 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3011 | - break 2 | |
3012 | - fi | |
3013 | -done | |
3014 | - done | |
3015 | -IFS=$as_save_IFS | |
3016 | - | |
3017 | -fi | |
3018 | -fi | |
3019 | -CC=$ac_cv_prog_CC | |
3020 | -if test -n "$CC"; then | |
3021 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3022 | -$as_echo "$CC" >&6; } | |
3023 | -else | |
3024 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3025 | -$as_echo "no" >&6; } | |
3026 | -fi | |
3027 | - | |
3028 | - | |
3029 | - test -n "$CC" && break | |
3030 | - done | |
3031 | -fi | |
3032 | -if test -z "$CC"; then | |
3033 | - ac_ct_CC=$CC | |
3034 | - for ac_prog in cl.exe | |
3035 | -do | |
3036 | - # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3037 | -set dummy $ac_prog; ac_word=$2 | |
3038 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3039 | -$as_echo_n "checking for $ac_word... " >&6; } | |
3040 | -if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
3041 | - $as_echo_n "(cached) " >&6 | |
3042 | -else | |
3043 | - if test -n "$ac_ct_CC"; then | |
3044 | - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3045 | -else | |
3046 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3047 | -for as_dir in $PATH | |
3048 | -do | |
3049 | - IFS=$as_save_IFS | |
3050 | - test -z "$as_dir" && as_dir=. | |
3051 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
3052 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3053 | - ac_cv_prog_ac_ct_CC="$ac_prog" | |
3054 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3055 | - break 2 | |
3056 | - fi | |
3057 | -done | |
3058 | - done | |
3059 | -IFS=$as_save_IFS | |
3060 | - | |
3061 | -fi | |
3062 | -fi | |
3063 | -ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3064 | -if test -n "$ac_ct_CC"; then | |
3065 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3066 | -$as_echo "$ac_ct_CC" >&6; } | |
3067 | -else | |
3068 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3069 | -$as_echo "no" >&6; } | |
3070 | -fi | |
3071 | 2895 | |
3072 | - | |
3073 | - test -n "$ac_ct_CC" && break | |
2896 | + test -n "$ac_ct_CXX" && break | |
3074 | 2897 | done |
3075 | 2898 | |
3076 | - if test "x$ac_ct_CC" = x; then | |
3077 | - CC="" | |
2899 | + if test "x$ac_ct_CXX" = x; then | |
2900 | + CXX="g++" | |
3078 | 2901 | else |
3079 | 2902 | case $cross_compiling:$ac_tool_warned in |
3080 | 2903 | yes:) |
@@ -3082,20 +2905,14 @@ yes:) | ||
3082 | 2905 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
3083 | 2906 | ac_tool_warned=yes ;; |
3084 | 2907 | esac |
3085 | - CC=$ac_ct_CC | |
2908 | + CXX=$ac_ct_CXX | |
3086 | 2909 | fi |
3087 | 2910 | fi |
3088 | 2911 | |
2912 | + fi | |
3089 | 2913 | fi |
3090 | - | |
3091 | - | |
3092 | -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3093 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3094 | -as_fn_error $? "no acceptable C compiler found in \$PATH | |
3095 | -See \`config.log' for more details" "$LINENO" 5; } | |
3096 | - | |
3097 | 2914 | # Provide some information about the compiler. |
3098 | -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
2915 | +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
3099 | 2916 | set X $ac_compile |
3100 | 2917 | ac_compiler=$2 |
3101 | 2918 | for ac_option in --version -v -V -qversion; do |
@@ -3135,8 +2952,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | ||
3135 | 2952 | # Try to create an executable without -o first, disregard a.out. |
3136 | 2953 | # It will help us diagnose broken compilers, and finding out an intuition |
3137 | 2954 | # of exeext. |
3138 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
3139 | -$as_echo_n "checking whether the C compiler works... " >&6; } | |
2955 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 | |
2956 | +$as_echo_n "checking whether the C++ compiler works... " >&6; } | |
3140 | 2957 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
3141 | 2958 | |
3142 | 2959 | # The possible output files: |
@@ -3206,14 +3023,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 | ||
3206 | 3023 | |
3207 | 3024 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3208 | 3025 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
3209 | -as_fn_error 77 "C compiler cannot create executables | |
3026 | +as_fn_error 77 "C++ compiler cannot create executables | |
3210 | 3027 | See \`config.log' for more details" "$LINENO" 5; } |
3211 | 3028 | else |
3212 | 3029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3213 | 3030 | $as_echo "yes" >&6; } |
3214 | 3031 | fi |
3215 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
3216 | -$as_echo_n "checking for C compiler default output file name... " >&6; } | |
3032 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 | |
3033 | +$as_echo_n "checking for C++ compiler default output file name... " >&6; } | |
3217 | 3034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
3218 | 3035 | $as_echo "$ac_file" >&6; } |
3219 | 3036 | ac_exeext=$ac_cv_exeext |
@@ -3307,7 +3124,7 @@ $as_echo "$ac_try_echo"; } >&5 | ||
3307 | 3124 | else |
3308 | 3125 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
3309 | 3126 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
3310 | -as_fn_error $? "cannot run C compiled programs. | |
3127 | +as_fn_error $? "cannot run C++ compiled programs. | |
3311 | 3128 | If you meant to cross compile, use \`--host'. |
3312 | 3129 | See \`config.log' for more details" "$LINENO" 5; } |
3313 | 3130 | fi |
@@ -3369,9 +3186,9 @@ fi | ||
3369 | 3186 | $as_echo "$ac_cv_objext" >&6; } |
3370 | 3187 | OBJEXT=$ac_cv_objext |
3371 | 3188 | ac_objext=$OBJEXT |
3372 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
3373 | -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3374 | -if ${ac_cv_c_compiler_gnu+:} false; then : | |
3189 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
3190 | +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
3191 | +if ${ac_cv_cxx_compiler_gnu+:} false; then : | |
3375 | 3192 | $as_echo_n "(cached) " >&6 |
3376 | 3193 | else |
3377 | 3194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
@@ -3388,33 +3205,33 @@ main () | ||
3388 | 3205 | return 0; |
3389 | 3206 | } |
3390 | 3207 | _ACEOF |
3391 | -if ac_fn_c_try_compile "$LINENO"; then : | |
3208 | +if ac_fn_cxx_try_compile "$LINENO"; then : | |
3392 | 3209 | ac_compiler_gnu=yes |
3393 | 3210 | else |
3394 | 3211 | ac_compiler_gnu=no |
3395 | 3212 | fi |
3396 | 3213 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3397 | -ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
3214 | +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
3398 | 3215 | |
3399 | 3216 | fi |
3400 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
3401 | -$as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3217 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
3218 | +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
3402 | 3219 | if test $ac_compiler_gnu = yes; then |
3403 | - GCC=yes | |
3220 | + GXX=yes | |
3404 | 3221 | else |
3405 | - GCC= | |
3222 | + GXX= | |
3406 | 3223 | fi |
3407 | -ac_test_CFLAGS=${CFLAGS+set} | |
3408 | -ac_save_CFLAGS=$CFLAGS | |
3409 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
3410 | -$as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3411 | -if ${ac_cv_prog_cc_g+:} false; then : | |
3224 | +ac_test_CXXFLAGS=${CXXFLAGS+set} | |
3225 | +ac_save_CXXFLAGS=$CXXFLAGS | |
3226 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
3227 | +$as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
3228 | +if ${ac_cv_prog_cxx_g+:} false; then : | |
3412 | 3229 | $as_echo_n "(cached) " >&6 |
3413 | 3230 | else |
3414 | - ac_save_c_werror_flag=$ac_c_werror_flag | |
3415 | - ac_c_werror_flag=yes | |
3416 | - ac_cv_prog_cc_g=no | |
3417 | - CFLAGS="-g" | |
3231 | + ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
3232 | + ac_cxx_werror_flag=yes | |
3233 | + ac_cv_prog_cxx_g=no | |
3234 | + CXXFLAGS="-g" | |
3418 | 3235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3419 | 3236 | /* end confdefs.h. */ |
3420 | 3237 |
@@ -3426,10 +3243,10 @@ main () | ||
3426 | 3243 | return 0; |
3427 | 3244 | } |
3428 | 3245 | _ACEOF |
3429 | -if ac_fn_c_try_compile "$LINENO"; then : | |
3430 | - ac_cv_prog_cc_g=yes | |
3246 | +if ac_fn_cxx_try_compile "$LINENO"; then : | |
3247 | + ac_cv_prog_cxx_g=yes | |
3431 | 3248 | else |
3432 | - CFLAGS="" | |
3249 | + CXXFLAGS="" | |
3433 | 3250 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3434 | 3251 | /* end confdefs.h. */ |
3435 | 3252 |
@@ -3441,12 +3258,12 @@ main () | ||
3441 | 3258 | return 0; |
3442 | 3259 | } |
3443 | 3260 | _ACEOF |
3444 | -if ac_fn_c_try_compile "$LINENO"; then : | |
3261 | +if ac_fn_cxx_try_compile "$LINENO"; then : | |
3445 | 3262 | |
3446 | 3263 | else |
3447 | - ac_c_werror_flag=$ac_save_c_werror_flag | |
3448 | - CFLAGS="-g" | |
3449 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3264 | + ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3265 | + CXXFLAGS="-g" | |
3266 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3450 | 3267 | /* end confdefs.h. */ |
3451 | 3268 | |
3452 | 3269 | int |
@@ -3457,187 +3274,38 @@ main () | ||
3457 | 3274 | return 0; |
3458 | 3275 | } |
3459 | 3276 | _ACEOF |
3460 | -if ac_fn_c_try_compile "$LINENO"; then : | |
3461 | - ac_cv_prog_cc_g=yes | |
3277 | +if ac_fn_cxx_try_compile "$LINENO"; then : | |
3278 | + ac_cv_prog_cxx_g=yes | |
3462 | 3279 | fi |
3463 | 3280 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3464 | 3281 | fi |
3465 | 3282 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3466 | 3283 | fi |
3467 | 3284 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3468 | - ac_c_werror_flag=$ac_save_c_werror_flag | |
3285 | + ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
3469 | 3286 | fi |
3470 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3471 | -$as_echo "$ac_cv_prog_cc_g" >&6; } | |
3472 | -if test "$ac_test_CFLAGS" = set; then | |
3473 | - CFLAGS=$ac_save_CFLAGS | |
3474 | -elif test $ac_cv_prog_cc_g = yes; then | |
3475 | - if test "$GCC" = yes; then | |
3476 | - CFLAGS="-g -O2" | |
3287 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
3288 | +$as_echo "$ac_cv_prog_cxx_g" >&6; } | |
3289 | +if test "$ac_test_CXXFLAGS" = set; then | |
3290 | + CXXFLAGS=$ac_save_CXXFLAGS | |
3291 | +elif test $ac_cv_prog_cxx_g = yes; then | |
3292 | + if test "$GXX" = yes; then | |
3293 | + CXXFLAGS="-g -O2" | |
3477 | 3294 | else |
3478 | - CFLAGS="-g" | |
3295 | + CXXFLAGS="-g" | |
3479 | 3296 | fi |
3480 | 3297 | else |
3481 | - if test "$GCC" = yes; then | |
3482 | - CFLAGS="-O2" | |
3298 | + if test "$GXX" = yes; then | |
3299 | + CXXFLAGS="-O2" | |
3483 | 3300 | else |
3484 | - CFLAGS= | |
3301 | + CXXFLAGS= | |
3485 | 3302 | fi |
3486 | 3303 | fi |
3487 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
3488 | -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3489 | -if ${ac_cv_prog_cc_c89+:} false; then : | |
3490 | - $as_echo_n "(cached) " >&6 | |
3491 | -else | |
3492 | - ac_cv_prog_cc_c89=no | |
3493 | -ac_save_CC=$CC | |
3494 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3495 | -/* end confdefs.h. */ | |
3496 | -#include <stdarg.h> | |
3497 | -#include <stdio.h> | |
3498 | -struct stat; | |
3499 | -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3500 | -struct buf { int x; }; | |
3501 | -FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3502 | -static char *e (p, i) | |
3503 | - char **p; | |
3504 | - int i; | |
3505 | -{ | |
3506 | - return p[i]; | |
3507 | -} | |
3508 | -static char *f (char * (*g) (char **, int), char **p, ...) | |
3509 | -{ | |
3510 | - char *s; | |
3511 | - va_list v; | |
3512 | - va_start (v,p); | |
3513 | - s = g (p, va_arg (v,int)); | |
3514 | - va_end (v); | |
3515 | - return s; | |
3516 | -} | |
3517 | - | |
3518 | -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3519 | - function prototypes and stuff, but not '\xHH' hex character constants. | |
3520 | - These don't provoke an error unfortunately, instead are silently treated | |
3521 | - as 'x'. The following induces an error, until -std is added to get | |
3522 | - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
3523 | - array size at least. It's necessary to write '\x00'==0 to get something | |
3524 | - that's true only with -std. */ | |
3525 | -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
3526 | - | |
3527 | -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
3528 | - inside strings and character constants. */ | |
3529 | -#define FOO(x) 'x' | |
3530 | -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
3531 | - | |
3532 | -int test (int i, double x); | |
3533 | -struct s1 {int (*f) (int a);}; | |
3534 | -struct s2 {int (*f) (double a);}; | |
3535 | -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
3536 | -int argc; | |
3537 | -char **argv; | |
3538 | -int | |
3539 | -main () | |
3540 | -{ | |
3541 | -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
3542 | - ; | |
3543 | - return 0; | |
3544 | -} | |
3545 | -_ACEOF | |
3546 | -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
3547 | - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
3548 | -do | |
3549 | - CC="$ac_save_CC $ac_arg" | |
3550 | - if ac_fn_c_try_compile "$LINENO"; then : | |
3551 | - ac_cv_prog_cc_c89=$ac_arg | |
3552 | -fi | |
3553 | -rm -f core conftest.err conftest.$ac_objext | |
3554 | - test "x$ac_cv_prog_cc_c89" != "xno" && break | |
3555 | -done | |
3556 | -rm -f conftest.$ac_ext | |
3557 | -CC=$ac_save_CC | |
3558 | - | |
3559 | -fi | |
3560 | -# AC_CACHE_VAL | |
3561 | -case "x$ac_cv_prog_cc_c89" in | |
3562 | - x) | |
3563 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
3564 | -$as_echo "none needed" >&6; } ;; | |
3565 | - xno) | |
3566 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
3567 | -$as_echo "unsupported" >&6; } ;; | |
3568 | - *) | |
3569 | - CC="$CC $ac_cv_prog_cc_c89" | |
3570 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
3571 | -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
3572 | -esac | |
3573 | -if test "x$ac_cv_prog_cc_c89" != xno; then : | |
3574 | - | |
3575 | -fi | |
3576 | - | |
3577 | -ac_ext=c | |
3578 | -ac_cpp='$CPP $CPPFLAGS' | |
3579 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3580 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3581 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3582 | - | |
3583 | -ac_ext=c | |
3584 | -ac_cpp='$CPP $CPPFLAGS' | |
3585 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3586 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3587 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3588 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 | |
3589 | -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } | |
3590 | -if ${am_cv_prog_cc_c_o+:} false; then : | |
3591 | - $as_echo_n "(cached) " >&6 | |
3592 | -else | |
3593 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3594 | -/* end confdefs.h. */ | |
3595 | - | |
3596 | -int | |
3597 | -main () | |
3598 | -{ | |
3599 | - | |
3600 | - ; | |
3601 | - return 0; | |
3602 | -} | |
3603 | -_ACEOF | |
3604 | - # Make sure it works both with $CC and with simple cc. | |
3605 | - # Following AC_PROG_CC_C_O, we do the test twice because some | |
3606 | - # compilers refuse to overwrite an existing .o file with -o, | |
3607 | - # though they will create one. | |
3608 | - am_cv_prog_cc_c_o=yes | |
3609 | - for am_i in 1 2; do | |
3610 | - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 | |
3611 | - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 | |
3612 | - ac_status=$? | |
3613 | - echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3614 | - (exit $ac_status); } \ | |
3615 | - && test -f conftest2.$ac_objext; then | |
3616 | - : OK | |
3617 | - else | |
3618 | - am_cv_prog_cc_c_o=no | |
3619 | - break | |
3620 | - fi | |
3621 | - done | |
3622 | - rm -f core conftest* | |
3623 | - unset am_i | |
3624 | -fi | |
3625 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 | |
3626 | -$as_echo "$am_cv_prog_cc_c_o" >&6; } | |
3627 | -if test "$am_cv_prog_cc_c_o" != yes; then | |
3628 | - # Losing compiler, so override with the script. | |
3629 | - # FIXME: It is wrong to rewrite CC. | |
3630 | - # But if we don't then we get into trouble of one sort or another. | |
3631 | - # A longer-term fix would be to have automake use am__CC in this case, | |
3632 | - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
3633 | - CC="$am_aux_dir/compile $CC" | |
3634 | -fi | |
3635 | 3304 | ac_ext=c |
3636 | 3305 | ac_cpp='$CPP $CPPFLAGS' |
3637 | 3306 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
3638 | 3307 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
3639 | 3308 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
3640 | - | |
3641 | 3309 | DEPDIR="${am__leading_dot}deps" |
3642 | 3310 | |
3643 | 3311 | ac_config_commands="$ac_config_commands depfiles" |
@@ -3702,11 +3370,11 @@ fi | ||
3702 | 3370 | |
3703 | 3371 | |
3704 | 3372 | |
3705 | -depcc="$CC" am_compiler_list= | |
3373 | +depcc="$CXX" am_compiler_list= | |
3706 | 3374 | |
3707 | 3375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
3708 | 3376 | $as_echo_n "checking dependency style of $depcc... " >&6; } |
3709 | -if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
3377 | +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : | |
3710 | 3378 | $as_echo_n "(cached) " >&6 |
3711 | 3379 | else |
3712 | 3380 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
@@ -3729,7 +3397,7 @@ else | ||
3729 | 3397 | # directory. |
3730 | 3398 | mkdir sub |
3731 | 3399 | |
3732 | - am_cv_CC_dependencies_compiler_type=none | |
3400 | + am_cv_CXX_dependencies_compiler_type=none | |
3733 | 3401 | if test "$am_compiler_list" = ""; then |
3734 | 3402 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` |
3735 | 3403 | fi |
@@ -3802,7 +3470,7 @@ else | ||
3802 | 3470 | # icc: Command line remark: option '-MP' not supported |
3803 | 3471 | if (grep 'ignoring option' conftest.err || |
3804 | 3472 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
3805 | - am_cv_CC_dependencies_compiler_type=$depmode | |
3473 | + am_cv_CXX_dependencies_compiler_type=$depmode | |
3806 | 3474 | break |
3807 | 3475 | fi |
3808 | 3476 | fi |
@@ -3811,22 +3479,22 @@ else | ||
3811 | 3479 | cd .. |
3812 | 3480 | rm -rf conftest.dir |
3813 | 3481 | else |
3814 | - am_cv_CC_dependencies_compiler_type=none | |
3482 | + am_cv_CXX_dependencies_compiler_type=none | |
3815 | 3483 | fi |
3816 | 3484 | |
3817 | 3485 | fi |
3818 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
3819 | -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
3820 | -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
3486 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 | |
3487 | +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } | |
3488 | +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type | |
3821 | 3489 | |
3822 | 3490 | if |
3823 | 3491 | test "x$enable_dependency_tracking" != xno \ |
3824 | - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
3825 | - am__fastdepCC_TRUE= | |
3826 | - am__fastdepCC_FALSE='#' | |
3492 | + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then | |
3493 | + am__fastdepCXX_TRUE= | |
3494 | + am__fastdepCXX_FALSE='#' | |
3827 | 3495 | else |
3828 | - am__fastdepCC_TRUE='#' | |
3829 | - am__fastdepCC_FALSE= | |
3496 | + am__fastdepCXX_TRUE='#' | |
3497 | + am__fastdepCXX_FALSE= | |
3830 | 3498 | fi |
3831 | 3499 | |
3832 | 3500 |
@@ -3842,509 +3510,222 @@ else | ||
3842 | 3510 | fi |
3843 | 3511 | |
3844 | 3512 | if test x"$with_openmp" != xno; then |
3513 | + ac_ext=c | |
3514 | +ac_cpp='$CPP $CPPFLAGS' | |
3515 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3516 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3517 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3518 | +if test -n "$ac_tool_prefix"; then | |
3519 | + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
3520 | +set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
3521 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3522 | +$as_echo_n "checking for $ac_word... " >&6; } | |
3523 | +if ${ac_cv_prog_CC+:} false; then : | |
3524 | + $as_echo_n "(cached) " >&6 | |
3525 | +else | |
3526 | + if test -n "$CC"; then | |
3527 | + ac_cv_prog_CC="$CC" # Let the user override the test. | |
3528 | +else | |
3529 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3530 | +for as_dir in $PATH | |
3531 | +do | |
3532 | + IFS=$as_save_IFS | |
3533 | + test -z "$as_dir" && as_dir=. | |
3534 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3535 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3536 | + ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
3537 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3538 | + break 2 | |
3539 | + fi | |
3540 | +done | |
3541 | + done | |
3542 | +IFS=$as_save_IFS | |
3845 | 3543 | |
3544 | +fi | |
3545 | +fi | |
3546 | +CC=$ac_cv_prog_CC | |
3547 | +if test -n "$CC"; then | |
3548 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3549 | +$as_echo "$CC" >&6; } | |
3550 | +else | |
3551 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3552 | +$as_echo "no" >&6; } | |
3553 | +fi | |
3846 | 3554 | |
3847 | 3555 | |
3848 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 | |
3849 | -$as_echo_n "checking for OpenMP flag of C compiler... " >&6; } | |
3850 | -if ${ax_cv_c_openmp+:} false; then : | |
3851 | - $as_echo_n "(cached) " >&6 | |
3852 | -else | |
3853 | - saveCFLAGS=$CFLAGS | |
3854 | -ax_cv_c_openmp=unknown | |
3855 | -# Flags to try: -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI), | |
3856 | -# -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none | |
3857 | -ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none" | |
3858 | -if test "x$OPENMP_CFLAGS" != x; then | |
3859 | - ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" | |
3860 | 3556 | fi |
3861 | -for ax_openmp_flag in $ax_openmp_flags; do | |
3862 | - case $ax_openmp_flag in | |
3863 | - none) CFLAGS=$saveC ;; | |
3864 | - *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; | |
3865 | - esac | |
3866 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3867 | -/* end confdefs.h. */ | |
3868 | - | |
3869 | -#include <omp.h> | |
3870 | - | |
3871 | -static void | |
3872 | -parallel_fill(int * data, int n) | |
3873 | -{ | |
3874 | - int i; | |
3875 | -#pragma omp parallel for | |
3876 | - for (i = 0; i < n; ++i) | |
3877 | - data[i] = i; | |
3878 | -} | |
3879 | - | |
3880 | -int | |
3881 | -main() | |
3882 | -{ | |
3883 | - int arr[100000]; | |
3884 | - omp_set_num_threads(2); | |
3885 | - parallel_fill(arr, 100000); | |
3886 | - return 0; | |
3887 | -} | |
3888 | - | |
3889 | -_ACEOF | |
3890 | -if ac_fn_c_try_link "$LINENO"; then : | |
3891 | - ax_cv_c_openmp=$ax_openmp_flag; break | |
3892 | -fi | |
3893 | -rm -f core conftest.err conftest.$ac_objext \ | |
3894 | - conftest$ac_exeext conftest.$ac_ext | |
3895 | -done | |
3896 | -CFLAGS=$saveCFLAGS | |
3897 | - | |
3898 | -fi | |
3899 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 | |
3900 | -$as_echo "$ax_cv_c_openmp" >&6; } | |
3901 | -if test "x$ax_cv_c_openmp" = "xunknown"; then | |
3902 | - | |
3903 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenMP requested, but couldn't use OpenMP." >&5 | |
3904 | -$as_echo "$as_me: WARNING: OpenMP requested, but couldn't use OpenMP." >&2;} | |
3905 | - | |
3557 | +if test -z "$ac_cv_prog_CC"; then | |
3558 | + ac_ct_CC=$CC | |
3559 | + # Extract the first word of "gcc", so it can be a program name with args. | |
3560 | +set dummy gcc; ac_word=$2 | |
3561 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3562 | +$as_echo_n "checking for $ac_word... " >&6; } | |
3563 | +if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
3564 | + $as_echo_n "(cached) " >&6 | |
3906 | 3565 | else |
3907 | - if test "x$ax_cv_c_openmp" != "xnone"; then | |
3908 | - OPENMP_CFLAGS=$ax_cv_c_openmp | |
3566 | + if test -n "$ac_ct_CC"; then | |
3567 | + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3568 | +else | |
3569 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3570 | +for as_dir in $PATH | |
3571 | +do | |
3572 | + IFS=$as_save_IFS | |
3573 | + test -z "$as_dir" && as_dir=. | |
3574 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3575 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3576 | + ac_cv_prog_ac_ct_CC="gcc" | |
3577 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3578 | + break 2 | |
3909 | 3579 | fi |
3910 | - FCFLAGS="$FCFLAGS $OPENMP_CFLAGS";CFLAGS="$CFLAGS $OPENMP_CFLAGS" | |
3911 | -fi | |
3580 | +done | |
3581 | + done | |
3582 | +IFS=$as_save_IFS | |
3912 | 3583 | |
3913 | 3584 | fi |
3914 | -echo "" | |
3915 | -echo " Check OpenGL and GLUT" | |
3916 | -echo "" | |
3917 | -ac_ext=c | |
3918 | -ac_cpp='$CPP $CPPFLAGS' | |
3919 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3920 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3921 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3922 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
3923 | -$as_echo_n "checking how to run the C preprocessor... " >&6; } | |
3924 | -# On Suns, sometimes $CPP names a directory. | |
3925 | -if test -n "$CPP" && test -d "$CPP"; then | |
3926 | - CPP= | |
3927 | 3585 | fi |
3928 | -if test -z "$CPP"; then | |
3929 | - if ${ac_cv_prog_CPP+:} false; then : | |
3930 | - $as_echo_n "(cached) " >&6 | |
3931 | -else | |
3932 | - # Double quotes because CPP needs to be expanded | |
3933 | - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
3934 | - do | |
3935 | - ac_preproc_ok=false | |
3936 | -for ac_c_preproc_warn_flag in '' yes | |
3937 | -do | |
3938 | - # Use a header file that comes with gcc, so configuring glibc | |
3939 | - # with a fresh cross-compiler works. | |
3940 | - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3941 | - # <limits.h> exists even on freestanding compilers. | |
3942 | - # On the NeXT, cc -E runs the code through the compiler's parser, | |
3943 | - # not just through cpp. "Syntax error" is here to catch this case. | |
3944 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3945 | -/* end confdefs.h. */ | |
3946 | -#ifdef __STDC__ | |
3947 | -# include <limits.h> | |
3948 | -#else | |
3949 | -# include <assert.h> | |
3950 | -#endif | |
3951 | - Syntax error | |
3952 | -_ACEOF | |
3953 | -if ac_fn_c_try_cpp "$LINENO"; then : | |
3954 | - | |
3586 | +ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3587 | +if test -n "$ac_ct_CC"; then | |
3588 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3589 | +$as_echo "$ac_ct_CC" >&6; } | |
3955 | 3590 | else |
3956 | - # Broken: fails on valid input. | |
3957 | -continue | |
3591 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3592 | +$as_echo "no" >&6; } | |
3958 | 3593 | fi |
3959 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
3960 | 3594 | |
3961 | - # OK, works on sane cases. Now check whether nonexistent headers | |
3962 | - # can be detected and how. | |
3963 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3964 | -/* end confdefs.h. */ | |
3965 | -#include <ac_nonexistent.h> | |
3966 | -_ACEOF | |
3967 | -if ac_fn_c_try_cpp "$LINENO"; then : | |
3968 | - # Broken: success on invalid input. | |
3969 | -continue | |
3595 | + if test "x$ac_ct_CC" = x; then | |
3596 | + CC="" | |
3597 | + else | |
3598 | + case $cross_compiling:$ac_tool_warned in | |
3599 | +yes:) | |
3600 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
3601 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
3602 | +ac_tool_warned=yes ;; | |
3603 | +esac | |
3604 | + CC=$ac_ct_CC | |
3605 | + fi | |
3970 | 3606 | else |
3971 | - # Passes both tests. | |
3972 | -ac_preproc_ok=: | |
3973 | -break | |
3974 | -fi | |
3975 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
3976 | - | |
3977 | -done | |
3978 | -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3979 | -rm -f conftest.i conftest.err conftest.$ac_ext | |
3980 | -if $ac_preproc_ok; then : | |
3981 | - break | |
3607 | + CC="$ac_cv_prog_CC" | |
3982 | 3608 | fi |
3983 | 3609 | |
3984 | - done | |
3985 | - ac_cv_prog_CPP=$CPP | |
3986 | - | |
3987 | -fi | |
3988 | - CPP=$ac_cv_prog_CPP | |
3610 | +if test -z "$CC"; then | |
3611 | + if test -n "$ac_tool_prefix"; then | |
3612 | + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
3613 | +set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
3614 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3615 | +$as_echo_n "checking for $ac_word... " >&6; } | |
3616 | +if ${ac_cv_prog_CC+:} false; then : | |
3617 | + $as_echo_n "(cached) " >&6 | |
3989 | 3618 | else |
3990 | - ac_cv_prog_CPP=$CPP | |
3991 | -fi | |
3992 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
3993 | -$as_echo "$CPP" >&6; } | |
3994 | -ac_preproc_ok=false | |
3995 | -for ac_c_preproc_warn_flag in '' yes | |
3619 | + if test -n "$CC"; then | |
3620 | + ac_cv_prog_CC="$CC" # Let the user override the test. | |
3621 | +else | |
3622 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3623 | +for as_dir in $PATH | |
3996 | 3624 | do |
3997 | - # Use a header file that comes with gcc, so configuring glibc | |
3998 | - # with a fresh cross-compiler works. | |
3999 | - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4000 | - # <limits.h> exists even on freestanding compilers. | |
4001 | - # On the NeXT, cc -E runs the code through the compiler's parser, | |
4002 | - # not just through cpp. "Syntax error" is here to catch this case. | |
4003 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4004 | -/* end confdefs.h. */ | |
4005 | -#ifdef __STDC__ | |
4006 | -# include <limits.h> | |
4007 | -#else | |
4008 | -# include <assert.h> | |
4009 | -#endif | |
4010 | - Syntax error | |
4011 | -_ACEOF | |
4012 | -if ac_fn_c_try_cpp "$LINENO"; then : | |
3625 | + IFS=$as_save_IFS | |
3626 | + test -z "$as_dir" && as_dir=. | |
3627 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3628 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3629 | + ac_cv_prog_CC="${ac_tool_prefix}cc" | |
3630 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3631 | + break 2 | |
3632 | + fi | |
3633 | +done | |
3634 | + done | |
3635 | +IFS=$as_save_IFS | |
4013 | 3636 | |
4014 | -else | |
4015 | - # Broken: fails on valid input. | |
4016 | -continue | |
4017 | 3637 | fi |
4018 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
4019 | - | |
4020 | - # OK, works on sane cases. Now check whether nonexistent headers | |
4021 | - # can be detected and how. | |
4022 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4023 | -/* end confdefs.h. */ | |
4024 | -#include <ac_nonexistent.h> | |
4025 | -_ACEOF | |
4026 | -if ac_fn_c_try_cpp "$LINENO"; then : | |
4027 | - # Broken: success on invalid input. | |
4028 | -continue | |
4029 | -else | |
4030 | - # Passes both tests. | |
4031 | -ac_preproc_ok=: | |
4032 | -break | |
4033 | 3638 | fi |
4034 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
4035 | - | |
4036 | -done | |
4037 | -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4038 | -rm -f conftest.i conftest.err conftest.$ac_ext | |
4039 | -if $ac_preproc_ok; then : | |
4040 | - | |
3639 | +CC=$ac_cv_prog_CC | |
3640 | +if test -n "$CC"; then | |
3641 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3642 | +$as_echo "$CC" >&6; } | |
4041 | 3643 | else |
4042 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4043 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4044 | -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
4045 | -See \`config.log' for more details" "$LINENO" 5; } | |
3644 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3645 | +$as_echo "no" >&6; } | |
4046 | 3646 | fi |
4047 | 3647 | |
4048 | -ac_ext=c | |
4049 | -ac_cpp='$CPP $CPPFLAGS' | |
4050 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4051 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4052 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4053 | - | |
4054 | 3648 | |
4055 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 | |
4056 | -$as_echo_n "checking for X... " >&6; } | |
4057 | - | |
4058 | - | |
4059 | -# Check whether --with-x was given. | |
4060 | -if test "${with_x+set}" = set; then : | |
4061 | - withval=$with_x; | |
3649 | + fi | |
4062 | 3650 | fi |
4063 | - | |
4064 | -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. | |
4065 | -if test "x$with_x" = xno; then | |
4066 | - # The user explicitly disabled X. | |
4067 | - have_x=disabled | |
4068 | -else | |
4069 | - case $x_includes,$x_libraries in #( | |
4070 | - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( | |
4071 | - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : | |
3651 | +if test -z "$CC"; then | |
3652 | + # Extract the first word of "cc", so it can be a program name with args. | |
3653 | +set dummy cc; ac_word=$2 | |
3654 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
3655 | +$as_echo_n "checking for $ac_word... " >&6; } | |
3656 | +if ${ac_cv_prog_CC+:} false; then : | |
4072 | 3657 | $as_echo_n "(cached) " >&6 |
4073 | 3658 | else |
4074 | - # One or both of the vars are not set, and there is no cached value. | |
4075 | -ac_x_includes=no ac_x_libraries=no | |
4076 | -rm -f -r conftest.dir | |
4077 | -if mkdir conftest.dir; then | |
4078 | - cd conftest.dir | |
4079 | - cat >Imakefile <<'_ACEOF' | |
4080 | -incroot: | |
4081 | - @echo incroot='${INCROOT}' | |
4082 | -usrlibdir: | |
4083 | - @echo usrlibdir='${USRLIBDIR}' | |
4084 | -libdir: | |
4085 | - @echo libdir='${LIBDIR}' | |
4086 | -_ACEOF | |
4087 | - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then | |
4088 | - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
4089 | - for ac_var in incroot usrlibdir libdir; do | |
4090 | - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" | |
4091 | - done | |
4092 | - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. | |
4093 | - for ac_extension in a so sl dylib la dll; do | |
4094 | - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && | |
4095 | - test -f "$ac_im_libdir/libX11.$ac_extension"; then | |
4096 | - ac_im_usrlibdir=$ac_im_libdir; break | |
4097 | - fi | |
4098 | - done | |
4099 | - # Screen out bogus values from the imake configuration. They are | |
4100 | - # bogus both because they are the default anyway, and because | |
4101 | - # using them would break gcc on systems where it needs fixed includes. | |
4102 | - case $ac_im_incroot in | |
4103 | - /usr/include) ac_x_includes= ;; | |
4104 | - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; | |
4105 | - esac | |
4106 | - case $ac_im_usrlibdir in | |
4107 | - /usr/lib | /usr/lib64 | /lib | /lib64) ;; | |
4108 | - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; | |
4109 | - esac | |
4110 | - fi | |
4111 | - cd .. | |
4112 | - rm -f -r conftest.dir | |
4113 | -fi | |
4114 | - | |
4115 | -# Standard set of common directories for X headers. | |
4116 | -# Check X11 before X11Rn because it is often a symlink to the current release. | |
4117 | -ac_x_header_dirs=' | |
4118 | -/usr/X11/include | |
4119 | -/usr/X11R7/include | |
4120 | -/usr/X11R6/include | |
4121 | -/usr/X11R5/include | |
4122 | -/usr/X11R4/include | |
4123 | - | |
4124 | -/usr/include/X11 | |
4125 | -/usr/include/X11R7 | |
4126 | -/usr/include/X11R6 | |
4127 | -/usr/include/X11R5 | |
4128 | -/usr/include/X11R4 | |
4129 | - | |
4130 | -/usr/local/X11/include | |
4131 | -/usr/local/X11R7/include | |
4132 | -/usr/local/X11R6/include | |
4133 | -/usr/local/X11R5/include | |
4134 | -/usr/local/X11R4/include | |
4135 | - | |
4136 | -/usr/local/include/X11 | |
4137 | -/usr/local/include/X11R7 | |
4138 | -/usr/local/include/X11R6 | |
4139 | -/usr/local/include/X11R5 | |
4140 | -/usr/local/include/X11R4 | |
4141 | - | |
4142 | -/usr/X386/include | |
4143 | -/usr/x386/include | |
4144 | -/usr/XFree86/include/X11 | |
4145 | - | |
4146 | -/usr/include | |
4147 | -/usr/local/include | |
4148 | -/usr/unsupported/include | |
4149 | -/usr/athena/include | |
4150 | -/usr/local/x11r5/include | |
4151 | -/usr/lpp/Xamples/include | |
4152 | - | |
4153 | -/usr/openwin/include | |
4154 | -/usr/openwin/share/include' | |
4155 | - | |
4156 | -if test "$ac_x_includes" = no; then | |
4157 | - # Guess where to find include files, by looking for Xlib.h. | |
4158 | - # First, try using that file with no special directory specified. | |
4159 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4160 | -/* end confdefs.h. */ | |
4161 | -#include <X11/Xlib.h> | |
4162 | -_ACEOF | |
4163 | -if ac_fn_c_try_cpp "$LINENO"; then : | |
4164 | - # We can compile using X headers with no special include directory. | |
4165 | -ac_x_includes= | |
3659 | + if test -n "$CC"; then | |
3660 | + ac_cv_prog_CC="$CC" # Let the user override the test. | |
4166 | 3661 | else |
4167 | - for ac_dir in $ac_x_header_dirs; do | |
4168 | - if test -r "$ac_dir/X11/Xlib.h"; then | |
4169 | - ac_x_includes=$ac_dir | |
4170 | - break | |
3662 | + ac_prog_rejected=no | |
3663 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3664 | +for as_dir in $PATH | |
3665 | +do | |
3666 | + IFS=$as_save_IFS | |
3667 | + test -z "$as_dir" && as_dir=. | |
3668 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3669 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3670 | + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
3671 | + ac_prog_rejected=yes | |
3672 | + continue | |
3673 | + fi | |
3674 | + ac_cv_prog_CC="cc" | |
3675 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3676 | + break 2 | |
4171 | 3677 | fi |
4172 | 3678 | done |
4173 | -fi | |
4174 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
4175 | -fi # $ac_x_includes = no | |
4176 | - | |
4177 | -if test "$ac_x_libraries" = no; then | |
4178 | - # Check for the libraries. | |
4179 | - # See if we find them without any special options. | |
4180 | - # Don't add to $LIBS permanently. | |
4181 | - ac_save_LIBS=$LIBS | |
4182 | - LIBS="-lX11 $LIBS" | |
4183 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4184 | -/* end confdefs.h. */ | |
4185 | -#include <X11/Xlib.h> | |
4186 | -int | |
4187 | -main () | |
4188 | -{ | |
4189 | -XrmInitialize () | |
4190 | - ; | |
4191 | - return 0; | |
4192 | -} | |
4193 | -_ACEOF | |
4194 | -if ac_fn_c_try_link "$LINENO"; then : | |
4195 | - LIBS=$ac_save_LIBS | |
4196 | -# We can link X programs with no special library path. | |
4197 | -ac_x_libraries= | |
4198 | -else | |
4199 | - LIBS=$ac_save_LIBS | |
4200 | -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` | |
4201 | -do | |
4202 | - # Don't even attempt the hair of trying to link an X program! | |
4203 | - for ac_extension in a so sl dylib la dll; do | |
4204 | - if test -r "$ac_dir/libX11.$ac_extension"; then | |
4205 | - ac_x_libraries=$ac_dir | |
4206 | - break 2 | |
4207 | - fi | |
4208 | 3679 | done |
4209 | -done | |
4210 | -fi | |
4211 | -rm -f core conftest.err conftest.$ac_objext \ | |
4212 | - conftest$ac_exeext conftest.$ac_ext | |
4213 | -fi # $ac_x_libraries = no | |
3680 | +IFS=$as_save_IFS | |
4214 | 3681 | |
4215 | -case $ac_x_includes,$ac_x_libraries in #( | |
4216 | - no,* | *,no | *\'*) | |
4217 | - # Didn't find X, or a directory has "'" in its name. | |
4218 | - ac_cv_have_x="have_x=no";; #( | |
4219 | - *) | |
4220 | - # Record where we found X for the cache. | |
4221 | - ac_cv_have_x="have_x=yes\ | |
4222 | - ac_x_includes='$ac_x_includes'\ | |
4223 | - ac_x_libraries='$ac_x_libraries'" | |
4224 | -esac | |
3682 | +if test $ac_prog_rejected = yes; then | |
3683 | + # We found a bogon in the path, so make sure we never use it. | |
3684 | + set dummy $ac_cv_prog_CC | |
3685 | + shift | |
3686 | + if test $# != 0; then | |
3687 | + # We chose a different compiler from the bogus one. | |
3688 | + # However, it has the same basename, so the bogon will be chosen | |
3689 | + # first if we set CC to just the basename; use the full file name. | |
3690 | + shift | |
3691 | + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
3692 | + fi | |
4225 | 3693 | fi |
4226 | -;; #( | |
4227 | - *) have_x=yes;; | |
4228 | - esac | |
4229 | - eval "$ac_cv_have_x" | |
4230 | -fi # $with_x != no | |
4231 | - | |
4232 | -if test "$have_x" != yes; then | |
4233 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 | |
4234 | -$as_echo "$have_x" >&6; } | |
4235 | - no_x=yes | |
4236 | -else | |
4237 | - # If each of the values was on the command line, it overrides each guess. | |
4238 | - test "x$x_includes" = xNONE && x_includes=$ac_x_includes | |
4239 | - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries | |
4240 | - # Update the cache value to reflect the command line values. | |
4241 | - ac_cv_have_x="have_x=yes\ | |
4242 | - ac_x_includes='$x_includes'\ | |
4243 | - ac_x_libraries='$x_libraries'" | |
4244 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 | |
4245 | -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } | |
4246 | 3694 | fi |
4247 | - | |
4248 | -# Make sure we can run config.sub. | |
4249 | -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4250 | - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
4251 | - | |
4252 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4253 | -$as_echo_n "checking build system type... " >&6; } | |
4254 | -if ${ac_cv_build+:} false; then : | |
4255 | - $as_echo_n "(cached) " >&6 | |
4256 | -else | |
4257 | - ac_build_alias=$build_alias | |
4258 | -test "x$ac_build_alias" = x && | |
4259 | - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4260 | -test "x$ac_build_alias" = x && | |
4261 | - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
4262 | -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4263 | - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
4264 | - | |
4265 | 3695 | fi |
4266 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4267 | -$as_echo "$ac_cv_build" >&6; } | |
4268 | -case $ac_cv_build in | |
4269 | -*-*-*) ;; | |
4270 | -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
4271 | -esac | |
4272 | -build=$ac_cv_build | |
4273 | -ac_save_IFS=$IFS; IFS='-' | |
4274 | -set x $ac_cv_build | |
4275 | -shift | |
4276 | -build_cpu=$1 | |
4277 | -build_vendor=$2 | |
4278 | -shift; shift | |
4279 | -# Remember, the first character of IFS is used to create $*, | |
4280 | -# except with old shells: | |
4281 | -build_os=$* | |
4282 | -IFS=$ac_save_IFS | |
4283 | -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
4284 | - | |
4285 | - | |
4286 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4287 | -$as_echo_n "checking host system type... " >&6; } | |
4288 | -if ${ac_cv_host+:} false; then : | |
4289 | - $as_echo_n "(cached) " >&6 | |
4290 | -else | |
4291 | - if test "x$host_alias" = x; then | |
4292 | - ac_cv_host=$ac_cv_build | |
3696 | +CC=$ac_cv_prog_CC | |
3697 | +if test -n "$CC"; then | |
3698 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3699 | +$as_echo "$CC" >&6; } | |
4293 | 3700 | else |
4294 | - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
4295 | - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
4296 | -fi | |
4297 | - | |
3701 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
3702 | +$as_echo "no" >&6; } | |
4298 | 3703 | fi |
4299 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4300 | -$as_echo "$ac_cv_host" >&6; } | |
4301 | -case $ac_cv_host in | |
4302 | -*-*-*) ;; | |
4303 | -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
4304 | -esac | |
4305 | -host=$ac_cv_host | |
4306 | -ac_save_IFS=$IFS; IFS='-' | |
4307 | -set x $ac_cv_host | |
4308 | -shift | |
4309 | -host_cpu=$1 | |
4310 | -host_vendor=$2 | |
4311 | -shift; shift | |
4312 | -# Remember, the first character of IFS is used to create $*, | |
4313 | -# except with old shells: | |
4314 | -host_os=$* | |
4315 | -IFS=$ac_save_IFS | |
4316 | -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4317 | - | |
4318 | - | |
4319 | - | |
4320 | - | |
4321 | - | |
4322 | 3704 | |
4323 | 3705 | |
4324 | - | |
4325 | - | |
4326 | -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
4327 | - if test -n "$ac_tool_prefix"; then | |
4328 | - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
4329 | -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
3706 | +fi | |
3707 | +if test -z "$CC"; then | |
3708 | + if test -n "$ac_tool_prefix"; then | |
3709 | + for ac_prog in cl.exe | |
3710 | + do | |
3711 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
3712 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
4330 | 3713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4331 | 3714 | $as_echo_n "checking for $ac_word... " >&6; } |
4332 | -if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
3715 | +if ${ac_cv_prog_CC+:} false; then : | |
4333 | 3716 | $as_echo_n "(cached) " >&6 |
4334 | 3717 | else |
4335 | - case $PKG_CONFIG in | |
4336 | - [\\/]* | ?:[\\/]*) | |
4337 | - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
4338 | - ;; | |
4339 | - *) | |
4340 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3718 | + if test -n "$CC"; then | |
3719 | + ac_cv_prog_CC="$CC" # Let the user override the test. | |
3720 | +else | |
3721 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4341 | 3722 | for as_dir in $PATH |
4342 | 3723 | do |
4343 | 3724 | IFS=$as_save_IFS |
4344 | 3725 | test -z "$as_dir" && as_dir=. |
4345 | 3726 | for ac_exec_ext in '' $ac_executable_extensions; do |
4346 | 3727 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4347 | - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
3728 | + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
4348 | 3729 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
4349 | 3730 | break 2 |
4350 | 3731 | fi |
@@ -4352,42 +3733,43 @@ done | ||
4352 | 3733 | done |
4353 | 3734 | IFS=$as_save_IFS |
4354 | 3735 | |
4355 | - ;; | |
4356 | -esac | |
4357 | 3736 | fi |
4358 | -PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
4359 | -if test -n "$PKG_CONFIG"; then | |
4360 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
4361 | -$as_echo "$PKG_CONFIG" >&6; } | |
3737 | +fi | |
3738 | +CC=$ac_cv_prog_CC | |
3739 | +if test -n "$CC"; then | |
3740 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
3741 | +$as_echo "$CC" >&6; } | |
4362 | 3742 | else |
4363 | 3743 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4364 | 3744 | $as_echo "no" >&6; } |
4365 | 3745 | fi |
4366 | 3746 | |
4367 | 3747 | |
3748 | + test -n "$CC" && break | |
3749 | + done | |
4368 | 3750 | fi |
4369 | -if test -z "$ac_cv_path_PKG_CONFIG"; then | |
4370 | - ac_pt_PKG_CONFIG=$PKG_CONFIG | |
4371 | - # Extract the first word of "pkg-config", so it can be a program name with args. | |
4372 | -set dummy pkg-config; ac_word=$2 | |
3751 | +if test -z "$CC"; then | |
3752 | + ac_ct_CC=$CC | |
3753 | + for ac_prog in cl.exe | |
3754 | +do | |
3755 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | |
3756 | +set dummy $ac_prog; ac_word=$2 | |
4373 | 3757 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
4374 | 3758 | $as_echo_n "checking for $ac_word... " >&6; } |
4375 | -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
3759 | +if ${ac_cv_prog_ac_ct_CC+:} false; then : | |
4376 | 3760 | $as_echo_n "(cached) " >&6 |
4377 | 3761 | else |
4378 | - case $ac_pt_PKG_CONFIG in | |
4379 | - [\\/]* | ?:[\\/]*) | |
4380 | - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
4381 | - ;; | |
4382 | - *) | |
4383 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3762 | + if test -n "$ac_ct_CC"; then | |
3763 | + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
3764 | +else | |
3765 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4384 | 3766 | for as_dir in $PATH |
4385 | 3767 | do |
4386 | 3768 | IFS=$as_save_IFS |
4387 | 3769 | test -z "$as_dir" && as_dir=. |
4388 | 3770 | for ac_exec_ext in '' $ac_executable_extensions; do |
4389 | 3771 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
4390 | - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
3772 | + ac_cv_prog_ac_ct_CC="$ac_prog" | |
4391 | 3773 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
4392 | 3774 | break 2 |
4393 | 3775 | fi |
@@ -4395,20 +3777,23 @@ done | ||
4395 | 3777 | done |
4396 | 3778 | IFS=$as_save_IFS |
4397 | 3779 | |
4398 | - ;; | |
4399 | -esac | |
4400 | 3780 | fi |
4401 | -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
4402 | -if test -n "$ac_pt_PKG_CONFIG"; then | |
4403 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
4404 | -$as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
3781 | +fi | |
3782 | +ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
3783 | +if test -n "$ac_ct_CC"; then | |
3784 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
3785 | +$as_echo "$ac_ct_CC" >&6; } | |
4405 | 3786 | else |
4406 | 3787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
4407 | 3788 | $as_echo "no" >&6; } |
4408 | 3789 | fi |
4409 | 3790 | |
4410 | - if test "x$ac_pt_PKG_CONFIG" = x; then | |
4411 | - PKG_CONFIG="" | |
3791 | + | |
3792 | + test -n "$ac_ct_CC" && break | |
3793 | +done | |
3794 | + | |
3795 | + if test "x$ac_ct_CC" = x; then | |
3796 | + CC="" | |
4412 | 3797 | else |
4413 | 3798 | case $cross_compiling:$ac_tool_warned in |
4414 | 3799 | yes:) |
@@ -4416,2376 +3801,1178 @@ yes:) | ||
4416 | 3801 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
4417 | 3802 | ac_tool_warned=yes ;; |
4418 | 3803 | esac |
4419 | - PKG_CONFIG=$ac_pt_PKG_CONFIG | |
3804 | + CC=$ac_ct_CC | |
4420 | 3805 | fi |
4421 | -else | |
4422 | - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
4423 | 3806 | fi |
4424 | 3807 | |
4425 | 3808 | fi |
4426 | -if test -n "$PKG_CONFIG"; then | |
4427 | - _pkg_min_version=0.9.0 | |
4428 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
4429 | -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
4430 | - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
4431 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4432 | -$as_echo "yes" >&6; } | |
4433 | - else | |
4434 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4435 | -$as_echo "no" >&6; } | |
4436 | - PKG_CONFIG="" | |
4437 | - fi | |
4438 | -fi | |
4439 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
4440 | -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4441 | -if ${ac_cv_path_GREP+:} false; then : | |
4442 | - $as_echo_n "(cached) " >&6 | |
4443 | -else | |
4444 | - if test -z "$GREP"; then | |
4445 | - ac_path_GREP_found=false | |
4446 | - # Loop through the user's path and test for each of PROGNAME-LIST | |
4447 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4448 | -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4449 | -do | |
4450 | - IFS=$as_save_IFS | |
4451 | - test -z "$as_dir" && as_dir=. | |
4452 | - for ac_prog in grep ggrep; do | |
4453 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
4454 | - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4455 | - as_fn_executable_p "$ac_path_GREP" || continue | |
4456 | -# Check for GNU ac_path_GREP and select it if it is found. | |
4457 | - # Check for GNU $ac_path_GREP | |
4458 | -case `"$ac_path_GREP" --version 2>&1` in | |
4459 | -*GNU*) | |
4460 | - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4461 | -*) | |
4462 | - ac_count=0 | |
4463 | - $as_echo_n 0123456789 >"conftest.in" | |
4464 | - while : | |
4465 | - do | |
4466 | - cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4467 | - mv "conftest.tmp" "conftest.in" | |
4468 | - cp "conftest.in" "conftest.nl" | |
4469 | - $as_echo 'GREP' >> "conftest.nl" | |
4470 | - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4471 | - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4472 | - as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4473 | - if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4474 | - # Best one so far, save it but keep looking for a better one | |
4475 | - ac_cv_path_GREP="$ac_path_GREP" | |
4476 | - ac_path_GREP_max=$ac_count | |
4477 | - fi | |
4478 | - # 10*(2^10) chars as input seems more than enough | |
4479 | - test $ac_count -gt 10 && break | |
4480 | - done | |
4481 | - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4482 | -esac | |
4483 | 3809 | |
4484 | - $ac_path_GREP_found && break 3 | |
4485 | - done | |
4486 | - done | |
4487 | - done | |
4488 | -IFS=$as_save_IFS | |
4489 | - if test -z "$ac_cv_path_GREP"; then | |
4490 | - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4491 | - fi | |
4492 | -else | |
4493 | - ac_cv_path_GREP=$GREP | |
4494 | -fi | |
4495 | - | |
4496 | -fi | |
4497 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4498 | -$as_echo "$ac_cv_path_GREP" >&6; } | |
4499 | - GREP="$ac_cv_path_GREP" | |
4500 | 3810 | |
3811 | +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
3812 | +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
3813 | +as_fn_error $? "no acceptable C compiler found in \$PATH | |
3814 | +See \`config.log' for more details" "$LINENO" 5; } | |
4501 | 3815 | |
4502 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4503 | -$as_echo_n "checking for egrep... " >&6; } | |
4504 | -if ${ac_cv_path_EGREP+:} false; then : | |
4505 | - $as_echo_n "(cached) " >&6 | |
4506 | -else | |
4507 | - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4508 | - then ac_cv_path_EGREP="$GREP -E" | |
4509 | - else | |
4510 | - if test -z "$EGREP"; then | |
4511 | - ac_path_EGREP_found=false | |
4512 | - # Loop through the user's path and test for each of PROGNAME-LIST | |
4513 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4514 | -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4515 | -do | |
4516 | - IFS=$as_save_IFS | |
4517 | - test -z "$as_dir" && as_dir=. | |
4518 | - for ac_prog in egrep; do | |
4519 | - for ac_exec_ext in '' $ac_executable_extensions; do | |
4520 | - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4521 | - as_fn_executable_p "$ac_path_EGREP" || continue | |
4522 | -# Check for GNU ac_path_EGREP and select it if it is found. | |
4523 | - # Check for GNU $ac_path_EGREP | |
4524 | -case `"$ac_path_EGREP" --version 2>&1` in | |
4525 | -*GNU*) | |
4526 | - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4527 | -*) | |
4528 | - ac_count=0 | |
4529 | - $as_echo_n 0123456789 >"conftest.in" | |
4530 | - while : | |
4531 | - do | |
4532 | - cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4533 | - mv "conftest.tmp" "conftest.in" | |
4534 | - cp "conftest.in" "conftest.nl" | |
4535 | - $as_echo 'EGREP' >> "conftest.nl" | |
4536 | - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4537 | - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4538 | - as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4539 | - if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4540 | - # Best one so far, save it but keep looking for a better one | |
4541 | - ac_cv_path_EGREP="$ac_path_EGREP" | |
4542 | - ac_path_EGREP_max=$ac_count | |
4543 | - fi | |
4544 | - # 10*(2^10) chars as input seems more than enough | |
4545 | - test $ac_count -gt 10 && break | |
4546 | - done | |
4547 | - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
3816 | +# Provide some information about the compiler. | |
3817 | +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
3818 | +set X $ac_compile | |
3819 | +ac_compiler=$2 | |
3820 | +for ac_option in --version -v -V -qversion; do | |
3821 | + { { ac_try="$ac_compiler $ac_option >&5" | |
3822 | +case "(($ac_try" in | |
3823 | + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
3824 | + *) ac_try_echo=$ac_try;; | |
4548 | 3825 | esac |
4549 | - | |
4550 | - $ac_path_EGREP_found && break 3 | |
4551 | - done | |
4552 | - done | |
4553 | - done | |
4554 | -IFS=$as_save_IFS | |
4555 | - if test -z "$ac_cv_path_EGREP"; then | |
4556 | - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
3826 | +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
3827 | +$as_echo "$ac_try_echo"; } >&5 | |
3828 | + (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
3829 | + ac_status=$? | |
3830 | + if test -s conftest.err; then | |
3831 | + sed '10a\ | |
3832 | +... rest of stderr output deleted ... | |
3833 | + 10q' conftest.err >conftest.er1 | |
3834 | + cat conftest.er1 >&5 | |
4557 | 3835 | fi |
4558 | -else | |
4559 | - ac_cv_path_EGREP=$EGREP | |
4560 | -fi | |
4561 | - | |
4562 | - fi | |
4563 | -fi | |
4564 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
4565 | -$as_echo "$ac_cv_path_EGREP" >&6; } | |
4566 | - EGREP="$ac_cv_path_EGREP" | |
4567 | - | |
3836 | + rm -f conftest.er1 conftest.err | |
3837 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
3838 | + test $ac_status = 0; } | |
3839 | +done | |
4568 | 3840 | |
4569 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4570 | -$as_echo_n "checking for ANSI C header files... " >&6; } | |
4571 | -if ${ac_cv_header_stdc+:} false; then : | |
3841 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | |
3842 | +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | |
3843 | +if ${ac_cv_c_compiler_gnu+:} false; then : | |
4572 | 3844 | $as_echo_n "(cached) " >&6 |
4573 | 3845 | else |
4574 | 3846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4575 | 3847 | /* end confdefs.h. */ |
4576 | -#include <stdlib.h> | |
4577 | -#include <stdarg.h> | |
4578 | -#include <string.h> | |
4579 | -#include <float.h> | |
4580 | 3848 | |
4581 | 3849 | int |
4582 | 3850 | main () |
4583 | 3851 | { |
3852 | +#ifndef __GNUC__ | |
3853 | + choke me | |
3854 | +#endif | |
4584 | 3855 | |
4585 | 3856 | ; |
4586 | 3857 | return 0; |
4587 | 3858 | } |
4588 | 3859 | _ACEOF |
4589 | 3860 | if ac_fn_c_try_compile "$LINENO"; then : |
4590 | - ac_cv_header_stdc=yes | |
3861 | + ac_compiler_gnu=yes | |
4591 | 3862 | else |
4592 | - ac_cv_header_stdc=no | |
3863 | + ac_compiler_gnu=no | |
4593 | 3864 | fi |
4594 | 3865 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
3866 | +ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
4595 | 3867 | |
4596 | -if test $ac_cv_header_stdc = yes; then | |
4597 | - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4598 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4599 | -/* end confdefs.h. */ | |
4600 | -#include <string.h> | |
4601 | - | |
4602 | -_ACEOF | |
4603 | -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4604 | - $EGREP "memchr" >/dev/null 2>&1; then : | |
4605 | - | |
4606 | -else | |
4607 | - ac_cv_header_stdc=no | |
4608 | 3868 | fi |
4609 | -rm -f conftest* | |
4610 | - | |
3869 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
3870 | +$as_echo "$ac_cv_c_compiler_gnu" >&6; } | |
3871 | +if test $ac_compiler_gnu = yes; then | |
3872 | + GCC=yes | |
3873 | +else | |
3874 | + GCC= | |
4611 | 3875 | fi |
4612 | - | |
4613 | -if test $ac_cv_header_stdc = yes; then | |
4614 | - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4615 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3876 | +ac_test_CFLAGS=${CFLAGS+set} | |
3877 | +ac_save_CFLAGS=$CFLAGS | |
3878 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
3879 | +$as_echo_n "checking whether $CC accepts -g... " >&6; } | |
3880 | +if ${ac_cv_prog_cc_g+:} false; then : | |
3881 | + $as_echo_n "(cached) " >&6 | |
3882 | +else | |
3883 | + ac_save_c_werror_flag=$ac_c_werror_flag | |
3884 | + ac_c_werror_flag=yes | |
3885 | + ac_cv_prog_cc_g=no | |
3886 | + CFLAGS="-g" | |
3887 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4616 | 3888 | /* end confdefs.h. */ |
4617 | -#include <stdlib.h> | |
4618 | 3889 | |
4619 | -_ACEOF | |
4620 | -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4621 | - $EGREP "free" >/dev/null 2>&1; then : | |
3890 | +int | |
3891 | +main () | |
3892 | +{ | |
4622 | 3893 | |
3894 | + ; | |
3895 | + return 0; | |
3896 | +} | |
3897 | +_ACEOF | |
3898 | +if ac_fn_c_try_compile "$LINENO"; then : | |
3899 | + ac_cv_prog_cc_g=yes | |
4623 | 3900 | else |
4624 | - ac_cv_header_stdc=no | |
4625 | -fi | |
4626 | -rm -f conftest* | |
3901 | + CFLAGS="" | |
3902 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3903 | +/* end confdefs.h. */ | |
4627 | 3904 | |
4628 | -fi | |
3905 | +int | |
3906 | +main () | |
3907 | +{ | |
3908 | + | |
3909 | + ; | |
3910 | + return 0; | |
3911 | +} | |
3912 | +_ACEOF | |
3913 | +if ac_fn_c_try_compile "$LINENO"; then : | |
4629 | 3914 | |
4630 | -if test $ac_cv_header_stdc = yes; then | |
4631 | - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4632 | - if test "$cross_compiling" = yes; then : | |
4633 | - : | |
4634 | 3915 | else |
4635 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3916 | + ac_c_werror_flag=$ac_save_c_werror_flag | |
3917 | + CFLAGS="-g" | |
3918 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4636 | 3919 | /* end confdefs.h. */ |
4637 | -#include <ctype.h> | |
4638 | -#include <stdlib.h> | |
4639 | -#if ((' ' & 0x0FF) == 0x020) | |
4640 | -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4641 | -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4642 | -#else | |
4643 | -# define ISLOWER(c) \ | |
4644 | - (('a' <= (c) && (c) <= 'i') \ | |
4645 | - || ('j' <= (c) && (c) <= 'r') \ | |
4646 | - || ('s' <= (c) && (c) <= 'z')) | |
4647 | -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
4648 | -#endif | |
4649 | 3920 | |
4650 | -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4651 | 3921 | int |
4652 | 3922 | main () |
4653 | 3923 | { |
4654 | - int i; | |
4655 | - for (i = 0; i < 256; i++) | |
4656 | - if (XOR (islower (i), ISLOWER (i)) | |
4657 | - || toupper (i) != TOUPPER (i)) | |
4658 | - return 2; | |
3924 | + | |
3925 | + ; | |
4659 | 3926 | return 0; |
4660 | 3927 | } |
4661 | 3928 | _ACEOF |
4662 | -if ac_fn_c_try_run "$LINENO"; then : | |
4663 | - | |
4664 | -else | |
4665 | - ac_cv_header_stdc=no | |
4666 | -fi | |
4667 | -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4668 | - conftest.$ac_objext conftest.beam conftest.$ac_ext | |
4669 | -fi | |
4670 | - | |
3929 | +if ac_fn_c_try_compile "$LINENO"; then : | |
3930 | + ac_cv_prog_cc_g=yes | |
4671 | 3931 | fi |
3932 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4672 | 3933 | fi |
4673 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4674 | -$as_echo "$ac_cv_header_stdc" >&6; } | |
4675 | -if test $ac_cv_header_stdc = yes; then | |
4676 | - | |
4677 | -$as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4678 | - | |
3934 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4679 | 3935 | fi |
4680 | - | |
4681 | -# On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4682 | -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4683 | - inttypes.h stdint.h unistd.h | |
4684 | -do : | |
4685 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4686 | -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4687 | -" | |
4688 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
4689 | - cat >>confdefs.h <<_ACEOF | |
4690 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4691 | -_ACEOF | |
4692 | - | |
3936 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
3937 | + ac_c_werror_flag=$ac_save_c_werror_flag | |
4693 | 3938 | fi |
4694 | - | |
4695 | -done | |
4696 | - | |
4697 | - | |
4698 | -if test "$no_x" = yes; then | |
4699 | - # Not all programs may use this symbol, but it does not hurt to define it. | |
4700 | - | |
4701 | -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h | |
4702 | - | |
4703 | - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= | |
3939 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
3940 | +$as_echo "$ac_cv_prog_cc_g" >&6; } | |
3941 | +if test "$ac_test_CFLAGS" = set; then | |
3942 | + CFLAGS=$ac_save_CFLAGS | |
3943 | +elif test $ac_cv_prog_cc_g = yes; then | |
3944 | + if test "$GCC" = yes; then | |
3945 | + CFLAGS="-g -O2" | |
3946 | + else | |
3947 | + CFLAGS="-g" | |
3948 | + fi | |
4704 | 3949 | else |
4705 | - if test -n "$x_includes"; then | |
4706 | - X_CFLAGS="$X_CFLAGS -I$x_includes" | |
3950 | + if test "$GCC" = yes; then | |
3951 | + CFLAGS="-O2" | |
3952 | + else | |
3953 | + CFLAGS= | |
4707 | 3954 | fi |
4708 | - | |
4709 | - # It would also be nice to do this for all -L options, not just this one. | |
4710 | - if test -n "$x_libraries"; then | |
4711 | - X_LIBS="$X_LIBS -L$x_libraries" | |
4712 | - # For Solaris; some versions of Sun CC require a space after -R and | |
4713 | - # others require no space. Words are not sufficient . . . . | |
4714 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 | |
4715 | -$as_echo_n "checking whether -R must be followed by a space... " >&6; } | |
4716 | - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" | |
4717 | - ac_xsave_c_werror_flag=$ac_c_werror_flag | |
4718 | - ac_c_werror_flag=yes | |
4719 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4720 | -/* end confdefs.h. */ | |
4721 | - | |
4722 | -int | |
4723 | -main () | |
4724 | -{ | |
4725 | - | |
4726 | - ; | |
4727 | - return 0; | |
4728 | -} | |
4729 | -_ACEOF | |
4730 | -if ac_fn_c_try_link "$LINENO"; then : | |
4731 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4732 | -$as_echo "no" >&6; } | |
4733 | - X_LIBS="$X_LIBS -R$x_libraries" | |
3955 | +fi | |
3956 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | |
3957 | +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | |
3958 | +if ${ac_cv_prog_cc_c89+:} false; then : | |
3959 | + $as_echo_n "(cached) " >&6 | |
4734 | 3960 | else |
4735 | - LIBS="$ac_xsave_LIBS -R $x_libraries" | |
4736 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3961 | + ac_cv_prog_cc_c89=no | |
3962 | +ac_save_CC=$CC | |
3963 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4737 | 3964 | /* end confdefs.h. */ |
4738 | - | |
4739 | -int | |
4740 | -main () | |
3965 | +#include <stdarg.h> | |
3966 | +#include <stdio.h> | |
3967 | +struct stat; | |
3968 | +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
3969 | +struct buf { int x; }; | |
3970 | +FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
3971 | +static char *e (p, i) | |
3972 | + char **p; | |
3973 | + int i; | |
4741 | 3974 | { |
4742 | - | |
4743 | - ; | |
4744 | - return 0; | |
3975 | + return p[i]; | |
4745 | 3976 | } |
4746 | -_ACEOF | |
4747 | -if ac_fn_c_try_link "$LINENO"; then : | |
4748 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4749 | -$as_echo "yes" >&6; } | |
4750 | - X_LIBS="$X_LIBS -R $x_libraries" | |
4751 | -else | |
4752 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 | |
4753 | -$as_echo "neither works" >&6; } | |
4754 | -fi | |
4755 | -rm -f core conftest.err conftest.$ac_objext \ | |
4756 | - conftest$ac_exeext conftest.$ac_ext | |
4757 | -fi | |
4758 | -rm -f core conftest.err conftest.$ac_objext \ | |
4759 | - conftest$ac_exeext conftest.$ac_ext | |
4760 | - ac_c_werror_flag=$ac_xsave_c_werror_flag | |
4761 | - LIBS=$ac_xsave_LIBS | |
4762 | - fi | |
4763 | - | |
4764 | - # Check for system-dependent libraries X programs must link with. | |
4765 | - # Do this before checking for the system-independent R6 libraries | |
4766 | - # (-lICE), since we may need -lsocket or whatever for X linking. | |
4767 | - | |
4768 | - if test "$ISC" = yes; then | |
4769 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" | |
4770 | - else | |
4771 | - # Martyn Johnson says this is needed for Ultrix, if the X | |
4772 | - # libraries were built with DECnet support. And Karl Berry says | |
4773 | - # the Alpha needs dnet_stub (dnet does not exist). | |
4774 | - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" | |
4775 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4776 | -/* end confdefs.h. */ | |
4777 | - | |
4778 | -/* Override any GCC internal prototype to avoid an error. | |
4779 | - Use char because int might match the return type of a GCC | |
4780 | - builtin and then its argument prototype would still apply. */ | |
4781 | -#ifdef __cplusplus | |
4782 | -extern "C" | |
4783 | -#endif | |
4784 | -char XOpenDisplay (); | |
4785 | -int | |
4786 | -main () | |
3977 | +static char *f (char * (*g) (char **, int), char **p, ...) | |
4787 | 3978 | { |
4788 | -return XOpenDisplay (); | |
4789 | - ; | |
4790 | - return 0; | |
3979 | + char *s; | |
3980 | + va_list v; | |
3981 | + va_start (v,p); | |
3982 | + s = g (p, va_arg (v,int)); | |
3983 | + va_end (v); | |
3984 | + return s; | |
4791 | 3985 | } |
4792 | -_ACEOF | |
4793 | -if ac_fn_c_try_link "$LINENO"; then : | |
4794 | 3986 | |
4795 | -else | |
4796 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 | |
4797 | -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } | |
4798 | -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : | |
4799 | - $as_echo_n "(cached) " >&6 | |
4800 | -else | |
4801 | - ac_check_lib_save_LIBS=$LIBS | |
4802 | -LIBS="-ldnet $LIBS" | |
4803 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4804 | -/* end confdefs.h. */ | |
3987 | +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
3988 | + function prototypes and stuff, but not '\xHH' hex character constants. | |
3989 | + These don't provoke an error unfortunately, instead are silently treated | |
3990 | + as 'x'. The following induces an error, until -std is added to get | |
3991 | + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
3992 | + array size at least. It's necessary to write '\x00'==0 to get something | |
3993 | + that's true only with -std. */ | |
3994 | +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
4805 | 3995 | |
4806 | -/* Override any GCC internal prototype to avoid an error. | |
4807 | - Use char because int might match the return type of a GCC | |
4808 | - builtin and then its argument prototype would still apply. */ | |
4809 | -#ifdef __cplusplus | |
4810 | -extern "C" | |
4811 | -#endif | |
4812 | -char dnet_ntoa (); | |
3996 | +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
3997 | + inside strings and character constants. */ | |
3998 | +#define FOO(x) 'x' | |
3999 | +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | |
4000 | + | |
4001 | +int test (int i, double x); | |
4002 | +struct s1 {int (*f) (int a);}; | |
4003 | +struct s2 {int (*f) (double a);}; | |
4004 | +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
4005 | +int argc; | |
4006 | +char **argv; | |
4813 | 4007 | int |
4814 | 4008 | main () |
4815 | 4009 | { |
4816 | -return dnet_ntoa (); | |
4010 | +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
4817 | 4011 | ; |
4818 | 4012 | return 0; |
4819 | 4013 | } |
4820 | 4014 | _ACEOF |
4821 | -if ac_fn_c_try_link "$LINENO"; then : | |
4822 | - ac_cv_lib_dnet_dnet_ntoa=yes | |
4823 | -else | |
4824 | - ac_cv_lib_dnet_dnet_ntoa=no | |
4015 | +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | |
4016 | + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
4017 | +do | |
4018 | + CC="$ac_save_CC $ac_arg" | |
4019 | + if ac_fn_c_try_compile "$LINENO"; then : | |
4020 | + ac_cv_prog_cc_c89=$ac_arg | |
4825 | 4021 | fi |
4826 | -rm -f core conftest.err conftest.$ac_objext \ | |
4827 | - conftest$ac_exeext conftest.$ac_ext | |
4828 | -LIBS=$ac_check_lib_save_LIBS | |
4022 | +rm -f core conftest.err conftest.$ac_objext | |
4023 | + test "x$ac_cv_prog_cc_c89" != "xno" && break | |
4024 | +done | |
4025 | +rm -f conftest.$ac_ext | |
4026 | +CC=$ac_save_CC | |
4027 | + | |
4829 | 4028 | fi |
4830 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 | |
4831 | -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } | |
4832 | -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : | |
4833 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" | |
4029 | +# AC_CACHE_VAL | |
4030 | +case "x$ac_cv_prog_cc_c89" in | |
4031 | + x) | |
4032 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
4033 | +$as_echo "none needed" >&6; } ;; | |
4034 | + xno) | |
4035 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
4036 | +$as_echo "unsupported" >&6; } ;; | |
4037 | + *) | |
4038 | + CC="$CC $ac_cv_prog_cc_c89" | |
4039 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
4040 | +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | |
4041 | +esac | |
4042 | +if test "x$ac_cv_prog_cc_c89" != xno; then : | |
4043 | + | |
4834 | 4044 | fi |
4835 | 4045 | |
4836 | - if test $ac_cv_lib_dnet_dnet_ntoa = no; then | |
4837 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 | |
4838 | -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } | |
4839 | -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : | |
4046 | +ac_ext=c | |
4047 | +ac_cpp='$CPP $CPPFLAGS' | |
4048 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4049 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4050 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4051 | + | |
4052 | +ac_ext=c | |
4053 | +ac_cpp='$CPP $CPPFLAGS' | |
4054 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4055 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4056 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4057 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 | |
4058 | +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } | |
4059 | +if ${am_cv_prog_cc_c_o+:} false; then : | |
4840 | 4060 | $as_echo_n "(cached) " >&6 |
4841 | 4061 | else |
4842 | - ac_check_lib_save_LIBS=$LIBS | |
4843 | -LIBS="-ldnet_stub $LIBS" | |
4844 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4062 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4845 | 4063 | /* end confdefs.h. */ |
4846 | 4064 | |
4847 | -/* Override any GCC internal prototype to avoid an error. | |
4848 | - Use char because int might match the return type of a GCC | |
4849 | - builtin and then its argument prototype would still apply. */ | |
4850 | -#ifdef __cplusplus | |
4851 | -extern "C" | |
4852 | -#endif | |
4853 | -char dnet_ntoa (); | |
4854 | 4065 | int |
4855 | 4066 | main () |
4856 | 4067 | { |
4857 | -return dnet_ntoa (); | |
4068 | + | |
4858 | 4069 | ; |
4859 | 4070 | return 0; |
4860 | 4071 | } |
4861 | 4072 | _ACEOF |
4862 | -if ac_fn_c_try_link "$LINENO"; then : | |
4863 | - ac_cv_lib_dnet_stub_dnet_ntoa=yes | |
4864 | -else | |
4865 | - ac_cv_lib_dnet_stub_dnet_ntoa=no | |
4866 | -fi | |
4867 | -rm -f core conftest.err conftest.$ac_objext \ | |
4868 | - conftest$ac_exeext conftest.$ac_ext | |
4869 | -LIBS=$ac_check_lib_save_LIBS | |
4870 | -fi | |
4871 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 | |
4872 | -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } | |
4873 | -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : | |
4874 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" | |
4875 | -fi | |
4876 | - | |
4073 | + # Make sure it works both with $CC and with simple cc. | |
4074 | + # Following AC_PROG_CC_C_O, we do the test twice because some | |
4075 | + # compilers refuse to overwrite an existing .o file with -o, | |
4076 | + # though they will create one. | |
4077 | + am_cv_prog_cc_c_o=yes | |
4078 | + for am_i in 1 2; do | |
4079 | + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 | |
4080 | + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 | |
4081 | + ac_status=$? | |
4082 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4083 | + (exit $ac_status); } \ | |
4084 | + && test -f conftest2.$ac_objext; then | |
4085 | + : OK | |
4086 | + else | |
4087 | + am_cv_prog_cc_c_o=no | |
4088 | + break | |
4877 | 4089 | fi |
4090 | + done | |
4091 | + rm -f core conftest* | |
4092 | + unset am_i | |
4878 | 4093 | fi |
4879 | -rm -f core conftest.err conftest.$ac_objext \ | |
4880 | - conftest$ac_exeext conftest.$ac_ext | |
4881 | - LIBS="$ac_xsave_LIBS" | |
4094 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 | |
4095 | +$as_echo "$am_cv_prog_cc_c_o" >&6; } | |
4096 | +if test "$am_cv_prog_cc_c_o" != yes; then | |
4097 | + # Losing compiler, so override with the script. | |
4098 | + # FIXME: It is wrong to rewrite CC. | |
4099 | + # But if we don't then we get into trouble of one sort or another. | |
4100 | + # A longer-term fix would be to have automake use am__CC in this case, | |
4101 | + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
4102 | + CC="$am_aux_dir/compile $CC" | |
4103 | +fi | |
4104 | +ac_ext=c | |
4105 | +ac_cpp='$CPP $CPPFLAGS' | |
4106 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4107 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4108 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4882 | 4109 | |
4883 | - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, | |
4884 | - # to get the SysV transport functions. | |
4885 | - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) | |
4886 | - # needs -lnsl. | |
4887 | - # The nsl library prevents programs from opening the X display | |
4888 | - # on Irix 5.2, according to T.E. Dickey. | |
4889 | - # The functions gethostbyname, getservbyname, and inet_addr are | |
4890 | - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. | |
4891 | - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" | |
4892 | -if test "x$ac_cv_func_gethostbyname" = xyes; then : | |
4893 | 4110 | |
4894 | -fi | |
4111 | +depcc="$CC" am_compiler_list= | |
4895 | 4112 | |
4896 | - if test $ac_cv_func_gethostbyname = no; then | |
4897 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 | |
4898 | -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } | |
4899 | -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : | |
4113 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
4114 | +$as_echo_n "checking dependency style of $depcc... " >&6; } | |
4115 | +if ${am_cv_CC_dependencies_compiler_type+:} false; then : | |
4900 | 4116 | $as_echo_n "(cached) " >&6 |
4901 | 4117 | else |
4902 | - ac_check_lib_save_LIBS=$LIBS | |
4903 | -LIBS="-lnsl $LIBS" | |
4904 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4905 | -/* end confdefs.h. */ | |
4906 | - | |
4907 | -/* Override any GCC internal prototype to avoid an error. | |
4908 | - Use char because int might match the return type of a GCC | |
4909 | - builtin and then its argument prototype would still apply. */ | |
4910 | -#ifdef __cplusplus | |
4911 | -extern "C" | |
4912 | -#endif | |
4913 | -char gethostbyname (); | |
4914 | -int | |
4915 | -main () | |
4916 | -{ | |
4917 | -return gethostbyname (); | |
4918 | - ; | |
4919 | - return 0; | |
4920 | -} | |
4921 | -_ACEOF | |
4922 | -if ac_fn_c_try_link "$LINENO"; then : | |
4923 | - ac_cv_lib_nsl_gethostbyname=yes | |
4924 | -else | |
4925 | - ac_cv_lib_nsl_gethostbyname=no | |
4926 | -fi | |
4927 | -rm -f core conftest.err conftest.$ac_objext \ | |
4928 | - conftest$ac_exeext conftest.$ac_ext | |
4929 | -LIBS=$ac_check_lib_save_LIBS | |
4930 | -fi | |
4931 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 | |
4932 | -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } | |
4933 | -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : | |
4934 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" | |
4935 | -fi | |
4118 | + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
4119 | + # We make a subdir and do the tests there. Otherwise we can end up | |
4120 | + # making bogus files that we don't know about and never remove. For | |
4121 | + # instance it was reported that on HP-UX the gcc test will end up | |
4122 | + # making a dummy file named 'D' -- because '-MD' means "put the output | |
4123 | + # in D". | |
4124 | + rm -rf conftest.dir | |
4125 | + mkdir conftest.dir | |
4126 | + # Copy depcomp to subdir because otherwise we won't find it if we're | |
4127 | + # using a relative directory. | |
4128 | + cp "$am_depcomp" conftest.dir | |
4129 | + cd conftest.dir | |
4130 | + # We will build objects and dependencies in a subdirectory because | |
4131 | + # it helps to detect inapplicable dependency modes. For instance | |
4132 | + # both Tru64's cc and ICC support -MD to output dependencies as a | |
4133 | + # side effect of compilation, but ICC will put the dependencies in | |
4134 | + # the current directory while Tru64 will put them in the object | |
4135 | + # directory. | |
4136 | + mkdir sub | |
4936 | 4137 | |
4937 | - if test $ac_cv_lib_nsl_gethostbyname = no; then | |
4938 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 | |
4939 | -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } | |
4940 | -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : | |
4941 | - $as_echo_n "(cached) " >&6 | |
4942 | -else | |
4943 | - ac_check_lib_save_LIBS=$LIBS | |
4944 | -LIBS="-lbsd $LIBS" | |
4945 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4946 | -/* end confdefs.h. */ | |
4138 | + am_cv_CC_dependencies_compiler_type=none | |
4139 | + if test "$am_compiler_list" = ""; then | |
4140 | + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
4141 | + fi | |
4142 | + am__universal=false | |
4143 | + case " $depcc " in #( | |
4144 | + *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
4145 | + esac | |
4947 | 4146 | |
4948 | -/* Override any GCC internal prototype to avoid an error. | |
4949 | - Use char because int might match the return type of a GCC | |
4950 | - builtin and then its argument prototype would still apply. */ | |
4951 | -#ifdef __cplusplus | |
4952 | -extern "C" | |
4953 | -#endif | |
4954 | -char gethostbyname (); | |
4955 | -int | |
4956 | -main () | |
4957 | -{ | |
4958 | -return gethostbyname (); | |
4959 | - ; | |
4960 | - return 0; | |
4961 | -} | |
4962 | -_ACEOF | |
4963 | -if ac_fn_c_try_link "$LINENO"; then : | |
4964 | - ac_cv_lib_bsd_gethostbyname=yes | |
4965 | -else | |
4966 | - ac_cv_lib_bsd_gethostbyname=no | |
4967 | -fi | |
4968 | -rm -f core conftest.err conftest.$ac_objext \ | |
4969 | - conftest$ac_exeext conftest.$ac_ext | |
4970 | -LIBS=$ac_check_lib_save_LIBS | |
4971 | -fi | |
4972 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 | |
4973 | -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } | |
4974 | -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : | |
4975 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" | |
4976 | -fi | |
4147 | + for depmode in $am_compiler_list; do | |
4148 | + # Setup a source with many dependencies, because some compilers | |
4149 | + # like to wrap large dependency lists on column 80 (with \), and | |
4150 | + # we should not choose a depcomp mode which is confused by this. | |
4151 | + # | |
4152 | + # We need to recreate these files for each test, as the compiler may | |
4153 | + # overwrite some of them when testing with obscure command lines. | |
4154 | + # This happens at least with the AIX C compiler. | |
4155 | + : > sub/conftest.c | |
4156 | + for i in 1 2 3 4 5 6; do | |
4157 | + echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
4158 | + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
4159 | + # Solaris 10 /bin/sh. | |
4160 | + echo '/* dummy */' > sub/conftst$i.h | |
4161 | + done | |
4162 | + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
4977 | 4163 | |
4164 | + # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
4165 | + # mode. It turns out that the SunPro C++ compiler does not properly | |
4166 | + # handle '-M -o', and we need to detect this. Also, some Intel | |
4167 | + # versions had trouble with output in subdirs. | |
4168 | + am__obj=sub/conftest.${OBJEXT-o} | |
4169 | + am__minus_obj="-o $am__obj" | |
4170 | + case $depmode in | |
4171 | + gcc) | |
4172 | + # This depmode causes a compiler race in universal mode. | |
4173 | + test "$am__universal" = false || continue | |
4174 | + ;; | |
4175 | + nosideeffect) | |
4176 | + # After this tag, mechanisms are not by side-effect, so they'll | |
4177 | + # only be used when explicitly requested. | |
4178 | + if test "x$enable_dependency_tracking" = xyes; then | |
4179 | + continue | |
4180 | + else | |
4181 | + break | |
4182 | + fi | |
4183 | + ;; | |
4184 | + msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
4185 | + # This compiler won't grok '-c -o', but also, the minuso test has | |
4186 | + # not run yet. These depmodes are late enough in the game, and | |
4187 | + # so weak that their functioning should not be impacted. | |
4188 | + am__obj=conftest.${OBJEXT-o} | |
4189 | + am__minus_obj= | |
4190 | + ;; | |
4191 | + none) break ;; | |
4192 | + esac | |
4193 | + if depmode=$depmode \ | |
4194 | + source=sub/conftest.c object=$am__obj \ | |
4195 | + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
4196 | + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
4197 | + >/dev/null 2>conftest.err && | |
4198 | + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
4199 | + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
4200 | + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
4201 | + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
4202 | + # icc doesn't choke on unknown options, it will just issue warnings | |
4203 | + # or remarks (even with -Werror). So we grep stderr for any message | |
4204 | + # that says an option was ignored or not supported. | |
4205 | + # When given -MP, icc 7.0 and 7.1 complain thusly: | |
4206 | + # icc: Command line warning: ignoring option '-M'; no argument required | |
4207 | + # The diagnosis changed in icc 8.0: | |
4208 | + # icc: Command line remark: option '-MP' not supported | |
4209 | + if (grep 'ignoring option' conftest.err || | |
4210 | + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
4211 | + am_cv_CC_dependencies_compiler_type=$depmode | |
4212 | + break | |
4978 | 4213 | fi |
4979 | 4214 | fi |
4980 | - | |
4981 | - # lieder@skyler.mavd.honeywell.com says without -lsocket, | |
4982 | - # socket/setsockopt and other routines are undefined under SCO ODT | |
4983 | - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary | |
4984 | - # on later versions), says Simon Leinen: it contains gethostby* | |
4985 | - # variants that don't use the name server (or something). -lsocket | |
4986 | - # must be given before -lnsl if both are needed. We assume that | |
4987 | - # if connect needs -lnsl, so does gethostbyname. | |
4988 | - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" | |
4989 | -if test "x$ac_cv_func_connect" = xyes; then : | |
4990 | - | |
4991 | -fi | |
4992 | - | |
4993 | - if test $ac_cv_func_connect = no; then | |
4994 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 | |
4995 | -$as_echo_n "checking for connect in -lsocket... " >&6; } | |
4996 | -if ${ac_cv_lib_socket_connect+:} false; then : | |
4997 | - $as_echo_n "(cached) " >&6 | |
4998 | -else | |
4999 | - ac_check_lib_save_LIBS=$LIBS | |
5000 | -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" | |
5001 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5002 | -/* end confdefs.h. */ | |
5003 | - | |
5004 | -/* Override any GCC internal prototype to avoid an error. | |
5005 | - Use char because int might match the return type of a GCC | |
5006 | - builtin and then its argument prototype would still apply. */ | |
5007 | -#ifdef __cplusplus | |
5008 | -extern "C" | |
5009 | -#endif | |
5010 | -char connect (); | |
5011 | -int | |
5012 | -main () | |
5013 | -{ | |
5014 | -return connect (); | |
5015 | - ; | |
5016 | - return 0; | |
5017 | -} | |
5018 | -_ACEOF | |
5019 | -if ac_fn_c_try_link "$LINENO"; then : | |
5020 | - ac_cv_lib_socket_connect=yes | |
5021 | -else | |
5022 | - ac_cv_lib_socket_connect=no | |
5023 | -fi | |
5024 | -rm -f core conftest.err conftest.$ac_objext \ | |
5025 | - conftest$ac_exeext conftest.$ac_ext | |
5026 | -LIBS=$ac_check_lib_save_LIBS | |
5027 | -fi | |
5028 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 | |
5029 | -$as_echo "$ac_cv_lib_socket_connect" >&6; } | |
5030 | -if test "x$ac_cv_lib_socket_connect" = xyes; then : | |
5031 | - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" | |
5032 | -fi | |
5033 | - | |
5034 | - fi | |
5035 | - | |
5036 | - # Guillermo Gomez says -lposix is necessary on A/UX. | |
5037 | - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" | |
5038 | -if test "x$ac_cv_func_remove" = xyes; then : | |
5039 | - | |
5040 | -fi | |
5041 | - | |
5042 | - if test $ac_cv_func_remove = no; then | |
5043 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 | |
5044 | -$as_echo_n "checking for remove in -lposix... " >&6; } | |
5045 | -if ${ac_cv_lib_posix_remove+:} false; then : | |
5046 | - $as_echo_n "(cached) " >&6 | |
5047 | -else | |
5048 | - ac_check_lib_save_LIBS=$LIBS | |
5049 | -LIBS="-lposix $LIBS" | |
5050 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5051 | -/* end confdefs.h. */ | |
5052 | - | |
5053 | -/* Override any GCC internal prototype to avoid an error. | |
5054 | - Use char because int might match the return type of a GCC | |
5055 | - builtin and then its argument prototype would still apply. */ | |
5056 | -#ifdef __cplusplus | |
5057 | -extern "C" | |
5058 | -#endif | |
5059 | -char remove (); | |
5060 | -int | |
5061 | -main () | |
5062 | -{ | |
5063 | -return remove (); | |
5064 | - ; | |
5065 | - return 0; | |
5066 | -} | |
5067 | -_ACEOF | |
5068 | -if ac_fn_c_try_link "$LINENO"; then : | |
5069 | - ac_cv_lib_posix_remove=yes | |
5070 | -else | |
5071 | - ac_cv_lib_posix_remove=no | |
5072 | -fi | |
5073 | -rm -f core conftest.err conftest.$ac_objext \ | |
5074 | - conftest$ac_exeext conftest.$ac_ext | |
5075 | -LIBS=$ac_check_lib_save_LIBS | |
5076 | -fi | |
5077 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 | |
5078 | -$as_echo "$ac_cv_lib_posix_remove" >&6; } | |
5079 | -if test "x$ac_cv_lib_posix_remove" = xyes; then : | |
5080 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" | |
5081 | -fi | |
5082 | - | |
5083 | - fi | |
5084 | - | |
5085 | - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. | |
5086 | - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" | |
5087 | -if test "x$ac_cv_func_shmat" = xyes; then : | |
5088 | - | |
5089 | -fi | |
5090 | - | |
5091 | - if test $ac_cv_func_shmat = no; then | |
5092 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 | |
5093 | -$as_echo_n "checking for shmat in -lipc... " >&6; } | |
5094 | -if ${ac_cv_lib_ipc_shmat+:} false; then : | |
5095 | - $as_echo_n "(cached) " >&6 | |
5096 | -else | |
5097 | - ac_check_lib_save_LIBS=$LIBS | |
5098 | -LIBS="-lipc $LIBS" | |
5099 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5100 | -/* end confdefs.h. */ | |
5101 | - | |
5102 | -/* Override any GCC internal prototype to avoid an error. | |
5103 | - Use char because int might match the return type of a GCC | |
5104 | - builtin and then its argument prototype would still apply. */ | |
5105 | -#ifdef __cplusplus | |
5106 | -extern "C" | |
5107 | -#endif | |
5108 | -char shmat (); | |
5109 | -int | |
5110 | -main () | |
5111 | -{ | |
5112 | -return shmat (); | |
5113 | - ; | |
5114 | - return 0; | |
5115 | -} | |
5116 | -_ACEOF | |
5117 | -if ac_fn_c_try_link "$LINENO"; then : | |
5118 | - ac_cv_lib_ipc_shmat=yes | |
5119 | -else | |
5120 | - ac_cv_lib_ipc_shmat=no | |
5121 | -fi | |
5122 | -rm -f core conftest.err conftest.$ac_objext \ | |
5123 | - conftest$ac_exeext conftest.$ac_ext | |
5124 | -LIBS=$ac_check_lib_save_LIBS | |
5125 | -fi | |
5126 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 | |
5127 | -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } | |
5128 | -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : | |
5129 | - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" | |
5130 | -fi | |
5131 | - | |
5132 | - fi | |
5133 | - fi | |
5134 | - | |
5135 | - # Check for libraries that X11R6 Xt/Xaw programs need. | |
5136 | - ac_save_LDFLAGS=$LDFLAGS | |
5137 | - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" | |
5138 | - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to | |
5139 | - # check for ICE first), but we must link in the order -lSM -lICE or | |
5140 | - # we get undefined symbols. So assume we have SM if we have ICE. | |
5141 | - # These have to be linked with before -lX11, unlike the other | |
5142 | - # libraries we check for below, so use a different variable. | |
5143 | - # John Interrante, Karl Berry | |
5144 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 | |
5145 | -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } | |
5146 | -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : | |
5147 | - $as_echo_n "(cached) " >&6 | |
5148 | -else | |
5149 | - ac_check_lib_save_LIBS=$LIBS | |
5150 | -LIBS="-lICE $X_EXTRA_LIBS $LIBS" | |
5151 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5152 | -/* end confdefs.h. */ | |
5153 | - | |
5154 | -/* Override any GCC internal prototype to avoid an error. | |
5155 | - Use char because int might match the return type of a GCC | |
5156 | - builtin and then its argument prototype would still apply. */ | |
5157 | -#ifdef __cplusplus | |
5158 | -extern "C" | |
5159 | -#endif | |
5160 | -char IceConnectionNumber (); | |
5161 | -int | |
5162 | -main () | |
5163 | -{ | |
5164 | -return IceConnectionNumber (); | |
5165 | - ; | |
5166 | - return 0; | |
5167 | -} | |
5168 | -_ACEOF | |
5169 | -if ac_fn_c_try_link "$LINENO"; then : | |
5170 | - ac_cv_lib_ICE_IceConnectionNumber=yes | |
5171 | -else | |
5172 | - ac_cv_lib_ICE_IceConnectionNumber=no | |
5173 | -fi | |
5174 | -rm -f core conftest.err conftest.$ac_objext \ | |
5175 | - conftest$ac_exeext conftest.$ac_ext | |
5176 | -LIBS=$ac_check_lib_save_LIBS | |
5177 | -fi | |
5178 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 | |
5179 | -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } | |
5180 | -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : | |
5181 | - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" | |
5182 | -fi | |
5183 | - | |
5184 | - LDFLAGS=$ac_save_LDFLAGS | |
5185 | - | |
5186 | -fi | |
5187 | - | |
5188 | - | |
5189 | - | |
5190 | - | |
5191 | -# Check whether --with-gl was given. | |
5192 | -if test "${with_gl+set}" = set; then : | |
5193 | - withval=$with_gl; | |
5194 | - case "$withval" in #( | |
5195 | - "no"|"NO") : | |
5196 | - ax_check_gl_want_gl="no" ;; #( | |
5197 | - "yes"|"YES") : | |
5198 | - ax_check_gl_want_gl="yes" ;; #( | |
5199 | - *) : | |
5200 | - ax_check_gl_want_gl="$withval" ;; | |
5201 | -esac | |
5202 | - | |
5203 | -else | |
5204 | - ax_check_gl_want_gl="yes" | |
5205 | -fi | |
5206 | - | |
5207 | - | |
5208 | - | |
5209 | -# Check whether --with-Mesa was given. | |
5210 | -if test "${with_Mesa+set}" = set; then : | |
5211 | - withval=$with_Mesa; | |
5212 | - case "$withval" in #( | |
5213 | - "no"|"NO") : | |
5214 | - ax_check_gl_want_mesa="no" ;; #( | |
5215 | - "yes"|"YES") : | |
5216 | - ax_check_gl_want_mesa="yes" ;; #( | |
5217 | - *) : | |
5218 | - as_fn_error $? "--with-mesa flag is only yes no" "$LINENO" 5 ;; | |
5219 | -esac | |
5220 | - | |
5221 | -else | |
5222 | - ax_check_gl_want_mesa="default" | |
5223 | -fi | |
5224 | - | |
5225 | - | |
5226 | - # check consistency of parameters | |
5227 | - if test "X$have_x" = "Xdisabled"; then : | |
5228 | - if test X$ax_check_gl_want_gl = "Xx"; then : | |
5229 | - as_fn_error $? "You prefer OpenGL with X and asked for no X support" "$LINENO" 5 | |
5230 | -fi | |
5231 | -fi | |
5232 | - | |
5233 | - if test "X$have_x" = "Xdisabled"; then : | |
5234 | - if test X$x_check_gl_want_mesa = "Xyes"; then : | |
5235 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You prefer mesa but you disable X. Disable mesa because mesa need X" >&5 | |
5236 | -$as_echo "$as_me: WARNING: You prefer mesa but you disable X. Disable mesa because mesa need X" >&2;} | |
5237 | - ax_check_gl_want_mesa="no" | |
5238 | -fi | |
5239 | -fi | |
5240 | - | |
5241 | - # mesa default means yes except on mingw | |
5242 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking wether we should prefer mesa for opengl implementation" >&5 | |
5243 | -$as_echo_n "checking wether we should prefer mesa for opengl implementation... " >&6; } | |
5244 | - if test X$ax_check_gl_want_mesa = "Xdefault"; then : | |
5245 | - case ${host} in #( | |
5246 | - *-mingw*) : | |
5247 | - ax_check_gl_want_mesa=no ;; #( | |
5248 | - *) : | |
5249 | - ax_check_gl_want_mesa=yes ;; | |
5250 | -esac | |
5251 | -fi | |
5252 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_gl_want_mesa" >&5 | |
5253 | -$as_echo "$ax_check_gl_want_mesa" >&6; } | |
5254 | - | |
5255 | - # set default guess order | |
5256 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working OpenGL order detection" >&5 | |
5257 | -$as_echo_n "checking for a working OpenGL order detection... " >&6; } | |
5258 | - if test "X$no_x" = "Xyes"; then : | |
5259 | - ax_check_gl_order="gl" | |
5260 | -else | |
5261 | - if test X$ax_check_gl_want_mesa = "Xyes"; then : | |
5262 | - ax_check_gl_order="mesagl gl" | |
5263 | -else | |
5264 | - ax_check_gl_order="gl mesagl" | |
5265 | -fi | |
5266 | -fi | |
5267 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_gl_order" >&5 | |
5268 | -$as_echo "$ax_check_gl_order" >&6; } | |
5269 | - | |
5270 | - # set flags | |
5271 | - no_gl="yes" | |
5272 | - have_GL="no" | |
5273 | - | |
5274 | - # now do the real testing | |
5275 | - if test X$ax_check_gl_want_gl != "Xno"; then : | |
5276 | - | |
5277 | - | |
5278 | - # does we need X or not | |
5279 | - # do not check if empty : allow a subroutine to modify the choice | |
5280 | - if test "X$ax_check_gl_need_x" = "X"; then : | |
5281 | - ax_check_gl_need_x="default" | |
5282 | - if test "X$no_x" = "Xyes"; then : | |
5283 | - ax_check_gl_need_x="no" | |
5284 | -fi | |
5285 | - if test "X$ax_check_gl_want_gl" = "Xnox"; then : | |
5286 | - ax_check_gl_need_x="no" | |
5287 | -fi | |
5288 | - if test "X$ax_check_gl_want_gl" = "Xx"; then : | |
5289 | - ax_check_gl_need_x="yes" | |
5290 | -fi | |
5291 | -fi | |
5292 | - | |
5293 | - | |
5294 | - # try first pkgconfig | |
5295 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working OpenGL implementation by pkg-config" >&5 | |
5296 | -$as_echo_n "checking for a working OpenGL implementation by pkg-config... " >&6; } | |
5297 | - if test "X${PKG_CONFIG}" = "X"; then : | |
5298 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5299 | -$as_echo "no" >&6; } | |
5300 | - ax_check_gl_pkg_config=no | |
5301 | -else | |
5302 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5303 | -$as_echo "yes" >&6; } | |
5304 | - | |
5305 | - | |
5306 | - case "$ax_check_gl_order" in #( | |
5307 | - "gl") : | |
5308 | - | |
5309 | -pkg_failed=no | |
5310 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5311 | -$as_echo_n "checking for GL... " >&6; } | |
5312 | - | |
5313 | -if test -n "$GL_CFLAGS"; then | |
5314 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5315 | - elif test -n "$PKG_CONFIG"; then | |
5316 | - if test -n "$PKG_CONFIG" && \ | |
5317 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5318 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5319 | - ac_status=$? | |
5320 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5321 | - test $ac_status = 0; }; then | |
5322 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "mesagl" 2>/dev/null` | |
5323 | - test "x$?" != "x0" && pkg_failed=yes | |
5324 | -else | |
5325 | - pkg_failed=yes | |
5326 | -fi | |
5327 | - else | |
5328 | - pkg_failed=untried | |
5329 | -fi | |
5330 | -if test -n "$GL_LIBS"; then | |
5331 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5332 | - elif test -n "$PKG_CONFIG"; then | |
5333 | - if test -n "$PKG_CONFIG" && \ | |
5334 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5335 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5336 | - ac_status=$? | |
5337 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5338 | - test $ac_status = 0; }; then | |
5339 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "mesagl" 2>/dev/null` | |
5340 | - test "x$?" != "x0" && pkg_failed=yes | |
5341 | -else | |
5342 | - pkg_failed=yes | |
5343 | -fi | |
5344 | - else | |
5345 | - pkg_failed=untried | |
5346 | -fi | |
5347 | - | |
5348 | - | |
5349 | - | |
5350 | -if test $pkg_failed = yes; then | |
5351 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5352 | -$as_echo "no" >&6; } | |
5353 | - | |
5354 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5355 | - _pkg_short_errors_supported=yes | |
5356 | -else | |
5357 | - _pkg_short_errors_supported=no | |
5358 | -fi | |
5359 | - if test $_pkg_short_errors_supported = yes; then | |
5360 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mesagl" 2>&1` | |
5361 | - else | |
5362 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mesagl" 2>&1` | |
5363 | - fi | |
5364 | - # Put the nasty error message in config.log where it belongs | |
5365 | - echo "$GL_PKG_ERRORS" >&5 | |
5366 | - | |
5367 | - ax_check_gl_pkg_config=no | |
5368 | -elif test $pkg_failed = untried; then | |
5369 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5370 | -$as_echo "no" >&6; } | |
5371 | - ax_check_gl_pkg_config=no | |
5372 | -else | |
5373 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5374 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5375 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5376 | -$as_echo "yes" >&6; } | |
5377 | - ax_check_gl_pkg_config=yes | |
5378 | -fi ;; #( | |
5379 | - "gl mesagl") : | |
5380 | - | |
5381 | -pkg_failed=no | |
5382 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5383 | -$as_echo_n "checking for GL... " >&6; } | |
5384 | - | |
5385 | -if test -n "$GL_CFLAGS"; then | |
5386 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5387 | - elif test -n "$PKG_CONFIG"; then | |
5388 | - if test -n "$PKG_CONFIG" && \ | |
5389 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5390 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5391 | - ac_status=$? | |
5392 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5393 | - test $ac_status = 0; }; then | |
5394 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "gl" 2>/dev/null` | |
5395 | - test "x$?" != "x0" && pkg_failed=yes | |
5396 | -else | |
5397 | - pkg_failed=yes | |
5398 | -fi | |
5399 | - else | |
5400 | - pkg_failed=untried | |
5401 | -fi | |
5402 | -if test -n "$GL_LIBS"; then | |
5403 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5404 | - elif test -n "$PKG_CONFIG"; then | |
5405 | - if test -n "$PKG_CONFIG" && \ | |
5406 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5407 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5408 | - ac_status=$? | |
5409 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5410 | - test $ac_status = 0; }; then | |
5411 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null` | |
5412 | - test "x$?" != "x0" && pkg_failed=yes | |
5413 | -else | |
5414 | - pkg_failed=yes | |
5415 | -fi | |
5416 | - else | |
5417 | - pkg_failed=untried | |
5418 | -fi | |
5419 | - | |
5420 | - | |
5421 | - | |
5422 | -if test $pkg_failed = yes; then | |
5423 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5424 | -$as_echo "no" >&6; } | |
5425 | - | |
5426 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5427 | - _pkg_short_errors_supported=yes | |
5428 | -else | |
5429 | - _pkg_short_errors_supported=no | |
5430 | -fi | |
5431 | - if test $_pkg_short_errors_supported = yes; then | |
5432 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1` | |
5433 | - else | |
5434 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1` | |
5435 | - fi | |
5436 | - # Put the nasty error message in config.log where it belongs | |
5437 | - echo "$GL_PKG_ERRORS" >&5 | |
5438 | - | |
5439 | - | |
5440 | -pkg_failed=no | |
5441 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5442 | -$as_echo_n "checking for GL... " >&6; } | |
5443 | - | |
5444 | -if test -n "$GL_CFLAGS"; then | |
5445 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5446 | - elif test -n "$PKG_CONFIG"; then | |
5447 | - if test -n "$PKG_CONFIG" && \ | |
5448 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5449 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5450 | - ac_status=$? | |
5451 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5452 | - test $ac_status = 0; }; then | |
5453 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "mesagl" 2>/dev/null` | |
5454 | - test "x$?" != "x0" && pkg_failed=yes | |
5455 | -else | |
5456 | - pkg_failed=yes | |
5457 | -fi | |
5458 | - else | |
5459 | - pkg_failed=untried | |
5460 | -fi | |
5461 | -if test -n "$GL_LIBS"; then | |
5462 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5463 | - elif test -n "$PKG_CONFIG"; then | |
5464 | - if test -n "$PKG_CONFIG" && \ | |
5465 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5466 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5467 | - ac_status=$? | |
5468 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5469 | - test $ac_status = 0; }; then | |
5470 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "mesagl" 2>/dev/null` | |
5471 | - test "x$?" != "x0" && pkg_failed=yes | |
5472 | -else | |
5473 | - pkg_failed=yes | |
5474 | -fi | |
5475 | - else | |
5476 | - pkg_failed=untried | |
5477 | -fi | |
5478 | - | |
5479 | - | |
5480 | - | |
5481 | -if test $pkg_failed = yes; then | |
5482 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5483 | -$as_echo "no" >&6; } | |
5484 | - | |
5485 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5486 | - _pkg_short_errors_supported=yes | |
5487 | -else | |
5488 | - _pkg_short_errors_supported=no | |
5489 | -fi | |
5490 | - if test $_pkg_short_errors_supported = yes; then | |
5491 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mesagl" 2>&1` | |
5492 | - else | |
5493 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mesagl" 2>&1` | |
5494 | - fi | |
5495 | - # Put the nasty error message in config.log where it belongs | |
5496 | - echo "$GL_PKG_ERRORS" >&5 | |
5497 | - | |
5498 | - ax_check_gl_pkg_config=no | |
5499 | -elif test $pkg_failed = untried; then | |
5500 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5501 | -$as_echo "no" >&6; } | |
5502 | - ax_check_gl_pkg_config=no | |
5503 | -else | |
5504 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5505 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5506 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5507 | -$as_echo "yes" >&6; } | |
5508 | - ax_check_gl_pkg_config=yes | |
5509 | -fi | |
5510 | -elif test $pkg_failed = untried; then | |
5511 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5512 | -$as_echo "no" >&6; } | |
5513 | - | |
5514 | -pkg_failed=no | |
5515 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5516 | -$as_echo_n "checking for GL... " >&6; } | |
5517 | - | |
5518 | -if test -n "$GL_CFLAGS"; then | |
5519 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5520 | - elif test -n "$PKG_CONFIG"; then | |
5521 | - if test -n "$PKG_CONFIG" && \ | |
5522 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5523 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5524 | - ac_status=$? | |
5525 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5526 | - test $ac_status = 0; }; then | |
5527 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "mesagl" 2>/dev/null` | |
5528 | - test "x$?" != "x0" && pkg_failed=yes | |
5529 | -else | |
5530 | - pkg_failed=yes | |
5531 | -fi | |
5532 | - else | |
5533 | - pkg_failed=untried | |
5534 | -fi | |
5535 | -if test -n "$GL_LIBS"; then | |
5536 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5537 | - elif test -n "$PKG_CONFIG"; then | |
5538 | - if test -n "$PKG_CONFIG" && \ | |
5539 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5540 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5541 | - ac_status=$? | |
5542 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5543 | - test $ac_status = 0; }; then | |
5544 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "mesagl" 2>/dev/null` | |
5545 | - test "x$?" != "x0" && pkg_failed=yes | |
5546 | -else | |
5547 | - pkg_failed=yes | |
5548 | -fi | |
5549 | - else | |
5550 | - pkg_failed=untried | |
5551 | -fi | |
5552 | - | |
5553 | - | |
5554 | - | |
5555 | -if test $pkg_failed = yes; then | |
5556 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5557 | -$as_echo "no" >&6; } | |
5558 | - | |
5559 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5560 | - _pkg_short_errors_supported=yes | |
5561 | -else | |
5562 | - _pkg_short_errors_supported=no | |
5563 | -fi | |
5564 | - if test $_pkg_short_errors_supported = yes; then | |
5565 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mesagl" 2>&1` | |
5566 | - else | |
5567 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mesagl" 2>&1` | |
5568 | - fi | |
5569 | - # Put the nasty error message in config.log where it belongs | |
5570 | - echo "$GL_PKG_ERRORS" >&5 | |
5571 | - | |
5572 | - ax_check_gl_pkg_config=no | |
5573 | -elif test $pkg_failed = untried; then | |
5574 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5575 | -$as_echo "no" >&6; } | |
5576 | - ax_check_gl_pkg_config=no | |
5577 | -else | |
5578 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5579 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5580 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5581 | -$as_echo "yes" >&6; } | |
5582 | - ax_check_gl_pkg_config=yes | |
5583 | -fi | |
5584 | -else | |
5585 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5586 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5587 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5588 | -$as_echo "yes" >&6; } | |
5589 | - ax_check_gl_pkg_config=yes | |
5590 | -fi ;; #( | |
5591 | - "mesagl gl") : | |
5592 | - | |
5593 | -pkg_failed=no | |
5594 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5595 | -$as_echo_n "checking for GL... " >&6; } | |
5596 | - | |
5597 | -if test -n "$GL_CFLAGS"; then | |
5598 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5599 | - elif test -n "$PKG_CONFIG"; then | |
5600 | - if test -n "$PKG_CONFIG" && \ | |
5601 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5602 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5603 | - ac_status=$? | |
5604 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5605 | - test $ac_status = 0; }; then | |
5606 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "mesagl" 2>/dev/null` | |
5607 | - test "x$?" != "x0" && pkg_failed=yes | |
5608 | -else | |
5609 | - pkg_failed=yes | |
5610 | -fi | |
5611 | - else | |
5612 | - pkg_failed=untried | |
5613 | -fi | |
5614 | -if test -n "$GL_LIBS"; then | |
5615 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5616 | - elif test -n "$PKG_CONFIG"; then | |
5617 | - if test -n "$PKG_CONFIG" && \ | |
5618 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mesagl\""; } >&5 | |
5619 | - ($PKG_CONFIG --exists --print-errors "mesagl") 2>&5 | |
5620 | - ac_status=$? | |
5621 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5622 | - test $ac_status = 0; }; then | |
5623 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "mesagl" 2>/dev/null` | |
5624 | - test "x$?" != "x0" && pkg_failed=yes | |
5625 | -else | |
5626 | - pkg_failed=yes | |
5627 | -fi | |
5628 | - else | |
5629 | - pkg_failed=untried | |
5630 | -fi | |
5631 | - | |
5632 | - | |
5633 | - | |
5634 | -if test $pkg_failed = yes; then | |
5635 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5636 | -$as_echo "no" >&6; } | |
5637 | - | |
5638 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5639 | - _pkg_short_errors_supported=yes | |
5640 | -else | |
5641 | - _pkg_short_errors_supported=no | |
5642 | -fi | |
5643 | - if test $_pkg_short_errors_supported = yes; then | |
5644 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mesagl" 2>&1` | |
5645 | - else | |
5646 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mesagl" 2>&1` | |
5647 | - fi | |
5648 | - # Put the nasty error message in config.log where it belongs | |
5649 | - echo "$GL_PKG_ERRORS" >&5 | |
5650 | - | |
5651 | - | |
5652 | -pkg_failed=no | |
5653 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5654 | -$as_echo_n "checking for GL... " >&6; } | |
5655 | - | |
5656 | -if test -n "$GL_CFLAGS"; then | |
5657 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5658 | - elif test -n "$PKG_CONFIG"; then | |
5659 | - if test -n "$PKG_CONFIG" && \ | |
5660 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5661 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5662 | - ac_status=$? | |
5663 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5664 | - test $ac_status = 0; }; then | |
5665 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "gl" 2>/dev/null` | |
5666 | - test "x$?" != "x0" && pkg_failed=yes | |
5667 | -else | |
5668 | - pkg_failed=yes | |
5669 | -fi | |
5670 | - else | |
5671 | - pkg_failed=untried | |
5672 | -fi | |
5673 | -if test -n "$GL_LIBS"; then | |
5674 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5675 | - elif test -n "$PKG_CONFIG"; then | |
5676 | - if test -n "$PKG_CONFIG" && \ | |
5677 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5678 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5679 | - ac_status=$? | |
5680 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5681 | - test $ac_status = 0; }; then | |
5682 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null` | |
5683 | - test "x$?" != "x0" && pkg_failed=yes | |
5684 | -else | |
5685 | - pkg_failed=yes | |
5686 | -fi | |
5687 | - else | |
5688 | - pkg_failed=untried | |
5689 | -fi | |
5690 | - | |
5691 | - | |
5692 | - | |
5693 | -if test $pkg_failed = yes; then | |
5694 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5695 | -$as_echo "no" >&6; } | |
5696 | - | |
5697 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5698 | - _pkg_short_errors_supported=yes | |
5699 | -else | |
5700 | - _pkg_short_errors_supported=no | |
5701 | -fi | |
5702 | - if test $_pkg_short_errors_supported = yes; then | |
5703 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1` | |
5704 | - else | |
5705 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1` | |
5706 | - fi | |
5707 | - # Put the nasty error message in config.log where it belongs | |
5708 | - echo "$GL_PKG_ERRORS" >&5 | |
5709 | - | |
5710 | - ax_check_gl_pkg_config=no | |
5711 | -elif test $pkg_failed = untried; then | |
5712 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5713 | -$as_echo "no" >&6; } | |
5714 | - ax_check_gl_pkg_config=no | |
5715 | -else | |
5716 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5717 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5718 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5719 | -$as_echo "yes" >&6; } | |
5720 | - ax_check_gl_pkg_config=yes | |
5721 | -fi | |
5722 | -elif test $pkg_failed = untried; then | |
5723 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5724 | -$as_echo "no" >&6; } | |
5725 | - | |
5726 | -pkg_failed=no | |
5727 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5728 | -$as_echo_n "checking for GL... " >&6; } | |
5729 | - | |
5730 | -if test -n "$GL_CFLAGS"; then | |
5731 | - pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5732 | - elif test -n "$PKG_CONFIG"; then | |
5733 | - if test -n "$PKG_CONFIG" && \ | |
5734 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5735 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5736 | - ac_status=$? | |
5737 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5738 | - test $ac_status = 0; }; then | |
5739 | - pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "gl" 2>/dev/null` | |
5740 | - test "x$?" != "x0" && pkg_failed=yes | |
5741 | -else | |
5742 | - pkg_failed=yes | |
5743 | -fi | |
5744 | - else | |
5745 | - pkg_failed=untried | |
5746 | -fi | |
5747 | -if test -n "$GL_LIBS"; then | |
5748 | - pkg_cv_GL_LIBS="$GL_LIBS" | |
5749 | - elif test -n "$PKG_CONFIG"; then | |
5750 | - if test -n "$PKG_CONFIG" && \ | |
5751 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5752 | - ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5753 | - ac_status=$? | |
5754 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5755 | - test $ac_status = 0; }; then | |
5756 | - pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null` | |
5757 | - test "x$?" != "x0" && pkg_failed=yes | |
5758 | -else | |
5759 | - pkg_failed=yes | |
5760 | -fi | |
5761 | - else | |
5762 | - pkg_failed=untried | |
5763 | -fi | |
5764 | - | |
5765 | - | |
5766 | - | |
5767 | -if test $pkg_failed = yes; then | |
5768 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5769 | -$as_echo "no" >&6; } | |
5770 | - | |
5771 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5772 | - _pkg_short_errors_supported=yes | |
5773 | -else | |
5774 | - _pkg_short_errors_supported=no | |
5775 | -fi | |
5776 | - if test $_pkg_short_errors_supported = yes; then | |
5777 | - GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1` | |
5778 | - else | |
5779 | - GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1` | |
5780 | - fi | |
5781 | - # Put the nasty error message in config.log where it belongs | |
5782 | - echo "$GL_PKG_ERRORS" >&5 | |
5783 | - | |
5784 | - ax_check_gl_pkg_config=no | |
5785 | -elif test $pkg_failed = untried; then | |
5786 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5787 | -$as_echo "no" >&6; } | |
5788 | - ax_check_gl_pkg_config=no | |
4215 | + done | |
4216 | + | |
4217 | + cd .. | |
4218 | + rm -rf conftest.dir | |
5789 | 4219 | else |
5790 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5791 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5792 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5793 | -$as_echo "yes" >&6; } | |
5794 | - ax_check_gl_pkg_config=yes | |
4220 | + am_cv_CC_dependencies_compiler_type=none | |
5795 | 4221 | fi |
5796 | -else | |
5797 | - GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5798 | - GL_LIBS=$pkg_cv_GL_LIBS | |
5799 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5800 | -$as_echo "yes" >&6; } | |
5801 | - ax_check_gl_pkg_config=yes | |
5802 | -fi ;; #( | |
5803 | - *) : | |
5804 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
5805 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
5806 | -as_fn_error $? "Order logic in ax_check_gl is buggy | |
5807 | -See \`config.log' for more details" "$LINENO" 5; } | |
5808 | - ;; | |
5809 | -esac | |
5810 | - | |
5811 | - if test "X$ax_check_gl_pkg_config" = "Xyes"; then : | |
5812 | - | |
5813 | - # check headers | |
5814 | - ac_ext=c | |
5815 | -ac_cpp='$CPP $CPPFLAGS' | |
5816 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5817 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5818 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5819 | - | |
5820 | - ax_check_gl_saved_libs="${LIBS}" | |
5821 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
5822 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
5823 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
5824 | - | |
5825 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
5826 | - for ac_header in windows.h | |
5827 | -do : | |
5828 | - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
5829 | -" | |
5830 | -if test "x$ac_cv_header_windows_h" = xyes; then : | |
5831 | - cat >>confdefs.h <<_ACEOF | |
5832 | -#define HAVE_WINDOWS_H 1 | |
5833 | -_ACEOF | |
5834 | 4222 | |
5835 | 4223 | fi |
4224 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 | |
4225 | +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } | |
4226 | +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | |
5836 | 4227 | |
5837 | -done | |
5838 | - | |
5839 | - for ac_header in GL/gl.h OpenGL/gl.h | |
5840 | -do : | |
5841 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5842 | -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " | |
5843 | - $ac_includes_default | |
5844 | - | |
5845 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
5846 | - # include <windows.h> | |
5847 | - # endif | |
5848 | - | |
5849 | - | |
5850 | -" | |
5851 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
5852 | - cat >>confdefs.h <<_ACEOF | |
5853 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5854 | -_ACEOF | |
5855 | - ax_check_gl_have_headers="yes";break | |
4228 | + if | |
4229 | + test "x$enable_dependency_tracking" != xno \ | |
4230 | + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | |
4231 | + am__fastdepCC_TRUE= | |
4232 | + am__fastdepCC_FALSE='#' | |
5856 | 4233 | else |
5857 | - ax_check_gl_have_headers_headers="no" | |
4234 | + am__fastdepCC_TRUE='#' | |
4235 | + am__fastdepCC_FALSE= | |
5858 | 4236 | fi |
5859 | 4237 | |
5860 | -done | |
5861 | - | |
5862 | - LIBS="${ax_check_gl_saved_libs}" | |
5863 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
5864 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
5865 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
5866 | 4238 | |
5867 | - ac_ext=c | |
5868 | -ac_cpp='$CPP $CPPFLAGS' | |
5869 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5870 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5871 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5872 | 4239 | |
5873 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL headers" >&5 | |
5874 | -$as_echo_n "checking for OpenGL headers... " >&6; } | |
5875 | -if ${ax_cv_check_gl_have_headers+:} false; then : | |
5876 | - $as_echo_n "(cached) " >&6 | |
5877 | -else | |
5878 | - ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}" | |
5879 | -fi | |
5880 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_have_headers" >&5 | |
5881 | -$as_echo "$ax_cv_check_gl_have_headers" >&6; } | |
5882 | 4240 | |
5883 | - # pkgconfig library are suposed to work ... | |
5884 | - if test "X$ax_cv_check_gl_have_headers" = "Xno"; then : | |
5885 | - as_fn_error $? "\"Pkgconfig detected OpenGL library has no headers!\"" "$LINENO" 5 | |
5886 | -fi | |
5887 | 4241 | |
5888 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL program" >&5 | |
5889 | -$as_echo_n "checking for compiling a minimal OpenGL program... " >&6; } | |
5890 | -if ${ax_cv_check_gl_compile_opengl+:} false; then : | |
4242 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C compiler" >&5 | |
4243 | +$as_echo_n "checking for OpenMP flag of C compiler... " >&6; } | |
4244 | +if ${ax_cv_c_openmp+:} false; then : | |
5891 | 4245 | $as_echo_n "(cached) " >&6 |
5892 | 4246 | else |
5893 | - ac_ext=c | |
5894 | -ac_cpp='$CPP $CPPFLAGS' | |
5895 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5896 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5897 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5898 | - | |
5899 | - ax_check_gl_saved_libs="${LIBS}" | |
5900 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
5901 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
5902 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
5903 | - | |
5904 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
5905 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4247 | + saveCFLAGS=$CFLAGS | |
4248 | +ax_cv_c_openmp=unknown | |
4249 | +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), | |
4250 | +# -qopenmp (icc>=15), -openmp (icc), | |
4251 | +# -xopenmp (Sun), -omp (Tru64), | |
4252 | +# -qsmp=omp (AIX), | |
4253 | +# none | |
4254 | +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" | |
4255 | +if test "x$OPENMP_CFLAGS" != x; then | |
4256 | + ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" | |
4257 | +fi | |
4258 | +for ax_openmp_flag in $ax_openmp_flags; do | |
4259 | + case $ax_openmp_flag in | |
4260 | + none) CFLAGS=$saveC ;; | |
4261 | + *) CFLAGS="$saveCFLAGS $ax_openmp_flag" ;; | |
4262 | + esac | |
4263 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5906 | 4264 | /* end confdefs.h. */ |
5907 | 4265 | |
5908 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
5909 | -# include <windows.h> | |
5910 | -# endif | |
5911 | -# ifdef HAVE_GL_GL_H | |
5912 | -# include <GL/gl.h> | |
5913 | -# elif defined(HAVE_OPENGL_GL_H) | |
5914 | -# include <OpenGL/gl.h> | |
5915 | -# else | |
5916 | -# error no gl.h | |
5917 | -# endif | |
4266 | +#include <omp.h> | |
4267 | + | |
4268 | +static void | |
4269 | +parallel_fill(int * data, int n) | |
4270 | +{ | |
4271 | + int i; | |
4272 | +#pragma omp parallel for | |
4273 | + for (i = 0; i < n; ++i) | |
4274 | + data[i] = i; | |
4275 | +} | |
5918 | 4276 | |
5919 | 4277 | int |
5920 | -main () | |
4278 | +main() | |
5921 | 4279 | { |
5922 | -glBegin(0) | |
5923 | - ; | |
4280 | + int arr[100000]; | |
4281 | + omp_set_num_threads(2); | |
4282 | + parallel_fill(arr, 100000); | |
5924 | 4283 | return 0; |
5925 | 4284 | } |
4285 | + | |
5926 | 4286 | _ACEOF |
5927 | -if ac_fn_c_try_compile "$LINENO"; then : | |
5928 | - ax_check_gl_compile_opengl="yes" | |
5929 | -else | |
5930 | - ax_check_gl_compile_opengl="no" | |
4287 | +if ac_fn_c_try_link "$LINENO"; then : | |
4288 | + ax_cv_c_openmp=$ax_openmp_flag; break | |
5931 | 4289 | fi |
5932 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5933 | - LIBS="${ax_check_gl_saved_libs}" | |
5934 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
5935 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
5936 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4290 | +rm -f core conftest.err conftest.$ac_objext \ | |
4291 | + conftest$ac_exeext conftest.$ac_ext | |
4292 | +done | |
4293 | +CFLAGS=$saveCFLAGS | |
5937 | 4294 | |
5938 | - ac_ext=c | |
5939 | -ac_cpp='$CPP $CPPFLAGS' | |
5940 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5941 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5942 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4295 | +fi | |
4296 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_openmp" >&5 | |
4297 | +$as_echo "$ax_cv_c_openmp" >&6; } | |
4298 | +if test "x$ax_cv_c_openmp" = "xunknown"; then | |
5943 | 4299 | |
4300 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenMP requested, but couldn't use OpenMP." >&5 | |
4301 | +$as_echo "$as_me: WARNING: OpenMP requested, but couldn't use OpenMP." >&2;} | |
5944 | 4302 | |
5945 | - ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}" | |
4303 | +else | |
4304 | + if test "x$ax_cv_c_openmp" != "xnone"; then | |
4305 | + OPENMP_CFLAGS=$ax_cv_c_openmp | |
4306 | + fi | |
4307 | + CXXFLAGS="$CXXFLAGS $OPENMP_CFLAGS" | |
5946 | 4308 | fi |
5947 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_compile_opengl" >&5 | |
5948 | -$as_echo "$ax_cv_check_gl_compile_opengl" >&6; } | |
5949 | - ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}" | |
5950 | 4309 | |
5951 | - if test "X$ax_cv_check_gl_compile_opengl" = "Xno"; then : | |
5952 | - as_fn_error $? "\"Pkgconfig detected opengl library could not be used for compiling minimal program!\"" "$LINENO" 5 | |
5953 | 4310 | fi |
4311 | +echo "" | |
4312 | +echo " Check OpenGL and GLUT" | |
4313 | +echo "" | |
4314 | +# Make sure we can run config.sub. | |
4315 | +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
4316 | + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
5954 | 4317 | |
5955 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL program" >&5 | |
5956 | -$as_echo_n "checking for linking a minimal OpenGL program... " >&6; } | |
5957 | -if ${ax_cv_check_gl_link_opengl+:} false; then : | |
4318 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
4319 | +$as_echo_n "checking build system type... " >&6; } | |
4320 | +if ${ac_cv_build+:} false; then : | |
5958 | 4321 | $as_echo_n "(cached) " >&6 |
5959 | 4322 | else |
5960 | - ac_ext=c | |
5961 | -ac_cpp='$CPP $CPPFLAGS' | |
5962 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5963 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5964 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5965 | - | |
5966 | - ax_check_gl_saved_libs="${LIBS}" | |
5967 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
5968 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
5969 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
5970 | - | |
5971 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
5972 | - LIBS="${GL_LIBS} ${LIBS}" | |
5973 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
5974 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5975 | -/* end confdefs.h. */ | |
5976 | - | |
5977 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
5978 | -# include <windows.h> | |
5979 | -# endif | |
5980 | -# ifdef HAVE_GL_GL_H | |
5981 | -# include <GL/gl.h> | |
5982 | -# elif defined(HAVE_OPENGL_GL_H) | |
5983 | -# include <OpenGL/gl.h> | |
5984 | -# else | |
5985 | -# error no gl.h | |
5986 | -# endif | |
4323 | + ac_build_alias=$build_alias | |
4324 | +test "x$ac_build_alias" = x && | |
4325 | + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
4326 | +test "x$ac_build_alias" = x && | |
4327 | + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
4328 | +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
4329 | + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
5987 | 4330 | |
5988 | -int | |
5989 | -main () | |
5990 | -{ | |
5991 | -glBegin(0) | |
5992 | - ; | |
5993 | - return 0; | |
5994 | -} | |
5995 | -_ACEOF | |
5996 | -if ac_fn_c_try_link "$LINENO"; then : | |
5997 | - ax_check_gl_link_opengl="yes" | |
5998 | -else | |
5999 | - ax_check_gl_link_opengl="no" | |
6000 | 4331 | fi |
6001 | -rm -f core conftest.err conftest.$ac_objext \ | |
6002 | - conftest$ac_exeext conftest.$ac_ext | |
6003 | - LIBS="${ax_check_gl_saved_libs}" | |
6004 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6005 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6006 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6007 | - | |
6008 | - ac_ext=c | |
6009 | -ac_cpp='$CPP $CPPFLAGS' | |
6010 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6011 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6012 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4332 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
4333 | +$as_echo "$ac_cv_build" >&6; } | |
4334 | +case $ac_cv_build in | |
4335 | +*-*-*) ;; | |
4336 | +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
4337 | +esac | |
4338 | +build=$ac_cv_build | |
4339 | +ac_save_IFS=$IFS; IFS='-' | |
4340 | +set x $ac_cv_build | |
4341 | +shift | |
4342 | +build_cpu=$1 | |
4343 | +build_vendor=$2 | |
4344 | +shift; shift | |
4345 | +# Remember, the first character of IFS is used to create $*, | |
4346 | +# except with old shells: | |
4347 | +build_os=$* | |
4348 | +IFS=$ac_save_IFS | |
4349 | +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
6013 | 4350 | |
6014 | 4351 | |
6015 | - ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}" | |
4352 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
4353 | +$as_echo_n "checking host system type... " >&6; } | |
4354 | +if ${ac_cv_host+:} false; then : | |
4355 | + $as_echo_n "(cached) " >&6 | |
4356 | +else | |
4357 | + if test "x$host_alias" = x; then | |
4358 | + ac_cv_host=$ac_cv_build | |
4359 | +else | |
4360 | + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
4361 | + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
6016 | 4362 | fi |
6017 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_link_opengl" >&5 | |
6018 | -$as_echo "$ax_cv_check_gl_link_opengl" >&6; } | |
6019 | - ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}" | |
6020 | 4363 | |
6021 | - if test "X$ax_cv_check_gl_link_opengl" = "Xno"; then : | |
6022 | - as_fn_error $? "\"Pkgconfig detected opengl library could not be used for linking minimal program!\"" "$LINENO" 5 | |
6023 | 4364 | fi |
4365 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
4366 | +$as_echo "$ac_cv_host" >&6; } | |
4367 | +case $ac_cv_host in | |
4368 | +*-*-*) ;; | |
4369 | +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
4370 | +esac | |
4371 | +host=$ac_cv_host | |
4372 | +ac_save_IFS=$IFS; IFS='-' | |
4373 | +set x $ac_cv_host | |
4374 | +shift | |
4375 | +host_cpu=$1 | |
4376 | +host_vendor=$2 | |
4377 | +shift; shift | |
4378 | +# Remember, the first character of IFS is used to create $*, | |
4379 | +# except with old shells: | |
4380 | +host_os=$* | |
4381 | +IFS=$ac_save_IFS | |
4382 | +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
6024 | 4383 | |
6025 | -else | |
6026 | - ax_check_gl_pkg_config=no | |
6027 | -fi | |
6028 | 4384 | |
6029 | -fi | |
6030 | 4385 | |
6031 | - # if no pkgconfig or pkgconfig fail try manual way | |
6032 | - if test "X$ax_check_gl_pkg_config" = "Xno"; then : | |
6033 | 4386 | |
6034 | - no_gl="yes" | |
6035 | 4387 | |
6036 | 4388 | |
6037 | - case ${host} in #( | |
6038 | - *-darwin*) : | |
6039 | - _AX_CHECK_GL_MANUAL_HEADERS_DARWIN ;; #( | |
6040 | - *) : | |
6041 | 4389 | |
6042 | - ac_ext=c | |
6043 | -ac_cpp='$CPP $CPPFLAGS' | |
6044 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6045 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6046 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6047 | 4390 | |
6048 | - ax_check_gl_saved_libs="${LIBS}" | |
6049 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6050 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6051 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6052 | 4391 | |
6053 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6054 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
6055 | - for ac_header in windows.h | |
6056 | -do : | |
6057 | - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
6058 | -" | |
6059 | -if test "x$ac_cv_header_windows_h" = xyes; then : | |
6060 | - cat >>confdefs.h <<_ACEOF | |
6061 | -#define HAVE_WINDOWS_H 1 | |
6062 | -_ACEOF | |
4392 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
4393 | + if test -n "$ac_tool_prefix"; then | |
4394 | + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
4395 | +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
4396 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4397 | +$as_echo_n "checking for $ac_word... " >&6; } | |
4398 | +if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
4399 | + $as_echo_n "(cached) " >&6 | |
4400 | +else | |
4401 | + case $PKG_CONFIG in | |
4402 | + [\\/]* | ?:[\\/]*) | |
4403 | + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
4404 | + ;; | |
4405 | + *) | |
4406 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4407 | +for as_dir in $PATH | |
4408 | +do | |
4409 | + IFS=$as_save_IFS | |
4410 | + test -z "$as_dir" && as_dir=. | |
4411 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4412 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4413 | + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
4414 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4415 | + break 2 | |
4416 | + fi | |
4417 | +done | |
4418 | + done | |
4419 | +IFS=$as_save_IFS | |
6063 | 4420 | |
4421 | + ;; | |
4422 | +esac | |
4423 | +fi | |
4424 | +PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
4425 | +if test -n "$PKG_CONFIG"; then | |
4426 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
4427 | +$as_echo "$PKG_CONFIG" >&6; } | |
4428 | +else | |
4429 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4430 | +$as_echo "no" >&6; } | |
6064 | 4431 | fi |
6065 | 4432 | |
4433 | + | |
4434 | +fi | |
4435 | +if test -z "$ac_cv_path_PKG_CONFIG"; then | |
4436 | + ac_pt_PKG_CONFIG=$PKG_CONFIG | |
4437 | + # Extract the first word of "pkg-config", so it can be a program name with args. | |
4438 | +set dummy pkg-config; ac_word=$2 | |
4439 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4440 | +$as_echo_n "checking for $ac_word... " >&6; } | |
4441 | +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
4442 | + $as_echo_n "(cached) " >&6 | |
4443 | +else | |
4444 | + case $ac_pt_PKG_CONFIG in | |
4445 | + [\\/]* | ?:[\\/]*) | |
4446 | + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
4447 | + ;; | |
4448 | + *) | |
4449 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4450 | +for as_dir in $PATH | |
4451 | +do | |
4452 | + IFS=$as_save_IFS | |
4453 | + test -z "$as_dir" && as_dir=. | |
4454 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4455 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4456 | + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
4457 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4458 | + break 2 | |
4459 | + fi | |
6066 | 4460 | done |
4461 | + done | |
4462 | +IFS=$as_save_IFS | |
6067 | 4463 | |
6068 | - # FIXME: use extra cflags | |
6069 | - for ac_header in GL/gl.h | |
6070 | -do : | |
6071 | - ac_fn_c_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" " | |
6072 | - $ac_includes_default | |
4464 | + ;; | |
4465 | +esac | |
4466 | +fi | |
4467 | +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
4468 | +if test -n "$ac_pt_PKG_CONFIG"; then | |
4469 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
4470 | +$as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
4471 | +else | |
4472 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4473 | +$as_echo "no" >&6; } | |
4474 | +fi | |
6073 | 4475 | |
6074 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6075 | - # include <windows.h> | |
6076 | - # endif | |
4476 | + if test "x$ac_pt_PKG_CONFIG" = x; then | |
4477 | + PKG_CONFIG="" | |
4478 | + else | |
4479 | + case $cross_compiling:$ac_tool_warned in | |
4480 | +yes:) | |
4481 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4482 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4483 | +ac_tool_warned=yes ;; | |
4484 | +esac | |
4485 | + PKG_CONFIG=$ac_pt_PKG_CONFIG | |
4486 | + fi | |
4487 | +else | |
4488 | + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
4489 | +fi | |
4490 | + | |
4491 | +fi | |
4492 | +if test -n "$PKG_CONFIG"; then | |
4493 | + _pkg_min_version=0.9.0 | |
4494 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
4495 | +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
4496 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
4497 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
4498 | +$as_echo "yes" >&6; } | |
4499 | + else | |
4500 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4501 | +$as_echo "no" >&6; } | |
4502 | + PKG_CONFIG="" | |
4503 | + fi | |
4504 | +fi | |
6077 | 4505 | |
6078 | 4506 | |
6079 | -" | |
6080 | -if test "x$ac_cv_header_GL_gl_h" = xyes; then : | |
6081 | - cat >>confdefs.h <<_ACEOF | |
6082 | -#define HAVE_GL_GL_H 1 | |
6083 | -_ACEOF | |
6084 | - ax_check_gl_have_headers="yes" | |
4507 | +# Check whether --with-xquartz-gl was given. | |
4508 | +if test "${with_xquartz_gl+set}" = set; then : | |
4509 | + withval=$with_xquartz_gl; if test "X$with_xquartz_gl"="Xyes"; then : | |
4510 | + with_xquartz_gl="/opt/X11" | |
4511 | +fi | |
6085 | 4512 | else |
6086 | - ax_check_gl_have_headers_headers="no" | |
4513 | + with_xquartz_gl=no | |
6087 | 4514 | fi |
6088 | 4515 | |
6089 | -done | |
4516 | + if test "X$with_xquartz_gl" != "Xno"; then : | |
4517 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OSX X11 path" >&5 | |
4518 | +$as_echo_n "checking OSX X11 path... " >&6; } | |
4519 | + if test -e "$with_xquartz_gl"; then : | |
4520 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$with_xquartz_gl\"" >&5 | |
4521 | +$as_echo "\"$with_xquartz_gl\"" >&6; } | |
4522 | + CFLAGS="-I$with_xquartz_gl/include $CFLAGS" | |
4523 | + LIBS="-L$with_xquartz_gl/lib $LIBS" | |
6090 | 4524 | |
6091 | - # do not try darwin specific OpenGl/gl.h | |
6092 | - LIBS="${ax_check_gl_saved_libs}" | |
6093 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6094 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6095 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4525 | +else | |
4526 | + with_xquartz_gl=no | |
4527 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4528 | +$as_echo "no" >&6; } | |
4529 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-xquartz-gl was given, but test for X11 failed. Fallback to system framework" >&5 | |
4530 | +$as_echo "$as_me: WARNING: --with-xquartz-gl was given, but test for X11 failed. Fallback to system framework" >&2;} | |
6096 | 4531 | |
6097 | - ac_ext=c | |
6098 | -ac_cpp='$CPP $CPPFLAGS' | |
6099 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6100 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6101 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4532 | +fi | |
6102 | 4533 | |
6103 | - ;; | |
6104 | -esac | |
6105 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL headers" >&5 | |
6106 | -$as_echo_n "checking for OpenGL headers... " >&6; } | |
6107 | -if ${ax_cv_check_gl_have_headers+:} false; then : | |
6108 | - $as_echo_n "(cached) " >&6 | |
6109 | -else | |
6110 | - ax_cv_check_gl_have_headers="${ax_check_gl_have_headers}" | |
6111 | 4534 | fi |
6112 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_have_headers" >&5 | |
6113 | -$as_echo "$ax_cv_check_gl_have_headers" >&6; } | |
6114 | 4535 | |
6115 | - if test "X$ax_check_gl_have_headers" = "Xyes"; then : | |
6116 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL program" >&5 | |
6117 | -$as_echo_n "checking for compiling a minimal OpenGL program... " >&6; } | |
6118 | -if ${ax_cv_check_gl_compile_opengl+:} false; then : | |
6119 | - $as_echo_n "(cached) " >&6 | |
6120 | -else | |
6121 | - ac_ext=c | |
4536 | +ac_ext=c | |
6122 | 4537 | ac_cpp='$CPP $CPPFLAGS' |
6123 | 4538 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6124 | 4539 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6125 | 4540 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6126 | - | |
6127 | - ax_check_gl_saved_libs="${LIBS}" | |
6128 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6129 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6130 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6131 | - | |
6132 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6133 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4541 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4542 | +$as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4543 | +# On Suns, sometimes $CPP names a directory. | |
4544 | +if test -n "$CPP" && test -d "$CPP"; then | |
4545 | + CPP= | |
4546 | +fi | |
4547 | +if test -z "$CPP"; then | |
4548 | + if ${ac_cv_prog_CPP+:} false; then : | |
4549 | + $as_echo_n "(cached) " >&6 | |
4550 | +else | |
4551 | + # Double quotes because CPP needs to be expanded | |
4552 | + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4553 | + do | |
4554 | + ac_preproc_ok=false | |
4555 | +for ac_c_preproc_warn_flag in '' yes | |
4556 | +do | |
4557 | + # Use a header file that comes with gcc, so configuring glibc | |
4558 | + # with a fresh cross-compiler works. | |
4559 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4560 | + # <limits.h> exists even on freestanding compilers. | |
4561 | + # On the NeXT, cc -E runs the code through the compiler's parser, | |
4562 | + # not just through cpp. "Syntax error" is here to catch this case. | |
4563 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6134 | 4564 | /* end confdefs.h. */ |
4565 | +#ifdef __STDC__ | |
4566 | +# include <limits.h> | |
4567 | +#else | |
4568 | +# include <assert.h> | |
4569 | +#endif | |
4570 | + Syntax error | |
4571 | +_ACEOF | |
4572 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
6135 | 4573 | |
6136 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6137 | -# include <windows.h> | |
6138 | -# endif | |
6139 | -# ifdef HAVE_GL_GL_H | |
6140 | -# include <GL/gl.h> | |
6141 | -# elif defined(HAVE_OPENGL_GL_H) | |
6142 | -# include <OpenGL/gl.h> | |
6143 | -# else | |
6144 | -# error no gl.h | |
6145 | -# endif | |
4574 | +else | |
4575 | + # Broken: fails on valid input. | |
4576 | +continue | |
4577 | +fi | |
4578 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
6146 | 4579 | |
6147 | -int | |
6148 | -main () | |
6149 | -{ | |
6150 | -glBegin(0) | |
6151 | - ; | |
6152 | - return 0; | |
6153 | -} | |
4580 | + # OK, works on sane cases. Now check whether nonexistent headers | |
4581 | + # can be detected and how. | |
4582 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4583 | +/* end confdefs.h. */ | |
4584 | +#include <ac_nonexistent.h> | |
6154 | 4585 | _ACEOF |
6155 | -if ac_fn_c_try_compile "$LINENO"; then : | |
6156 | - ax_check_gl_compile_opengl="yes" | |
4586 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4587 | + # Broken: success on invalid input. | |
4588 | +continue | |
6157 | 4589 | else |
6158 | - ax_check_gl_compile_opengl="no" | |
4590 | + # Passes both tests. | |
4591 | +ac_preproc_ok=: | |
4592 | +break | |
6159 | 4593 | fi |
6160 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6161 | - LIBS="${ax_check_gl_saved_libs}" | |
6162 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6163 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6164 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4594 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
6165 | 4595 | |
6166 | - ac_ext=c | |
6167 | -ac_cpp='$CPP $CPPFLAGS' | |
6168 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6169 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6170 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4596 | +done | |
4597 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4598 | +rm -f conftest.i conftest.err conftest.$ac_ext | |
4599 | +if $ac_preproc_ok; then : | |
4600 | + break | |
4601 | +fi | |
6171 | 4602 | |
4603 | + done | |
4604 | + ac_cv_prog_CPP=$CPP | |
6172 | 4605 | |
6173 | - ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}" | |
6174 | 4606 | fi |
6175 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_compile_opengl" >&5 | |
6176 | -$as_echo "$ax_cv_check_gl_compile_opengl" >&6; } | |
6177 | - ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}" | |
4607 | + CPP=$ac_cv_prog_CPP | |
4608 | +else | |
4609 | + ac_cv_prog_CPP=$CPP | |
4610 | +fi | |
4611 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4612 | +$as_echo "$CPP" >&6; } | |
4613 | +ac_preproc_ok=false | |
4614 | +for ac_c_preproc_warn_flag in '' yes | |
4615 | +do | |
4616 | + # Use a header file that comes with gcc, so configuring glibc | |
4617 | + # with a fresh cross-compiler works. | |
4618 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4619 | + # <limits.h> exists even on freestanding compilers. | |
4620 | + # On the NeXT, cc -E runs the code through the compiler's parser, | |
4621 | + # not just through cpp. "Syntax error" is here to catch this case. | |
4622 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4623 | +/* end confdefs.h. */ | |
4624 | +#ifdef __STDC__ | |
4625 | +# include <limits.h> | |
4626 | +#else | |
4627 | +# include <assert.h> | |
4628 | +#endif | |
4629 | + Syntax error | |
4630 | +_ACEOF | |
4631 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
6178 | 4632 | |
6179 | 4633 | else |
6180 | - ax_check_gl_compile_opengl=no | |
4634 | + # Broken: fails on valid input. | |
4635 | +continue | |
6181 | 4636 | fi |
4637 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
6182 | 4638 | |
6183 | - if test "X$ax_check_gl_compile_opengl" = "Xyes"; then : | |
6184 | - | |
6185 | - case ${host} in #( | |
6186 | - *-darwin*) : | |
6187 | - # ldhack list | |
6188 | - ldhack1 = "-Wl,-framework,OpenGL" | |
6189 | - ldhack2 = "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" | |
6190 | - ldhack3 = "$ldhack1,$ldhack2" | |
6191 | - | |
6192 | - # select hack | |
6193 | - if test "X$ax_check_gl_need_x" = "Xyes"; then : | |
6194 | - # libs already set by -framework cflag | |
6195 | - darwinlibs="" | |
6196 | - ldhacks="$ldhack1 $ldhack2 $ldhack3" | |
6197 | -else | |
6198 | - # do not use framework ldflags in case of x version | |
6199 | - darwinlibs="GL gl MesaGL" | |
6200 | - ldhack="$ldhack2" | |
6201 | -fi | |
6202 | - | |
6203 | - ax_check_gl_link_opengl="no" | |
6204 | - for extralibs in " " $darwinlibs; do | |
6205 | - for extraldflags in " " ldhacks; do | |
6206 | - ac_ext=c | |
6207 | -ac_cpp='$CPP $CPPFLAGS' | |
6208 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6209 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6210 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6211 | - | |
6212 | - ax_check_gl_saved_libs="${LIBS}" | |
6213 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6214 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6215 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6216 | - | |
6217 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6218 | - LIBS="$extralibs ${GL_LIBS} ${LIBS}" | |
6219 | - LDFLAGS="$extraldflags ${GL_LDFLAGS} ${LDFLAGS}" | |
6220 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4639 | + # OK, works on sane cases. Now check whether nonexistent headers | |
4640 | + # can be detected and how. | |
4641 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6221 | 4642 | /* end confdefs.h. */ |
6222 | - | |
6223 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6224 | -# include <windows.h> | |
6225 | -# endif | |
6226 | -# ifdef HAVE_GL_GL_H | |
6227 | -# include <GL/gl.h> | |
6228 | -# elif defined(HAVE_OPENGL_GL_H) | |
6229 | -# include <OpenGL/gl.h> | |
6230 | -# else | |
6231 | -# error no gl.h | |
6232 | -# endif | |
6233 | - | |
6234 | -int | |
6235 | -main () | |
6236 | -{ | |
6237 | -glBegin(0) | |
6238 | - ; | |
6239 | - return 0; | |
6240 | -} | |
4643 | +#include <ac_nonexistent.h> | |
6241 | 4644 | _ACEOF |
6242 | -if ac_fn_c_try_link "$LINENO"; then : | |
6243 | - ax_check_gl_link_opengl="yes" | |
4645 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4646 | + # Broken: success on invalid input. | |
4647 | +continue | |
6244 | 4648 | else |
6245 | - ax_check_gl_link_opengl="no" | |
4649 | + # Passes both tests. | |
4650 | +ac_preproc_ok=: | |
4651 | +break | |
6246 | 4652 | fi |
6247 | -rm -f core conftest.err conftest.$ac_objext \ | |
6248 | - conftest$ac_exeext conftest.$ac_ext | |
6249 | - LIBS="${ax_check_gl_saved_libs}" | |
6250 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6251 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6252 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6253 | - | |
6254 | - ac_ext=c | |
6255 | -ac_cpp='$CPP $CPPFLAGS' | |
6256 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6257 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6258 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4653 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
6259 | 4654 | |
6260 | - if test "X$ax_check_gl_link_opengl" = "Xyes"; then : | |
6261 | - break | |
6262 | -fi | |
6263 | - done; | |
6264 | - if test "X$ax_check_gl_link_opengl" = "Xyes"; then : | |
6265 | - break | |
6266 | -fi | |
6267 | - done; | |
6268 | - GL_LIBS="$extralibs ${GL_LIBS}" | |
6269 | - GL_LDFLAGS="$extraldflags ${GL_LDFLAGS}" | |
6270 | - ;; #( | |
6271 | - # try first cygwin version | |
6272 | - *-cygwin*|*-mingw*) : | |
4655 | +done | |
4656 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4657 | +rm -f conftest.i conftest.err conftest.$ac_ext | |
4658 | +if $ac_preproc_ok; then : | |
6273 | 4659 | |
6274 | - case "$ax_check_gl_order" in #( | |
6275 | - "gl") : | |
6276 | - ax_check_gl_manual_libs_generic_extra_libs="opengl32" | |
6277 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6278 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
4660 | +else | |
4661 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4662 | +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4663 | +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
4664 | +See \`config.log' for more details" "$LINENO" 5; } | |
6279 | 4665 | fi |
6280 | 4666 | |
6281 | - ac_ext=c | |
4667 | +ac_ext=c | |
6282 | 4668 | ac_cpp='$CPP $CPPFLAGS' |
6283 | 4669 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6284 | 4670 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6285 | 4671 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6286 | 4672 | |
6287 | - ax_check_gl_saved_libs="${LIBS}" | |
6288 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6289 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6290 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6291 | 4673 | |
6292 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6293 | - LIBS="${GL_LIBS} ${LIBS}" | |
6294 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6295 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6296 | -if ${ac_cv_search_glBegin+:} false; then : | |
4674 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
4675 | +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4676 | +if ${ac_cv_path_GREP+:} false; then : | |
6297 | 4677 | $as_echo_n "(cached) " >&6 |
6298 | 4678 | else |
6299 | - ac_func_search_save_LIBS=$LIBS | |
6300 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6301 | -/* end confdefs.h. */ | |
4679 | + if test -z "$GREP"; then | |
4680 | + ac_path_GREP_found=false | |
4681 | + # Loop through the user's path and test for each of PROGNAME-LIST | |
4682 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4683 | +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4684 | +do | |
4685 | + IFS=$as_save_IFS | |
4686 | + test -z "$as_dir" && as_dir=. | |
4687 | + for ac_prog in grep ggrep; do | |
4688 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4689 | + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4690 | + as_fn_executable_p "$ac_path_GREP" || continue | |
4691 | +# Check for GNU ac_path_GREP and select it if it is found. | |
4692 | + # Check for GNU $ac_path_GREP | |
4693 | +case `"$ac_path_GREP" --version 2>&1` in | |
4694 | +*GNU*) | |
4695 | + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4696 | +*) | |
4697 | + ac_count=0 | |
4698 | + $as_echo_n 0123456789 >"conftest.in" | |
4699 | + while : | |
4700 | + do | |
4701 | + cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4702 | + mv "conftest.tmp" "conftest.in" | |
4703 | + cp "conftest.in" "conftest.nl" | |
4704 | + $as_echo 'GREP' >> "conftest.nl" | |
4705 | + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4706 | + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4707 | + as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4708 | + if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4709 | + # Best one so far, save it but keep looking for a better one | |
4710 | + ac_cv_path_GREP="$ac_path_GREP" | |
4711 | + ac_path_GREP_max=$ac_count | |
4712 | + fi | |
4713 | + # 10*(2^10) chars as input seems more than enough | |
4714 | + test $ac_count -gt 10 && break | |
4715 | + done | |
4716 | + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4717 | +esac | |
6302 | 4718 | |
6303 | -/* Override any GCC internal prototype to avoid an error. | |
6304 | - Use char because int might match the return type of a GCC | |
6305 | - builtin and then its argument prototype would still apply. */ | |
6306 | -#ifdef __cplusplus | |
6307 | -extern "C" | |
6308 | -#endif | |
6309 | -char glBegin (); | |
6310 | -int | |
6311 | -main () | |
6312 | -{ | |
6313 | -return glBegin (); | |
6314 | - ; | |
6315 | - return 0; | |
6316 | -} | |
6317 | -_ACEOF | |
6318 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6319 | - if test -z "$ac_lib"; then | |
6320 | - ac_res="none required" | |
6321 | - else | |
6322 | - ac_res=-l$ac_lib | |
6323 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4719 | + $ac_path_GREP_found && break 3 | |
4720 | + done | |
4721 | + done | |
4722 | + done | |
4723 | +IFS=$as_save_IFS | |
4724 | + if test -z "$ac_cv_path_GREP"; then | |
4725 | + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
6324 | 4726 | fi |
6325 | - if ac_fn_c_try_link "$LINENO"; then : | |
6326 | - ac_cv_search_glBegin=$ac_res | |
6327 | -fi | |
6328 | -rm -f core conftest.err conftest.$ac_objext \ | |
6329 | - conftest$ac_exeext | |
6330 | - if ${ac_cv_search_glBegin+:} false; then : | |
6331 | - break | |
6332 | -fi | |
6333 | -done | |
6334 | -if ${ac_cv_search_glBegin+:} false; then : | |
6335 | - | |
6336 | -else | |
6337 | - ac_cv_search_glBegin=no | |
6338 | -fi | |
6339 | -rm conftest.$ac_ext | |
6340 | -LIBS=$ac_func_search_save_LIBS | |
6341 | -fi | |
6342 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6343 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6344 | -ac_res=$ac_cv_search_glBegin | |
6345 | -if test "$ac_res" != no; then : | |
6346 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6347 | - ax_check_gl_lib_opengl="yes" | |
6348 | 4727 | else |
6349 | - ax_check_gl_lib_opengl="no" | |
4728 | + ac_cv_path_GREP=$GREP | |
6350 | 4729 | fi |
6351 | 4730 | |
6352 | - case $ac_cv_search_glBegin in #( | |
6353 | - "none required") : | |
6354 | - ;; #( | |
6355 | - no) : | |
6356 | - ;; #( | |
6357 | - *) : | |
6358 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6359 | -esac | |
6360 | - LIBS="${ax_check_gl_saved_libs}" | |
6361 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6362 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6363 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4731 | +fi | |
4732 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4733 | +$as_echo "$ac_cv_path_GREP" >&6; } | |
4734 | + GREP="$ac_cv_path_GREP" | |
6364 | 4735 | |
6365 | - ac_ext=c | |
6366 | -ac_cpp='$CPP $CPPFLAGS' | |
6367 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6368 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6369 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6370 | 4736 | |
6371 | - ;; #( | |
6372 | - "gl mesagl") : | |
6373 | - ax_check_gl_manual_libs_generic_extra_libs="opengl32 GL gl MesaGL" | |
6374 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6375 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
6376 | -fi | |
4737 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4738 | +$as_echo_n "checking for egrep... " >&6; } | |
4739 | +if ${ac_cv_path_EGREP+:} false; then : | |
4740 | + $as_echo_n "(cached) " >&6 | |
4741 | +else | |
4742 | + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4743 | + then ac_cv_path_EGREP="$GREP -E" | |
4744 | + else | |
4745 | + if test -z "$EGREP"; then | |
4746 | + ac_path_EGREP_found=false | |
4747 | + # Loop through the user's path and test for each of PROGNAME-LIST | |
4748 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4749 | +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4750 | +do | |
4751 | + IFS=$as_save_IFS | |
4752 | + test -z "$as_dir" && as_dir=. | |
4753 | + for ac_prog in egrep; do | |
4754 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4755 | + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4756 | + as_fn_executable_p "$ac_path_EGREP" || continue | |
4757 | +# Check for GNU ac_path_EGREP and select it if it is found. | |
4758 | + # Check for GNU $ac_path_EGREP | |
4759 | +case `"$ac_path_EGREP" --version 2>&1` in | |
4760 | +*GNU*) | |
4761 | + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4762 | +*) | |
4763 | + ac_count=0 | |
4764 | + $as_echo_n 0123456789 >"conftest.in" | |
4765 | + while : | |
4766 | + do | |
4767 | + cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4768 | + mv "conftest.tmp" "conftest.in" | |
4769 | + cp "conftest.in" "conftest.nl" | |
4770 | + $as_echo 'EGREP' >> "conftest.nl" | |
4771 | + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4772 | + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4773 | + as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4774 | + if test $ac_count -gt ${ac_path_EGREP_max-0}; then | |
4775 | + # Best one so far, save it but keep looking for a better one | |
4776 | + ac_cv_path_EGREP="$ac_path_EGREP" | |
4777 | + ac_path_EGREP_max=$ac_count | |
4778 | + fi | |
4779 | + # 10*(2^10) chars as input seems more than enough | |
4780 | + test $ac_count -gt 10 && break | |
4781 | + done | |
4782 | + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4783 | +esac | |
6377 | 4784 | |
6378 | - ac_ext=c | |
6379 | -ac_cpp='$CPP $CPPFLAGS' | |
6380 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6381 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6382 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4785 | + $ac_path_EGREP_found && break 3 | |
4786 | + done | |
4787 | + done | |
4788 | + done | |
4789 | +IFS=$as_save_IFS | |
4790 | + if test -z "$ac_cv_path_EGREP"; then | |
4791 | + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4792 | + fi | |
4793 | +else | |
4794 | + ac_cv_path_EGREP=$EGREP | |
4795 | +fi | |
6383 | 4796 | |
6384 | - ax_check_gl_saved_libs="${LIBS}" | |
6385 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6386 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6387 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
4797 | + fi | |
4798 | +fi | |
4799 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 | |
4800 | +$as_echo "$ac_cv_path_EGREP" >&6; } | |
4801 | + EGREP="$ac_cv_path_EGREP" | |
6388 | 4802 | |
6389 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6390 | - LIBS="${GL_LIBS} ${LIBS}" | |
6391 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6392 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6393 | -if ${ac_cv_search_glBegin+:} false; then : | |
4803 | + | |
4804 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 | |
4805 | +$as_echo_n "checking for ANSI C header files... " >&6; } | |
4806 | +if ${ac_cv_header_stdc+:} false; then : | |
6394 | 4807 | $as_echo_n "(cached) " >&6 |
6395 | 4808 | else |
6396 | - ac_func_search_save_LIBS=$LIBS | |
6397 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4809 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6398 | 4810 | /* end confdefs.h. */ |
4811 | +#include <stdlib.h> | |
4812 | +#include <stdarg.h> | |
4813 | +#include <string.h> | |
4814 | +#include <float.h> | |
6399 | 4815 | |
6400 | -/* Override any GCC internal prototype to avoid an error. | |
6401 | - Use char because int might match the return type of a GCC | |
6402 | - builtin and then its argument prototype would still apply. */ | |
6403 | -#ifdef __cplusplus | |
6404 | -extern "C" | |
6405 | -#endif | |
6406 | -char glBegin (); | |
6407 | 4816 | int |
6408 | 4817 | main () |
6409 | 4818 | { |
6410 | -return glBegin (); | |
4819 | + | |
6411 | 4820 | ; |
6412 | 4821 | return 0; |
6413 | 4822 | } |
6414 | 4823 | _ACEOF |
6415 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6416 | - if test -z "$ac_lib"; then | |
6417 | - ac_res="none required" | |
6418 | - else | |
6419 | - ac_res=-l$ac_lib | |
6420 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6421 | - fi | |
6422 | - if ac_fn_c_try_link "$LINENO"; then : | |
6423 | - ac_cv_search_glBegin=$ac_res | |
6424 | -fi | |
6425 | -rm -f core conftest.err conftest.$ac_objext \ | |
6426 | - conftest$ac_exeext | |
6427 | - if ${ac_cv_search_glBegin+:} false; then : | |
6428 | - break | |
6429 | -fi | |
6430 | -done | |
6431 | -if ${ac_cv_search_glBegin+:} false; then : | |
6432 | - | |
6433 | -else | |
6434 | - ac_cv_search_glBegin=no | |
6435 | -fi | |
6436 | -rm conftest.$ac_ext | |
6437 | -LIBS=$ac_func_search_save_LIBS | |
6438 | -fi | |
6439 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6440 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6441 | -ac_res=$ac_cv_search_glBegin | |
6442 | -if test "$ac_res" != no; then : | |
6443 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6444 | - ax_check_gl_lib_opengl="yes" | |
4824 | +if ac_fn_c_try_compile "$LINENO"; then : | |
4825 | + ac_cv_header_stdc=yes | |
6445 | 4826 | else |
6446 | - ax_check_gl_lib_opengl="no" | |
4827 | + ac_cv_header_stdc=no | |
6447 | 4828 | fi |
4829 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
6448 | 4830 | |
6449 | - case $ac_cv_search_glBegin in #( | |
6450 | - "none required") : | |
6451 | - ;; #( | |
6452 | - no) : | |
6453 | - ;; #( | |
6454 | - *) : | |
6455 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6456 | -esac | |
6457 | - LIBS="${ax_check_gl_saved_libs}" | |
6458 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6459 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6460 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4831 | +if test $ac_cv_header_stdc = yes; then | |
4832 | + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4833 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4834 | +/* end confdefs.h. */ | |
4835 | +#include <string.h> | |
6461 | 4836 | |
6462 | - ac_ext=c | |
6463 | -ac_cpp='$CPP $CPPFLAGS' | |
6464 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6465 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6466 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4837 | +_ACEOF | |
4838 | +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4839 | + $EGREP "memchr" >/dev/null 2>&1; then : | |
6467 | 4840 | |
6468 | - ;; #( | |
6469 | - "mesagl gl") : | |
6470 | - ax_check_gl_manual_libs_generic_extra_libs="GL gl MesaGL opengl32" | |
6471 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6472 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
4841 | +else | |
4842 | + ac_cv_header_stdc=no | |
6473 | 4843 | fi |
4844 | +rm -f conftest* | |
6474 | 4845 | |
6475 | - ac_ext=c | |
6476 | -ac_cpp='$CPP $CPPFLAGS' | |
6477 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6478 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6479 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6480 | - | |
6481 | - ax_check_gl_saved_libs="${LIBS}" | |
6482 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6483 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6484 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
4846 | +fi | |
6485 | 4847 | |
6486 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6487 | - LIBS="${GL_LIBS} ${LIBS}" | |
6488 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6489 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6490 | -if ${ac_cv_search_glBegin+:} false; then : | |
6491 | - $as_echo_n "(cached) " >&6 | |
6492 | -else | |
6493 | - ac_func_search_save_LIBS=$LIBS | |
6494 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4848 | +if test $ac_cv_header_stdc = yes; then | |
4849 | + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4850 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6495 | 4851 | /* end confdefs.h. */ |
4852 | +#include <stdlib.h> | |
6496 | 4853 | |
6497 | -/* Override any GCC internal prototype to avoid an error. | |
6498 | - Use char because int might match the return type of a GCC | |
6499 | - builtin and then its argument prototype would still apply. */ | |
6500 | -#ifdef __cplusplus | |
6501 | -extern "C" | |
6502 | -#endif | |
6503 | -char glBegin (); | |
6504 | -int | |
6505 | -main () | |
6506 | -{ | |
6507 | -return glBegin (); | |
6508 | - ; | |
6509 | - return 0; | |
6510 | -} | |
6511 | 4854 | _ACEOF |
6512 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6513 | - if test -z "$ac_lib"; then | |
6514 | - ac_res="none required" | |
6515 | - else | |
6516 | - ac_res=-l$ac_lib | |
6517 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6518 | - fi | |
6519 | - if ac_fn_c_try_link "$LINENO"; then : | |
6520 | - ac_cv_search_glBegin=$ac_res | |
6521 | -fi | |
6522 | -rm -f core conftest.err conftest.$ac_objext \ | |
6523 | - conftest$ac_exeext | |
6524 | - if ${ac_cv_search_glBegin+:} false; then : | |
6525 | - break | |
6526 | -fi | |
6527 | -done | |
6528 | -if ${ac_cv_search_glBegin+:} false; then : | |
4855 | +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4856 | + $EGREP "free" >/dev/null 2>&1; then : | |
6529 | 4857 | |
6530 | 4858 | else |
6531 | - ac_cv_search_glBegin=no | |
6532 | -fi | |
6533 | -rm conftest.$ac_ext | |
6534 | -LIBS=$ac_func_search_save_LIBS | |
6535 | -fi | |
6536 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6537 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6538 | -ac_res=$ac_cv_search_glBegin | |
6539 | -if test "$ac_res" != no; then : | |
6540 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6541 | - ax_check_gl_lib_opengl="yes" | |
6542 | -else | |
6543 | - ax_check_gl_lib_opengl="no" | |
4859 | + ac_cv_header_stdc=no | |
6544 | 4860 | fi |
4861 | +rm -f conftest* | |
6545 | 4862 | |
6546 | - case $ac_cv_search_glBegin in #( | |
6547 | - "none required") : | |
6548 | - ;; #( | |
6549 | - no) : | |
6550 | - ;; #( | |
6551 | - *) : | |
6552 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6553 | -esac | |
6554 | - LIBS="${ax_check_gl_saved_libs}" | |
6555 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6556 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6557 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6558 | - | |
6559 | - ac_ext=c | |
6560 | -ac_cpp='$CPP $CPPFLAGS' | |
6561 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6562 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6563 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6564 | - | |
6565 | - ;; #( | |
6566 | - *) : | |
6567 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6568 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6569 | -as_fn_error $? "Order logic in ax_check_gl is buggy | |
6570 | -See \`config.log' for more details" "$LINENO" 5; } | |
6571 | - ;; | |
6572 | -esac ;; #( | |
6573 | - *) : | |
6574 | - case "$ax_check_gl_order" in #( | |
6575 | - "gl") : | |
6576 | - ax_check_gl_manual_libs_generic_extra_libs="GL gl" | |
6577 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6578 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
6579 | 4863 | fi |
6580 | 4864 | |
6581 | - ac_ext=c | |
6582 | -ac_cpp='$CPP $CPPFLAGS' | |
6583 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6584 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6585 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6586 | - | |
6587 | - ax_check_gl_saved_libs="${LIBS}" | |
6588 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6589 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6590 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6591 | - | |
6592 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6593 | - LIBS="${GL_LIBS} ${LIBS}" | |
6594 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6595 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6596 | -if ${ac_cv_search_glBegin+:} false; then : | |
6597 | - $as_echo_n "(cached) " >&6 | |
4865 | +if test $ac_cv_header_stdc = yes; then | |
4866 | + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4867 | + if test "$cross_compiling" = yes; then : | |
4868 | + : | |
6598 | 4869 | else |
6599 | - ac_func_search_save_LIBS=$LIBS | |
6600 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4870 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6601 | 4871 | /* end confdefs.h. */ |
6602 | - | |
6603 | -/* Override any GCC internal prototype to avoid an error. | |
6604 | - Use char because int might match the return type of a GCC | |
6605 | - builtin and then its argument prototype would still apply. */ | |
6606 | -#ifdef __cplusplus | |
6607 | -extern "C" | |
4872 | +#include <ctype.h> | |
4873 | +#include <stdlib.h> | |
4874 | +#if ((' ' & 0x0FF) == 0x020) | |
4875 | +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4876 | +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4877 | +#else | |
4878 | +# define ISLOWER(c) \ | |
4879 | + (('a' <= (c) && (c) <= 'i') \ | |
4880 | + || ('j' <= (c) && (c) <= 'r') \ | |
4881 | + || ('s' <= (c) && (c) <= 'z')) | |
4882 | +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
6608 | 4883 | #endif |
6609 | -char glBegin (); | |
4884 | + | |
4885 | +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
6610 | 4886 | int |
6611 | 4887 | main () |
6612 | 4888 | { |
6613 | -return glBegin (); | |
6614 | - ; | |
4889 | + int i; | |
4890 | + for (i = 0; i < 256; i++) | |
4891 | + if (XOR (islower (i), ISLOWER (i)) | |
4892 | + || toupper (i) != TOUPPER (i)) | |
4893 | + return 2; | |
6615 | 4894 | return 0; |
6616 | 4895 | } |
6617 | 4896 | _ACEOF |
6618 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6619 | - if test -z "$ac_lib"; then | |
6620 | - ac_res="none required" | |
6621 | - else | |
6622 | - ac_res=-l$ac_lib | |
6623 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6624 | - fi | |
6625 | - if ac_fn_c_try_link "$LINENO"; then : | |
6626 | - ac_cv_search_glBegin=$ac_res | |
4897 | +if ac_fn_c_try_run "$LINENO"; then : | |
4898 | + | |
4899 | +else | |
4900 | + ac_cv_header_stdc=no | |
6627 | 4901 | fi |
6628 | -rm -f core conftest.err conftest.$ac_objext \ | |
6629 | - conftest$ac_exeext | |
6630 | - if ${ac_cv_search_glBegin+:} false; then : | |
6631 | - break | |
4902 | +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
4903 | + conftest.$ac_objext conftest.beam conftest.$ac_ext | |
6632 | 4904 | fi |
6633 | -done | |
6634 | -if ${ac_cv_search_glBegin+:} false; then : | |
6635 | 4905 | |
6636 | -else | |
6637 | - ac_cv_search_glBegin=no | |
6638 | 4906 | fi |
6639 | -rm conftest.$ac_ext | |
6640 | -LIBS=$ac_func_search_save_LIBS | |
6641 | 4907 | fi |
6642 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6643 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6644 | -ac_res=$ac_cv_search_glBegin | |
6645 | -if test "$ac_res" != no; then : | |
6646 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6647 | - ax_check_gl_lib_opengl="yes" | |
6648 | -else | |
6649 | - ax_check_gl_lib_opengl="no" | |
4908 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 | |
4909 | +$as_echo "$ac_cv_header_stdc" >&6; } | |
4910 | +if test $ac_cv_header_stdc = yes; then | |
4911 | + | |
4912 | +$as_echo "#define STDC_HEADERS 1" >>confdefs.h | |
4913 | + | |
4914 | +fi | |
4915 | + | |
4916 | +# On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4917 | +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4918 | + inttypes.h stdint.h unistd.h | |
4919 | +do : | |
4920 | + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4921 | +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default | |
4922 | +" | |
4923 | +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
4924 | + cat >>confdefs.h <<_ACEOF | |
4925 | +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4926 | +_ACEOF | |
4927 | + | |
6650 | 4928 | fi |
6651 | 4929 | |
6652 | - case $ac_cv_search_glBegin in #( | |
6653 | - "none required") : | |
6654 | - ;; #( | |
6655 | - no) : | |
6656 | - ;; #( | |
6657 | - *) : | |
6658 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6659 | -esac | |
6660 | - LIBS="${ax_check_gl_saved_libs}" | |
6661 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6662 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6663 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
4930 | +done | |
6664 | 4931 | |
6665 | - ac_ext=c | |
6666 | -ac_cpp='$CPP $CPPFLAGS' | |
6667 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6668 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6669 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6670 | 4932 | |
6671 | - ;; #( | |
6672 | - "gl mesagl") : | |
6673 | - ax_check_gl_manual_libs_generic_extra_libs="GL gl MesaGL" | |
6674 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6675 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
6676 | -fi | |
6677 | 4933 | |
6678 | - ac_ext=c | |
6679 | -ac_cpp='$CPP $CPPFLAGS' | |
6680 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6681 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6682 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6683 | 4934 | |
6684 | - ax_check_gl_saved_libs="${LIBS}" | |
6685 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6686 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6687 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6688 | 4935 | |
6689 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6690 | - LIBS="${GL_LIBS} ${LIBS}" | |
6691 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6692 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6693 | -if ${ac_cv_search_glBegin+:} false; then : | |
6694 | - $as_echo_n "(cached) " >&6 | |
6695 | -else | |
6696 | - ac_func_search_save_LIBS=$LIBS | |
6697 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6698 | -/* end confdefs.h. */ | |
6699 | 4936 | |
6700 | -/* Override any GCC internal prototype to avoid an error. | |
6701 | - Use char because int might match the return type of a GCC | |
6702 | - builtin and then its argument prototype would still apply. */ | |
6703 | -#ifdef __cplusplus | |
6704 | -extern "C" | |
6705 | -#endif | |
6706 | -char glBegin (); | |
6707 | -int | |
6708 | -main () | |
6709 | -{ | |
6710 | -return glBegin (); | |
6711 | - ; | |
6712 | - return 0; | |
6713 | -} | |
6714 | -_ACEOF | |
6715 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6716 | - if test -z "$ac_lib"; then | |
6717 | - ac_res="none required" | |
6718 | - else | |
6719 | - ac_res=-l$ac_lib | |
6720 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6721 | - fi | |
6722 | - if ac_fn_c_try_link "$LINENO"; then : | |
6723 | - ac_cv_search_glBegin=$ac_res | |
6724 | -fi | |
6725 | -rm -f core conftest.err conftest.$ac_objext \ | |
6726 | - conftest$ac_exeext | |
6727 | - if ${ac_cv_search_glBegin+:} false; then : | |
6728 | - break | |
6729 | -fi | |
6730 | -done | |
6731 | -if ${ac_cv_search_glBegin+:} false; then : | |
6732 | 4937 | |
4938 | + case ${host} in #( | |
4939 | + *-darwin*) : | |
4940 | + | |
4941 | + | |
4942 | + if test "x$with_xquartz_gl" != "xno"; then : | |
4943 | + GL_LIBS="${GL_LIBS:--lGL}" | |
6733 | 4944 | else |
6734 | - ac_cv_search_glBegin=no | |
6735 | -fi | |
6736 | -rm conftest.$ac_ext | |
6737 | -LIBS=$ac_func_search_save_LIBS | |
6738 | -fi | |
6739 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6740 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6741 | -ac_res=$ac_cv_search_glBegin | |
6742 | -if test "$ac_res" != no; then : | |
6743 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
6744 | - ax_check_gl_lib_opengl="yes" | |
6745 | -else | |
6746 | - ax_check_gl_lib_opengl="no" | |
4945 | + GL_LIBS="${GL_LIBS:--framework OpenGL}" | |
6747 | 4946 | fi |
4947 | + ;; #( | |
4948 | + *-cygwin*|*-mingw*) : | |
6748 | 4949 | |
6749 | - case $ac_cv_search_glBegin in #( | |
6750 | - "none required") : | |
6751 | - ;; #( | |
6752 | - no) : | |
6753 | - ;; #( | |
6754 | - *) : | |
6755 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6756 | -esac | |
6757 | - LIBS="${ax_check_gl_saved_libs}" | |
6758 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6759 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6760 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6761 | 4950 | |
6762 | - ac_ext=c | |
6763 | -ac_cpp='$CPP $CPPFLAGS' | |
6764 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6765 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6766 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4951 | + if test -n "$GL_LIBS"; then : | |
6767 | 4952 | |
6768 | - ;; #( | |
6769 | - "mesagl gl") : | |
6770 | - ax_check_gl_manual_libs_generic_extra_libs="MesaGL GL gl" | |
6771 | - if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
4953 | +else | |
4954 | + | |
4955 | + ax_check_gl_manual_libs_generic_extra_libs="opengl32 GL gl" | |
4956 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6772 | 4957 | as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 |
6773 | 4958 | fi |
6774 | 4959 | |
4960 | + | |
4961 | + | |
4962 | + | |
4963 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
4964 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
4965 | + | |
4966 | + | |
4967 | + | |
6775 | 4968 | ac_ext=c |
6776 | 4969 | ac_cpp='$CPP $CPPFLAGS' |
6777 | 4970 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6778 | 4971 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6779 | 4972 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6780 | 4973 | |
6781 | - ax_check_gl_saved_libs="${LIBS}" | |
6782 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6783 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6784 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6785 | 4974 | |
6786 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6787 | - LIBS="${GL_LIBS} ${LIBS}" | |
6788 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
4975 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6789 | 4976 | $as_echo_n "checking for library containing glBegin... " >&6; } |
6790 | 4977 | if ${ac_cv_search_glBegin+:} false; then : |
6791 | 4978 | $as_echo_n "(cached) " >&6 |
@@ -6838,274 +5025,76 @@ $as_echo "$ac_cv_search_glBegin" >&6; } | ||
6838 | 5025 | ac_res=$ac_cv_search_glBegin |
6839 | 5026 | if test "$ac_res" != no; then : |
6840 | 5027 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
6841 | - ax_check_gl_lib_opengl="yes" | |
6842 | -else | |
6843 | - ax_check_gl_lib_opengl="no" | |
6844 | -fi | |
6845 | - | |
6846 | - case $ac_cv_search_glBegin in #( | |
6847 | - "none required") : | |
6848 | - ;; #( | |
6849 | - no) : | |
6850 | - ;; #( | |
6851 | - *) : | |
6852 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
6853 | -esac | |
6854 | - LIBS="${ax_check_gl_saved_libs}" | |
6855 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6856 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6857 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6858 | - | |
6859 | - ac_ext=c | |
6860 | -ac_cpp='$CPP $CPPFLAGS' | |
6861 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6862 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6863 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6864 | - | |
6865 | - ;; #( | |
6866 | - *) : | |
6867 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
6868 | -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
6869 | -as_fn_error $? "Order logic in ax_check_gl is buggy | |
6870 | -See \`config.log' for more details" "$LINENO" 5; } | |
6871 | - ;; | |
6872 | -esac | |
6873 | - ;; | |
6874 | -esac | |
6875 | 5028 | |
6876 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL libraries" >&5 | |
6877 | -$as_echo_n "checking for OpenGL libraries... " >&6; } | |
6878 | -if ${ax_cv_check_gl_lib_opengl+:} false; then : | |
6879 | - $as_echo_n "(cached) " >&6 | |
6880 | -else | |
6881 | - ax_cv_check_gl_lib_opengl="${ax_check_gl_lib_opengl}" | |
6882 | -fi | |
6883 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_lib_opengl" >&5 | |
6884 | -$as_echo "$ax_cv_check_gl_lib_opengl" >&6; } | |
6885 | - ax_check_gl_lib_opengl="${ax_cv_check_gl_lib_opengl}" | |
5029 | + ax_check_gl_lib_opengl="yes" | |
5030 | + break | |
6886 | 5031 | |
6887 | -else | |
6888 | - ax_check_gl_lib_opengl=no | |
6889 | 5032 | fi |
6890 | 5033 | |
6891 | - if test "X$ax_check_gl_lib_opengl" = "Xyes"; then : | |
6892 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL program" >&5 | |
6893 | -$as_echo_n "checking for linking a minimal OpenGL program... " >&6; } | |
6894 | -if ${ax_cv_check_gl_link_opengl+:} false; then : | |
6895 | - $as_echo_n "(cached) " >&6 | |
6896 | -else | |
6897 | - ac_ext=c | |
6898 | -ac_cpp='$CPP $CPPFLAGS' | |
6899 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6900 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6901 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6902 | - | |
6903 | - ax_check_gl_saved_libs="${LIBS}" | |
6904 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6905 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6906 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6907 | - | |
6908 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6909 | - LIBS="${GL_LIBS} ${LIBS}" | |
6910 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
6911 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6912 | -/* end confdefs.h. */ | |
6913 | - | |
6914 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6915 | -# include <windows.h> | |
6916 | -# endif | |
6917 | -# ifdef HAVE_GL_GL_H | |
6918 | -# include <GL/gl.h> | |
6919 | -# elif defined(HAVE_OPENGL_GL_H) | |
6920 | -# include <OpenGL/gl.h> | |
6921 | -# else | |
6922 | -# error no gl.h | |
6923 | -# endif | |
6924 | - | |
6925 | -int | |
6926 | -main () | |
6927 | -{ | |
6928 | -glBegin(0) | |
6929 | - ; | |
6930 | - return 0; | |
6931 | -} | |
6932 | -_ACEOF | |
6933 | -if ac_fn_c_try_link "$LINENO"; then : | |
6934 | - ax_check_gl_link_opengl="yes" | |
6935 | -else | |
6936 | - ax_check_gl_link_opengl="no" | |
5034 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
5035 | + GL_LIBS="${ac_cv_search_glBegin}" | |
6937 | 5036 | fi |
6938 | -rm -f core conftest.err conftest.$ac_objext \ | |
6939 | - conftest$ac_exeext conftest.$ac_ext | |
6940 | - LIBS="${ax_check_gl_saved_libs}" | |
6941 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
6942 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
6943 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
6944 | - | |
6945 | - ac_ext=c | |
6946 | -ac_cpp='$CPP $CPPFLAGS' | |
6947 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6948 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6949 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6950 | 5037 | |
6951 | 5038 | |
6952 | - ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}" | |
6953 | -fi | |
6954 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_link_opengl" >&5 | |
6955 | -$as_echo "$ax_cv_check_gl_link_opengl" >&6; } | |
6956 | - ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}" | |
6957 | 5039 | |
6958 | -else | |
6959 | - ax_check_gl_link_opengl=no | |
6960 | -fi | |
5040 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
6961 | 5041 | |
6962 | - if test "X$ax_check_gl_link_opengl" = "Xyes"; then : | |
6963 | - no_gl="no" | |
6964 | -else | |
6965 | - no_gl="yes" | |
6966 | -fi | |
6967 | 5042 | |
6968 | -else | |
6969 | - no_gl=no | |
6970 | -fi | |
6971 | 5043 | |
6972 | - # test if need to test X compatibility | |
6973 | - if test $no_gl = no; then : | |
6974 | - # test X compatibility | |
6975 | - if test X$ax_check_gl_need_x != "Xdefault"; then : | |
6976 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking wether OpenGL link implictly with X" >&5 | |
6977 | -$as_echo_n "checking wether OpenGL link implictly with X... " >&6; } | |
6978 | -if ${ax_cv_check_gl_link_with_x+:} false; then : | |
6979 | - $as_echo_n "(cached) " >&6 | |
6980 | -else | |
6981 | 5044 | |
6982 | - # try if opengl need X | |
6983 | 5045 | ac_ext=c |
6984 | 5046 | ac_cpp='$CPP $CPPFLAGS' |
6985 | 5047 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6986 | 5048 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6987 | 5049 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6988 | 5050 | |
6989 | - ax_check_gl_saved_libs="${LIBS}" | |
6990 | -ax_check_gl_saved_cflags="${CFLAGS}" | |
6991 | -ax_check_gl_saved_cppflags="${CPPFLAGS}" | |
6992 | -ax_check_gl_saved_ldflags="${LDFLAGS}" | |
6993 | 5051 | |
6994 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6995 | - LIBS="${GL_LIBS} ${LIBS}" | |
6996 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
6997 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6998 | -/* end confdefs.h. */ | |
6999 | 5052 | |
7000 | -/* Override any GCC internal prototype to avoid an error. | |
7001 | - Use char because int might match the return type of a GCC | |
7002 | - builtin and then its argument prototype would still apply. */ | |
7003 | -#ifdef __cplusplus | |
7004 | -extern "C" | |
7005 | -#endif | |
7006 | -char glXQueryVersion (); | |
7007 | -int | |
7008 | -main () | |
7009 | -{ | |
7010 | -return glXQueryVersion (); | |
7011 | - ; | |
7012 | - return 0; | |
7013 | -} | |
7014 | -_ACEOF | |
7015 | -if ac_fn_c_try_link "$LINENO"; then : | |
7016 | - ax_check_gl_link_implicitly_with_x="yes" | |
7017 | -else | |
7018 | - ax_check_gl_link_implicitly_with_x="no" | |
7019 | 5053 | fi |
7020 | -rm -f core conftest.err conftest.$ac_objext \ | |
7021 | - conftest$ac_exeext conftest.$ac_ext | |
7022 | - LIBS="${ax_check_gl_saved_libs}" | |
7023 | -CFLAGS="${ax_check_gl_saved_cflags}" | |
7024 | -CPPFLAGS="${ax_check_gl_saved_cppflags}" | |
7025 | -LDFLAGS="${ax_check_gl_saved_ldflags}" | |
7026 | - | |
7027 | - ac_ext=c | |
7028 | -ac_cpp='$CPP $CPPFLAGS' | |
7029 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7030 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7031 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7032 | 5054 | |
5055 | + for ac_header in windows.h | |
5056 | +do : | |
5057 | + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
5058 | +if test "x$ac_cv_header_windows_h" = xyes; then : | |
5059 | + cat >>confdefs.h <<_ACEOF | |
5060 | +#define HAVE_WINDOWS_H 1 | |
5061 | +_ACEOF | |
7033 | 5062 | |
7034 | - ax_cv_check_gl_link_with_x="${ax_check_gl_link_implicitly_with_x}" | |
7035 | -fi | |
7036 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_link_with_x" >&5 | |
7037 | -$as_echo "$ax_cv_check_gl_link_with_x" >&6; } | |
7038 | - if test "X${ax_cv_check_gl_link_with_x}" = "X${ax_check_gl_need_x}"; then : | |
7039 | - no_gl="no" | |
7040 | -else | |
7041 | - no_gl=yes | |
7042 | -fi | |
7043 | 5063 | fi |
7044 | 5064 | |
7045 | -fi | |
5065 | +done | |
7046 | 5066 | |
7047 | -fi | |
5067 | + ;; #( | |
5068 | + *) : | |
7048 | 5069 | |
7049 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working OpenGL implementation" >&5 | |
7050 | -$as_echo_n "checking for a working OpenGL implementation... " >&6; } | |
7051 | - if test "X$no_gl" = "Xno"; then : | |
7052 | - have_GL="yes" | |
7053 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7054 | -$as_echo "yes" >&6; } | |
7055 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS needed for OpenGL" >&5 | |
7056 | -$as_echo_n "checking for CFLAGS needed for OpenGL... " >&6; } | |
7057 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GL_CFLAGS}\"" >&5 | |
7058 | -$as_echo "\"${GL_CFLAGS}\"" >&6; } | |
7059 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBS needed for OpenGL" >&5 | |
7060 | -$as_echo_n "checking for LIBS needed for OpenGL... " >&6; } | |
7061 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GL_LIBS}\"" >&5 | |
7062 | -$as_echo "\"${GL_LIBS}\"" >&6; } | |
7063 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAGS needed for OpenGL" >&5 | |
7064 | -$as_echo_n "checking for LDFLAGS needed for OpenGL... " >&6; } | |
7065 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GL_LDFLAGS}\"" >&5 | |
7066 | -$as_echo "\"${GL_LDFLAGS}\"" >&6; } | |
7067 | -else | |
7068 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7069 | -$as_echo "no" >&6; } | |
7070 | - GL_CFLAGS="" | |
7071 | - GL_LIBS="" | |
7072 | - GL_LDFLAGS="" | |
7073 | -fi | |
7074 | 5070 | |
7075 | 5071 | |
7076 | 5072 | |
7077 | 5073 | |
7078 | 5074 | |
7079 | -ac_ext=cpp | |
7080 | -ac_cpp='$CXXCPP $CPPFLAGS' | |
7081 | -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7082 | -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7083 | -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7084 | -if test -z "$CXX"; then | |
7085 | - if test -n "$CCC"; then | |
7086 | - CXX=$CCC | |
7087 | - else | |
7088 | - if test -n "$ac_tool_prefix"; then | |
7089 | - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
7090 | - do | |
7091 | - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
7092 | -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
5075 | + | |
5076 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
5077 | + if test -n "$ac_tool_prefix"; then | |
5078 | + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
5079 | +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
7093 | 5080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7094 | 5081 | $as_echo_n "checking for $ac_word... " >&6; } |
7095 | -if ${ac_cv_prog_CXX+:} false; then : | |
5082 | +if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
7096 | 5083 | $as_echo_n "(cached) " >&6 |
7097 | 5084 | else |
7098 | - if test -n "$CXX"; then | |
7099 | - ac_cv_prog_CXX="$CXX" # Let the user override the test. | |
7100 | -else | |
7101 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5085 | + case $PKG_CONFIG in | |
5086 | + [\\/]* | ?:[\\/]*) | |
5087 | + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
5088 | + ;; | |
5089 | + *) | |
5090 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7102 | 5091 | for as_dir in $PATH |
7103 | 5092 | do |
7104 | 5093 | IFS=$as_save_IFS |
7105 | 5094 | test -z "$as_dir" && as_dir=. |
7106 | 5095 | for ac_exec_ext in '' $ac_executable_extensions; do |
7107 | 5096 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
7108 | - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | |
5097 | + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7109 | 5098 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7110 | 5099 | break 2 |
7111 | 5100 | fi |
@@ -7113,43 +5102,42 @@ done | ||
7113 | 5102 | done |
7114 | 5103 | IFS=$as_save_IFS |
7115 | 5104 | |
5105 | + ;; | |
5106 | +esac | |
7116 | 5107 | fi |
7117 | -fi | |
7118 | -CXX=$ac_cv_prog_CXX | |
7119 | -if test -n "$CXX"; then | |
7120 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 | |
7121 | -$as_echo "$CXX" >&6; } | |
5108 | +PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
5109 | +if test -n "$PKG_CONFIG"; then | |
5110 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
5111 | +$as_echo "$PKG_CONFIG" >&6; } | |
7122 | 5112 | else |
7123 | 5113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7124 | 5114 | $as_echo "no" >&6; } |
7125 | 5115 | fi |
7126 | 5116 | |
7127 | 5117 | |
7128 | - test -n "$CXX" && break | |
7129 | - done | |
7130 | 5118 | fi |
7131 | -if test -z "$CXX"; then | |
7132 | - ac_ct_CXX=$CXX | |
7133 | - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC | |
7134 | -do | |
7135 | - # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7136 | -set dummy $ac_prog; ac_word=$2 | |
5119 | +if test -z "$ac_cv_path_PKG_CONFIG"; then | |
5120 | + ac_pt_PKG_CONFIG=$PKG_CONFIG | |
5121 | + # Extract the first word of "pkg-config", so it can be a program name with args. | |
5122 | +set dummy pkg-config; ac_word=$2 | |
7137 | 5123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
7138 | 5124 | $as_echo_n "checking for $ac_word... " >&6; } |
7139 | -if ${ac_cv_prog_ac_ct_CXX+:} false; then : | |
5125 | +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
7140 | 5126 | $as_echo_n "(cached) " >&6 |
7141 | 5127 | else |
7142 | - if test -n "$ac_ct_CXX"; then | |
7143 | - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | |
7144 | -else | |
7145 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5128 | + case $ac_pt_PKG_CONFIG in | |
5129 | + [\\/]* | ?:[\\/]*) | |
5130 | + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
5131 | + ;; | |
5132 | + *) | |
5133 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7146 | 5134 | for as_dir in $PATH |
7147 | 5135 | do |
7148 | 5136 | IFS=$as_save_IFS |
7149 | 5137 | test -z "$as_dir" && as_dir=. |
7150 | 5138 | for ac_exec_ext in '' $ac_executable_extensions; do |
7151 | 5139 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
7152 | - ac_cv_prog_ac_ct_CXX="$ac_prog" | |
5140 | + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
7153 | 5141 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7154 | 5142 | break 2 |
7155 | 5143 | fi |
@@ -7157,23 +5145,20 @@ done | ||
7157 | 5145 | done |
7158 | 5146 | IFS=$as_save_IFS |
7159 | 5147 | |
5148 | + ;; | |
5149 | +esac | |
7160 | 5150 | fi |
7161 | -fi | |
7162 | -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | |
7163 | -if test -n "$ac_ct_CXX"; then | |
7164 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 | |
7165 | -$as_echo "$ac_ct_CXX" >&6; } | |
5151 | +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
5152 | +if test -n "$ac_pt_PKG_CONFIG"; then | |
5153 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
5154 | +$as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
7166 | 5155 | else |
7167 | 5156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
7168 | 5157 | $as_echo "no" >&6; } |
7169 | 5158 | fi |
7170 | 5159 | |
7171 | - | |
7172 | - test -n "$ac_ct_CXX" && break | |
7173 | -done | |
7174 | - | |
7175 | - if test "x$ac_ct_CXX" = x; then | |
7176 | - CXX="g++" | |
5160 | + if test "x$ac_pt_PKG_CONFIG" = x; then | |
5161 | + PKG_CONFIG="" | |
7177 | 5162 | else |
7178 | 5163 | case $cross_compiling:$ac_tool_warned in |
7179 | 5164 | yes:) |
@@ -7181,506 +5166,407 @@ yes:) | ||
7181 | 5166 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
7182 | 5167 | ac_tool_warned=yes ;; |
7183 | 5168 | esac |
7184 | - CXX=$ac_ct_CXX | |
5169 | + PKG_CONFIG=$ac_pt_PKG_CONFIG | |
7185 | 5170 | fi |
5171 | +else | |
5172 | + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
7186 | 5173 | fi |
7187 | 5174 | |
7188 | - fi | |
7189 | 5175 | fi |
7190 | -# Provide some information about the compiler. | |
7191 | -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 | |
7192 | -set X $ac_compile | |
7193 | -ac_compiler=$2 | |
7194 | -for ac_option in --version -v -V -qversion; do | |
7195 | - { { ac_try="$ac_compiler $ac_option >&5" | |
7196 | -case "(($ac_try" in | |
7197 | - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
7198 | - *) ac_try_echo=$ac_try;; | |
7199 | -esac | |
7200 | -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
7201 | -$as_echo "$ac_try_echo"; } >&5 | |
7202 | - (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
5176 | +if test -n "$PKG_CONFIG"; then | |
5177 | + _pkg_min_version=0.9.0 | |
5178 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
5179 | +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
5180 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
5181 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5182 | +$as_echo "yes" >&6; } | |
5183 | + else | |
5184 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5185 | +$as_echo "no" >&6; } | |
5186 | + PKG_CONFIG="" | |
5187 | + fi | |
5188 | +fi | |
5189 | + | |
5190 | +pkg_failed=no | |
5191 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5192 | +$as_echo_n "checking for GL... " >&6; } | |
5193 | + | |
5194 | +if test -n "$GL_CFLAGS"; then | |
5195 | + pkg_cv_GL_CFLAGS="$GL_CFLAGS" | |
5196 | + elif test -n "$PKG_CONFIG"; then | |
5197 | + if test -n "$PKG_CONFIG" && \ | |
5198 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5199 | + ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
7203 | 5200 | ac_status=$? |
7204 | - if test -s conftest.err; then | |
7205 | - sed '10a\ | |
7206 | -... rest of stderr output deleted ... | |
7207 | - 10q' conftest.err >conftest.er1 | |
7208 | - cat conftest.er1 >&5 | |
7209 | - fi | |
7210 | - rm -f conftest.er1 conftest.err | |
7211 | 5201 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
7212 | - test $ac_status = 0; } | |
7213 | -done | |
7214 | - | |
7215 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 | |
7216 | -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } | |
7217 | -if ${ac_cv_cxx_compiler_gnu+:} false; then : | |
7218 | - $as_echo_n "(cached) " >&6 | |
5202 | + test $ac_status = 0; }; then | |
5203 | + pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "gl" 2>/dev/null` | |
5204 | + test "x$?" != "x0" && pkg_failed=yes | |
7219 | 5205 | else |
7220 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7221 | -/* end confdefs.h. */ | |
5206 | + pkg_failed=yes | |
5207 | +fi | |
5208 | + else | |
5209 | + pkg_failed=untried | |
5210 | +fi | |
5211 | +if test -n "$GL_LIBS"; then | |
5212 | + pkg_cv_GL_LIBS="$GL_LIBS" | |
5213 | + elif test -n "$PKG_CONFIG"; then | |
5214 | + if test -n "$PKG_CONFIG" && \ | |
5215 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
5216 | + ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
5217 | + ac_status=$? | |
5218 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
5219 | + test $ac_status = 0; }; then | |
5220 | + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null` | |
5221 | + test "x$?" != "x0" && pkg_failed=yes | |
5222 | +else | |
5223 | + pkg_failed=yes | |
5224 | +fi | |
5225 | + else | |
5226 | + pkg_failed=untried | |
5227 | +fi | |
7222 | 5228 | |
7223 | -int | |
7224 | -main () | |
7225 | -{ | |
7226 | -#ifndef __GNUC__ | |
7227 | - choke me | |
7228 | -#endif | |
7229 | 5229 | |
7230 | - ; | |
7231 | - return 0; | |
7232 | -} | |
7233 | -_ACEOF | |
7234 | -if ac_fn_cxx_try_compile "$LINENO"; then : | |
7235 | - ac_compiler_gnu=yes | |
5230 | + | |
5231 | +if test $pkg_failed = yes; then | |
5232 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5233 | +$as_echo "no" >&6; } | |
5234 | + | |
5235 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5236 | + _pkg_short_errors_supported=yes | |
7236 | 5237 | else |
7237 | - ac_compiler_gnu=no | |
5238 | + _pkg_short_errors_supported=no | |
7238 | 5239 | fi |
7239 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7240 | -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | |
5240 | + if test $_pkg_short_errors_supported = yes; then | |
5241 | + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1` | |
5242 | + else | |
5243 | + GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1` | |
5244 | + fi | |
5245 | + # Put the nasty error message in config.log where it belongs | |
5246 | + echo "$GL_PKG_ERRORS" >&5 | |
5247 | + | |
5248 | + | |
5249 | + if test -n "$GL_LIBS"; then : | |
7241 | 5250 | |
7242 | -fi | |
7243 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 | |
7244 | -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } | |
7245 | -if test $ac_compiler_gnu = yes; then | |
7246 | - GXX=yes | |
7247 | 5251 | else |
7248 | - GXX= | |
5252 | + | |
5253 | + ax_check_gl_manual_libs_generic_extra_libs="GL gl" | |
5254 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
5255 | + as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
7249 | 5256 | fi |
7250 | -ac_test_CXXFLAGS=${CXXFLAGS+set} | |
7251 | -ac_save_CXXFLAGS=$CXXFLAGS | |
7252 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 | |
7253 | -$as_echo_n "checking whether $CXX accepts -g... " >&6; } | |
7254 | -if ${ac_cv_prog_cxx_g+:} false; then : | |
7255 | - $as_echo_n "(cached) " >&6 | |
7256 | -else | |
7257 | - ac_save_cxx_werror_flag=$ac_cxx_werror_flag | |
7258 | - ac_cxx_werror_flag=yes | |
7259 | - ac_cv_prog_cxx_g=no | |
7260 | - CXXFLAGS="-g" | |
7261 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7262 | -/* end confdefs.h. */ | |
7263 | 5257 | |
7264 | -int | |
7265 | -main () | |
7266 | -{ | |
7267 | 5258 | |
7268 | - ; | |
7269 | - return 0; | |
7270 | -} | |
7271 | -_ACEOF | |
7272 | -if ac_fn_cxx_try_compile "$LINENO"; then : | |
7273 | - ac_cv_prog_cxx_g=yes | |
7274 | -else | |
7275 | - CXXFLAGS="" | |
7276 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7277 | -/* end confdefs.h. */ | |
7278 | 5259 | |
7279 | -int | |
7280 | -main () | |
7281 | -{ | |
7282 | 5260 | |
7283 | - ; | |
7284 | - return 0; | |
7285 | -} | |
7286 | -_ACEOF | |
7287 | -if ac_fn_cxx_try_compile "$LINENO"; then : | |
5261 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
5262 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
5263 | + | |
5264 | + | |
5265 | + | |
5266 | + ac_ext=c | |
5267 | +ac_cpp='$CPP $CPPFLAGS' | |
5268 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5269 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5270 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7288 | 5271 | |
5272 | + | |
5273 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
5274 | +$as_echo_n "checking for library containing glBegin... " >&6; } | |
5275 | +if ${ac_cv_search_glBegin+:} false; then : | |
5276 | + $as_echo_n "(cached) " >&6 | |
7289 | 5277 | else |
7290 | - ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
7291 | - CXXFLAGS="-g" | |
7292 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5278 | + ac_func_search_save_LIBS=$LIBS | |
5279 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7293 | 5280 | /* end confdefs.h. */ |
7294 | 5281 | |
5282 | +/* Override any GCC internal prototype to avoid an error. | |
5283 | + Use char because int might match the return type of a GCC | |
5284 | + builtin and then its argument prototype would still apply. */ | |
5285 | +#ifdef __cplusplus | |
5286 | +extern "C" | |
5287 | +#endif | |
5288 | +char glBegin (); | |
7295 | 5289 | int |
7296 | 5290 | main () |
7297 | 5291 | { |
7298 | - | |
5292 | +return glBegin (); | |
7299 | 5293 | ; |
7300 | 5294 | return 0; |
7301 | 5295 | } |
7302 | 5296 | _ACEOF |
7303 | -if ac_fn_cxx_try_compile "$LINENO"; then : | |
7304 | - ac_cv_prog_cxx_g=yes | |
7305 | -fi | |
7306 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7307 | -fi | |
7308 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7309 | -fi | |
7310 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7311 | - ac_cxx_werror_flag=$ac_save_cxx_werror_flag | |
7312 | -fi | |
7313 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 | |
7314 | -$as_echo "$ac_cv_prog_cxx_g" >&6; } | |
7315 | -if test "$ac_test_CXXFLAGS" = set; then | |
7316 | - CXXFLAGS=$ac_save_CXXFLAGS | |
7317 | -elif test $ac_cv_prog_cxx_g = yes; then | |
7318 | - if test "$GXX" = yes; then | |
7319 | - CXXFLAGS="-g -O2" | |
5297 | +for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
5298 | + if test -z "$ac_lib"; then | |
5299 | + ac_res="none required" | |
7320 | 5300 | else |
7321 | - CXXFLAGS="-g" | |
5301 | + ac_res=-l$ac_lib | |
5302 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
7322 | 5303 | fi |
5304 | + if ac_fn_c_try_link "$LINENO"; then : | |
5305 | + ac_cv_search_glBegin=$ac_res | |
5306 | +fi | |
5307 | +rm -f core conftest.err conftest.$ac_objext \ | |
5308 | + conftest$ac_exeext | |
5309 | + if ${ac_cv_search_glBegin+:} false; then : | |
5310 | + break | |
5311 | +fi | |
5312 | +done | |
5313 | +if ${ac_cv_search_glBegin+:} false; then : | |
5314 | + | |
7323 | 5315 | else |
7324 | - if test "$GXX" = yes; then | |
7325 | - CXXFLAGS="-O2" | |
7326 | - else | |
7327 | - CXXFLAGS= | |
7328 | - fi | |
5316 | + ac_cv_search_glBegin=no | |
7329 | 5317 | fi |
7330 | -ac_ext=c | |
5318 | +rm conftest.$ac_ext | |
5319 | +LIBS=$ac_func_search_save_LIBS | |
5320 | +fi | |
5321 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
5322 | +$as_echo "$ac_cv_search_glBegin" >&6; } | |
5323 | +ac_res=$ac_cv_search_glBegin | |
5324 | +if test "$ac_res" != no; then : | |
5325 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5326 | + | |
5327 | + ax_check_gl_lib_opengl="yes" | |
5328 | + break | |
5329 | + | |
5330 | +fi | |
5331 | + | |
5332 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
5333 | + GL_LIBS="${ac_cv_search_glBegin}" | |
5334 | +fi | |
5335 | + | |
5336 | + | |
5337 | + | |
5338 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5339 | + | |
5340 | + | |
5341 | + | |
5342 | + | |
5343 | + ac_ext=c | |
7331 | 5344 | ac_cpp='$CPP $CPPFLAGS' |
7332 | 5345 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
7333 | 5346 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
7334 | 5347 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7335 | 5348 | |
7336 | -depcc="$CXX" am_compiler_list= | |
7337 | 5349 | |
7338 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 | |
7339 | -$as_echo_n "checking dependency style of $depcc... " >&6; } | |
7340 | -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : | |
7341 | - $as_echo_n "(cached) " >&6 | |
7342 | -else | |
7343 | - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
7344 | - # We make a subdir and do the tests there. Otherwise we can end up | |
7345 | - # making bogus files that we don't know about and never remove. For | |
7346 | - # instance it was reported that on HP-UX the gcc test will end up | |
7347 | - # making a dummy file named 'D' -- because '-MD' means "put the output | |
7348 | - # in D". | |
7349 | - rm -rf conftest.dir | |
7350 | - mkdir conftest.dir | |
7351 | - # Copy depcomp to subdir because otherwise we won't find it if we're | |
7352 | - # using a relative directory. | |
7353 | - cp "$am_depcomp" conftest.dir | |
7354 | - cd conftest.dir | |
7355 | - # We will build objects and dependencies in a subdirectory because | |
7356 | - # it helps to detect inapplicable dependency modes. For instance | |
7357 | - # both Tru64's cc and ICC support -MD to output dependencies as a | |
7358 | - # side effect of compilation, but ICC will put the dependencies in | |
7359 | - # the current directory while Tru64 will put them in the object | |
7360 | - # directory. | |
7361 | - mkdir sub | |
7362 | 5350 | |
7363 | - am_cv_CXX_dependencies_compiler_type=none | |
7364 | - if test "$am_compiler_list" = ""; then | |
7365 | - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | |
7366 | - fi | |
7367 | - am__universal=false | |
7368 | - case " $depcc " in #( | |
7369 | - *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
7370 | - esac | |
5351 | +fi | |
7371 | 5352 | |
7372 | - for depmode in $am_compiler_list; do | |
7373 | - # Setup a source with many dependencies, because some compilers | |
7374 | - # like to wrap large dependency lists on column 80 (with \), and | |
7375 | - # we should not choose a depcomp mode which is confused by this. | |
7376 | - # | |
7377 | - # We need to recreate these files for each test, as the compiler may | |
7378 | - # overwrite some of them when testing with obscure command lines. | |
7379 | - # This happens at least with the AIX C compiler. | |
7380 | - : > sub/conftest.c | |
7381 | - for i in 1 2 3 4 5 6; do | |
7382 | - echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
7383 | - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
7384 | - # Solaris 10 /bin/sh. | |
7385 | - echo '/* dummy */' > sub/conftst$i.h | |
7386 | - done | |
7387 | - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
5353 | +elif test $pkg_failed = untried; then | |
5354 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5355 | +$as_echo "no" >&6; } | |
7388 | 5356 | |
7389 | - # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
7390 | - # mode. It turns out that the SunPro C++ compiler does not properly | |
7391 | - # handle '-M -o', and we need to detect this. Also, some Intel | |
7392 | - # versions had trouble with output in subdirs. | |
7393 | - am__obj=sub/conftest.${OBJEXT-o} | |
7394 | - am__minus_obj="-o $am__obj" | |
7395 | - case $depmode in | |
7396 | - gcc) | |
7397 | - # This depmode causes a compiler race in universal mode. | |
7398 | - test "$am__universal" = false || continue | |
7399 | - ;; | |
7400 | - nosideeffect) | |
7401 | - # After this tag, mechanisms are not by side-effect, so they'll | |
7402 | - # only be used when explicitly requested. | |
7403 | - if test "x$enable_dependency_tracking" = xyes; then | |
7404 | - continue | |
7405 | - else | |
7406 | - break | |
7407 | - fi | |
7408 | - ;; | |
7409 | - msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
7410 | - # This compiler won't grok '-c -o', but also, the minuso test has | |
7411 | - # not run yet. These depmodes are late enough in the game, and | |
7412 | - # so weak that their functioning should not be impacted. | |
7413 | - am__obj=conftest.${OBJEXT-o} | |
7414 | - am__minus_obj= | |
7415 | - ;; | |
7416 | - none) break ;; | |
7417 | - esac | |
7418 | - if depmode=$depmode \ | |
7419 | - source=sub/conftest.c object=$am__obj \ | |
7420 | - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
7421 | - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
7422 | - >/dev/null 2>conftest.err && | |
7423 | - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
7424 | - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
7425 | - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
7426 | - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
7427 | - # icc doesn't choke on unknown options, it will just issue warnings | |
7428 | - # or remarks (even with -Werror). So we grep stderr for any message | |
7429 | - # that says an option was ignored or not supported. | |
7430 | - # When given -MP, icc 7.0 and 7.1 complain thusly: | |
7431 | - # icc: Command line warning: ignoring option '-M'; no argument required | |
7432 | - # The diagnosis changed in icc 8.0: | |
7433 | - # icc: Command line remark: option '-MP' not supported | |
7434 | - if (grep 'ignoring option' conftest.err || | |
7435 | - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
7436 | - am_cv_CXX_dependencies_compiler_type=$depmode | |
7437 | - break | |
7438 | - fi | |
7439 | - fi | |
7440 | - done | |
5357 | + if test -n "$GL_LIBS"; then : | |
7441 | 5358 | |
7442 | - cd .. | |
7443 | - rm -rf conftest.dir | |
7444 | 5359 | else |
7445 | - am_cv_CXX_dependencies_compiler_type=none | |
7446 | -fi | |
7447 | 5360 | |
5361 | + ax_check_gl_manual_libs_generic_extra_libs="GL gl" | |
5362 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
5363 | + as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
7448 | 5364 | fi |
7449 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 | |
7450 | -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } | |
7451 | -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type | |
7452 | 5365 | |
7453 | - if | |
7454 | - test "x$enable_dependency_tracking" != xno \ | |
7455 | - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then | |
7456 | - am__fastdepCXX_TRUE= | |
7457 | - am__fastdepCXX_FALSE='#' | |
7458 | -else | |
7459 | - am__fastdepCXX_TRUE='#' | |
7460 | - am__fastdepCXX_FALSE= | |
7461 | -fi | |
7462 | 5366 | |
7463 | 5367 | |
7464 | 5368 | |
5369 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
5370 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
7465 | 5371 | |
7466 | 5372 | |
7467 | 5373 | |
5374 | + ac_ext=c | |
5375 | +ac_cpp='$CPP $CPPFLAGS' | |
5376 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5377 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5378 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7468 | 5379 | |
7469 | - # set flags | |
7470 | - no_glu="yes" | |
7471 | - have_GLU="no" | |
7472 | 5380 | |
7473 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working OpenGL Utility (GLU) implementation by pkg-config" >&5 | |
7474 | -$as_echo_n "checking for a working OpenGL Utility (GLU) implementation by pkg-config... " >&6; } | |
7475 | - # try first pkgconfig | |
7476 | - if test "X${PKG_CONFIG}" = "X"; then : | |
7477 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7478 | -$as_echo "no" >&6; } | |
7479 | - ax_check_glu_pkg_config=no | |
5381 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
5382 | +$as_echo_n "checking for library containing glBegin... " >&6; } | |
5383 | +if ${ac_cv_search_glBegin+:} false; then : | |
5384 | + $as_echo_n "(cached) " >&6 | |
7480 | 5385 | else |
7481 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7482 | -$as_echo "yes" >&6; } | |
7483 | - | |
7484 | - | |
7485 | - | |
5386 | + ac_func_search_save_LIBS=$LIBS | |
5387 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5388 | +/* end confdefs.h. */ | |
7486 | 5389 | |
7487 | -pkg_failed=no | |
7488 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLU" >&5 | |
7489 | -$as_echo_n "checking for GLU... " >&6; } | |
5390 | +/* Override any GCC internal prototype to avoid an error. | |
5391 | + Use char because int might match the return type of a GCC | |
5392 | + builtin and then its argument prototype would still apply. */ | |
5393 | +#ifdef __cplusplus | |
5394 | +extern "C" | |
5395 | +#endif | |
5396 | +char glBegin (); | |
5397 | +int | |
5398 | +main () | |
5399 | +{ | |
5400 | +return glBegin (); | |
5401 | + ; | |
5402 | + return 0; | |
5403 | +} | |
5404 | +_ACEOF | |
5405 | +for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
5406 | + if test -z "$ac_lib"; then | |
5407 | + ac_res="none required" | |
5408 | + else | |
5409 | + ac_res=-l$ac_lib | |
5410 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5411 | + fi | |
5412 | + if ac_fn_c_try_link "$LINENO"; then : | |
5413 | + ac_cv_search_glBegin=$ac_res | |
5414 | +fi | |
5415 | +rm -f core conftest.err conftest.$ac_objext \ | |
5416 | + conftest$ac_exeext | |
5417 | + if ${ac_cv_search_glBegin+:} false; then : | |
5418 | + break | |
5419 | +fi | |
5420 | +done | |
5421 | +if ${ac_cv_search_glBegin+:} false; then : | |
7490 | 5422 | |
7491 | -if test -n "$GLU_CFLAGS"; then | |
7492 | - pkg_cv_GLU_CFLAGS="$GLU_CFLAGS" | |
7493 | - elif test -n "$PKG_CONFIG"; then | |
7494 | - if test -n "$PKG_CONFIG" && \ | |
7495 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5 | |
7496 | - ($PKG_CONFIG --exists --print-errors "glu") 2>&5 | |
7497 | - ac_status=$? | |
7498 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7499 | - test $ac_status = 0; }; then | |
7500 | - pkg_cv_GLU_CFLAGS=`$PKG_CONFIG --cflags "glu" 2>/dev/null` | |
7501 | - test "x$?" != "x0" && pkg_failed=yes | |
7502 | 5423 | else |
7503 | - pkg_failed=yes | |
5424 | + ac_cv_search_glBegin=no | |
7504 | 5425 | fi |
7505 | - else | |
7506 | - pkg_failed=untried | |
5426 | +rm conftest.$ac_ext | |
5427 | +LIBS=$ac_func_search_save_LIBS | |
7507 | 5428 | fi |
7508 | -if test -n "$GLU_LIBS"; then | |
7509 | - pkg_cv_GLU_LIBS="$GLU_LIBS" | |
7510 | - elif test -n "$PKG_CONFIG"; then | |
7511 | - if test -n "$PKG_CONFIG" && \ | |
7512 | - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5 | |
7513 | - ($PKG_CONFIG --exists --print-errors "glu") 2>&5 | |
7514 | - ac_status=$? | |
7515 | - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
7516 | - test $ac_status = 0; }; then | |
7517 | - pkg_cv_GLU_LIBS=`$PKG_CONFIG --libs "glu" 2>/dev/null` | |
7518 | - test "x$?" != "x0" && pkg_failed=yes | |
7519 | -else | |
7520 | - pkg_failed=yes | |
5429 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
5430 | +$as_echo "$ac_cv_search_glBegin" >&6; } | |
5431 | +ac_res=$ac_cv_search_glBegin | |
5432 | +if test "$ac_res" != no; then : | |
5433 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5434 | + | |
5435 | + ax_check_gl_lib_opengl="yes" | |
5436 | + break | |
5437 | + | |
7521 | 5438 | fi |
7522 | - else | |
7523 | - pkg_failed=untried | |
5439 | + | |
5440 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
5441 | + GL_LIBS="${ac_cv_search_glBegin}" | |
7524 | 5442 | fi |
7525 | 5443 | |
7526 | 5444 | |
7527 | 5445 | |
7528 | -if test $pkg_failed = yes; then | |
7529 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7530 | -$as_echo "no" >&6; } | |
5446 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5447 | + | |
5448 | + | |
5449 | + | |
5450 | + | |
5451 | + ac_ext=c | |
5452 | +ac_cpp='$CPP $CPPFLAGS' | |
5453 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5454 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5455 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5456 | + | |
5457 | + | |
7531 | 5458 | |
7532 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
7533 | - _pkg_short_errors_supported=yes | |
7534 | -else | |
7535 | - _pkg_short_errors_supported=no | |
7536 | 5459 | fi |
7537 | - if test $_pkg_short_errors_supported = yes; then | |
7538 | - GLU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glu" 2>&1` | |
7539 | - else | |
7540 | - GLU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glu" 2>&1` | |
7541 | - fi | |
7542 | - # Put the nasty error message in config.log where it belongs | |
7543 | - echo "$GLU_PKG_ERRORS" >&5 | |
7544 | 5460 | |
7545 | - ax_check_glu_pkg_config=no | |
7546 | -elif test $pkg_failed = untried; then | |
7547 | - { $as_echo "$as_me:${a |