fermisurfer Git
Revision | 6ee1840b58418ecb5d7abe138cc45f6ea5f9d71e (tree) |
---|---|
Zeit | 2018-03-07 16:21:03 |
Autor | ![]() |
Commiter | mitsuaki1987 |
Update version of autotools
@@ -1,7 +1,7 @@ | ||
1 | -# Makefile.in generated by automake 1.15 from Makefile.am. | |
1 | +# Makefile.in generated by automake 1.16 from Makefile.am. | |
2 | 2 | # @configure_input@ |
3 | 3 | |
4 | -# Copyright (C) 1994-2014 Free Software Foundation, Inc. | |
4 | +# Copyright (C) 1994-2018 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, |
@@ -134,7 +134,7 @@ am__recursive_targets = \ | ||
134 | 134 | $(RECURSIVE_CLEAN_TARGETS) \ |
135 | 135 | $(am__extra_recursive_targets) |
136 | 136 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ |
137 | - cscope distdir dist dist-all distcheck | |
137 | + cscope distdir distdir-am dist dist-all distcheck | |
138 | 138 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ |
139 | 139 | $(LISP)config.h.in |
140 | 140 | # Read a list of newline-separated strings from the standard input, |
@@ -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@ |
@@ -313,7 +305,6 @@ pdfdir = @pdfdir@ | ||
313 | 305 | prefix = @prefix@ |
314 | 306 | program_transform_name = @program_transform_name@ |
315 | 307 | psdir = @psdir@ |
316 | -runstatedir = @runstatedir@ | |
317 | 308 | sbindir = @sbindir@ |
318 | 309 | sharedstatedir = @sharedstatedir@ |
319 | 310 | srcdir = @srcdir@ |
@@ -351,8 +342,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
351 | 342 | echo ' $(SHELL) ./config.status'; \ |
352 | 343 | $(SHELL) ./config.status;; \ |
353 | 344 | *) \ |
354 | - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | |
355 | - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | |
345 | + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ | |
346 | + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ | |
356 | 347 | esac; |
357 | 348 | |
358 | 349 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
@@ -485,7 +476,10 @@ distclean-tags: | ||
485 | 476 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags |
486 | 477 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files |
487 | 478 | |
488 | -distdir: $(DISTFILES) | |
479 | +distdir: $(BUILT_SOURCES) | |
480 | + $(MAKE) $(AM_MAKEFLAGS) distdir-am | |
481 | + | |
482 | +distdir-am: $(DISTFILES) | |
489 | 483 | $(am__remove_distdir) |
490 | 484 | test -d "$(distdir)" || mkdir "$(distdir)" |
491 | 485 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
@@ -550,7 +544,7 @@ distdir: $(DISTFILES) | ||
550 | 544 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ |
551 | 545 | || chmod -R a+r "$(distdir)" |
552 | 546 | dist-gzip: distdir |
553 | - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | |
547 | + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz | |
554 | 548 | $(am__post_remove_distdir) |
555 | 549 | |
556 | 550 | dist-bzip2: distdir |
@@ -576,7 +570,7 @@ dist-shar: distdir | ||
576 | 570 | @echo WARNING: "Support for shar distribution archives is" \ |
577 | 571 | "deprecated." >&2 |
578 | 572 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 |
579 | - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | |
573 | + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz | |
580 | 574 | $(am__post_remove_distdir) |
581 | 575 | |
582 | 576 | dist-zip: distdir |
@@ -594,7 +588,7 @@ dist dist-all: | ||
594 | 588 | distcheck: dist |
595 | 589 | case '$(DIST_ARCHIVES)' in \ |
596 | 590 | *.tar.gz*) \ |
597 | - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
591 | + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ | |
598 | 592 | *.tar.bz2*) \ |
599 | 593 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ |
600 | 594 | *.tar.lz*) \ |
@@ -604,7 +598,7 @@ distcheck: dist | ||
604 | 598 | *.tar.Z*) \ |
605 | 599 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ |
606 | 600 | *.shar.gz*) \ |
607 | - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ | |
601 | + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ | |
608 | 602 | *.zip*) \ |
609 | 603 | unzip $(distdir).zip ;;\ |
610 | 604 | esac |
@@ -1,6 +1,6 @@ | ||
1 | -# generated automatically by aclocal 1.15 -*- Autoconf -*- | |
1 | +# generated automatically by aclocal 1.16 -*- Autoconf -*- | |
2 | 2 | |
3 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
3 | +# Copyright (C) 1996-2018 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 | - | |
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 | 205 | |
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]) | |
836 | -]) | |
837 | - | |
838 | - | |
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}" | |
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])]) | |
854 | 489 | ]) |
855 | 490 | |
856 | 491 | |
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"]) | |
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]) | |
882 | 500 | ]) |
883 | 501 | |
884 | -# detect using pkgconfig | |
885 | -AC_DEFUN([_AX_CHECK_GLU_PKG_CONFIG], | |
886 | -[ | |
887 | - AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
888 | 502 | |
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,9 +937,149 @@ else | ||
1361 | 937 | fi |
1362 | 938 | ])dnl AX_OPENMP |
1363 | 939 | |
1364 | -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | |
1365 | -dnl serial 11 (pkg-config-0.29.1) | |
1366 | -dnl | |
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 | + | |
1080 | +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | |
1081 | +# serial 12 (pkg-config-0.29.2) | |
1082 | + | |
1367 | 1083 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
1368 | 1084 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
1369 | 1085 | dnl |
@@ -1404,7 +1120,7 @@ dnl | ||
1404 | 1120 | dnl See the "Since" comment for each macro you use to see what version |
1405 | 1121 | dnl of the macros you require. |
1406 | 1122 | m4_defun([PKG_PREREQ], |
1407 | -[m4_define([PKG_MACROS_VERSION], [0.29.1]) | |
1123 | +[m4_define([PKG_MACROS_VERSION], [0.29.2]) | |
1408 | 1124 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, |
1409 | 1125 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) |
1410 | 1126 | ])dnl PKG_PREREQ |
@@ -1505,7 +1221,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | ||
1505 | 1221 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
1506 | 1222 | |
1507 | 1223 | pkg_failed=no |
1508 | -AC_MSG_CHECKING([for $1]) | |
1224 | +AC_MSG_CHECKING([for $2]) | |
1509 | 1225 | |
1510 | 1226 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
1511 | 1227 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
@@ -1515,11 +1231,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. | ||
1515 | 1231 | See the pkg-config man page for more details.]) |
1516 | 1232 | |
1517 | 1233 | if test $pkg_failed = yes; then |
1518 | - AC_MSG_RESULT([no]) | |
1234 | + AC_MSG_RESULT([no]) | |
1519 | 1235 | _PKG_SHORT_ERRORS_SUPPORTED |
1520 | 1236 | if test $_pkg_short_errors_supported = yes; then |
1521 | 1237 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
1522 | - else | |
1238 | + else | |
1523 | 1239 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
1524 | 1240 | fi |
1525 | 1241 | # Put the nasty error message in config.log where it belongs |
@@ -1536,7 +1252,7 @@ installed software in a non-standard prefix. | ||
1536 | 1252 | _PKG_TEXT])[]dnl |
1537 | 1253 | ]) |
1538 | 1254 | elif test $pkg_failed = untried; then |
1539 | - AC_MSG_RESULT([no]) | |
1255 | + AC_MSG_RESULT([no]) | |
1540 | 1256 | m4_default([$4], [AC_MSG_FAILURE( |
1541 | 1257 | [The pkg-config script could not be found or is too old. Make sure it |
1542 | 1258 | is in your PATH or set the PKG_CONFIG environment variable to the full |
@@ -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-2018 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, |
@@ -1649,10 +1365,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl | ||
1649 | 1365 | # generated from the m4 files accompanying Automake X.Y. |
1650 | 1366 | # (This private macro should not be called outside this file.) |
1651 | 1367 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
1652 | -[am__api_version='1.15' | |
1368 | +[am__api_version='1.16' | |
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.16], [], | |
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.16])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-2018 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-2018 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-2018 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,13 +1665,12 @@ _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-2018 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, |
1956 | 1672 | # with or without modifications, as long as this notice is preserved. |
1957 | 1673 | |
1958 | - | |
1959 | 1674 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
1960 | 1675 | # ------------------------------ |
1961 | 1676 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
@@ -1963,49 +1678,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
1963 | 1678 | # Older Autoconf quotes --file arguments for eval, but not when files |
1964 | 1679 | # are listed without --file. Let's play safe and only enable the eval |
1965 | 1680 | # if we detect the quoting. |
1966 | - case $CONFIG_FILES in | |
1967 | - *\'*) eval set x "$CONFIG_FILES" ;; | |
1968 | - *) set x $CONFIG_FILES ;; | |
1969 | - esac | |
1681 | + # TODO: see whether this extra hack can be removed once we start | |
1682 | + # requiring Autoconf 2.70 or later. | |
1683 | + AS_CASE([$CONFIG_FILES], | |
1684 | + [*\'*], [eval set x "$CONFIG_FILES"], | |
1685 | + [*], [set x $CONFIG_FILES]) | |
1970 | 1686 | shift |
1971 | - for mf | |
1687 | + # Used to flag and report bootstrapping failures. | |
1688 | + am_rc=0 | |
1689 | + for am_mf | |
1972 | 1690 | do |
1973 | 1691 | # Strip MF so we end up with the name of the file. |
1974 | - mf=`echo "$mf" | sed -e 's/:.*$//'` | |
1975 | - # Check whether this is an Automake generated Makefile or not. | |
1976 | - # We used to match only the files named 'Makefile.in', but | |
1977 | - # some people rename them; so instead we look at the file content. | |
1978 | - # Grep'ing the first line is not enough: some people post-process | |
1979 | - # each Makefile.in and add a new line on top of each file to say so. | |
1980 | - # Grep'ing the whole file is not good either: AIX grep has a line | |
1692 | + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` | |
1693 | + # Check whether this is an Automake generated Makefile which includes | |
1694 | + # dependency-tracking related rules and includes. | |
1695 | + # Grep'ing the whole file directly is not great: AIX grep has a line | |
1981 | 1696 | # limit of 2048, but all sed's we know have understand at least 4000. |
1982 | - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
1983 | - dirpart=`AS_DIRNAME("$mf")` | |
1984 | - else | |
1985 | - continue | |
1986 | - fi | |
1987 | - # Extract the definition of DEPDIR, am__include, and am__quote | |
1988 | - # from the Makefile without running 'make'. | |
1989 | - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
1990 | - test -z "$DEPDIR" && continue | |
1991 | - am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
1992 | - test -z "$am__include" && continue | |
1993 | - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
1994 | - # Find all dependency output files, they are included files with | |
1995 | - # $(DEPDIR) in their names. We invoke sed twice because it is the | |
1996 | - # simplest approach to changing $(DEPDIR) to its actual value in the | |
1997 | - # expansion. | |
1998 | - for file in `sed -n " | |
1999 | - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
2000 | - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | |
2001 | - # Make sure the directory exists. | |
2002 | - test -f "$dirpart/$file" && continue | |
2003 | - fdir=`AS_DIRNAME(["$file"])` | |
2004 | - AS_MKDIR_P([$dirpart/$fdir]) | |
2005 | - # echo "creating $dirpart/$file" | |
2006 | - echo '# dummy' > "$dirpart/$file" | |
2007 | - done | |
1697 | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ | |
1698 | + || continue | |
1699 | + am_dirpart=`AS_DIRNAME(["$am_mf"])` | |
1700 | + am_filepart=`AS_BASENAME(["$am_mf"])` | |
1701 | + AM_RUN_LOG([cd "$am_dirpart" \ | |
1702 | + && sed -e '/# am--include-marker/d' "$am_filepart" \ | |
1703 | + | $MAKE -f - am--depfiles]) || am_rc=$? | |
2008 | 1704 | done |
1705 | + if test $am_rc -ne 0; then | |
1706 | + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments | |
1707 | + for automatic dependency tracking. Try re-running configure with the | |
1708 | + '--disable-dependency-tracking' option to at least be able to build | |
1709 | + the package (albeit without support for automatic dependency tracking).]) | |
1710 | + fi | |
1711 | + AS_UNSET([am_dirpart]) | |
1712 | + AS_UNSET([am_filepart]) | |
1713 | + AS_UNSET([am_mf]) | |
1714 | + AS_UNSET([am_rc]) | |
1715 | + rm -f conftest-deps.mk | |
2009 | 1716 | } |
2010 | 1717 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
2011 | 1718 |
@@ -2014,18 +1721,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
2014 | 1721 | # ----------------------------- |
2015 | 1722 | # This macro should only be invoked once -- use via AC_REQUIRE. |
2016 | 1723 | # |
2017 | -# This code is only required when automatic dependency tracking | |
2018 | -# is enabled. FIXME. This creates each '.P' file that we will | |
2019 | -# need in order to bootstrap the dependency handling code. | |
1724 | +# This code is only required when automatic dependency tracking is enabled. | |
1725 | +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in | |
1726 | +# order to bootstrap the dependency handling code. | |
2020 | 1727 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
2021 | 1728 | [AC_CONFIG_COMMANDS([depfiles], |
2022 | 1729 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
2023 | - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
2024 | -]) | |
1730 | + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) | |
2025 | 1731 | |
2026 | 1732 | # Do all the work for Automake. -*- Autoconf -*- |
2027 | 1733 | |
2028 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
1734 | +# Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
2029 | 1735 | # |
2030 | 1736 | # This file is free software; the Free Software Foundation |
2031 | 1737 | # gives unlimited permission to copy and/or distribute it, |
@@ -2112,8 +1818,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | ||
2112 | 1818 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
2113 | 1819 | # For better backward compatibility. To be removed once Automake 1.9.x |
2114 | 1820 | # dies out for good. For more background, see: |
2115 | -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
2116 | -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
1821 | +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
1822 | +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
2117 | 1823 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) |
2118 | 1824 | # We need awk for the "check" target (and possibly the TAP driver). The |
2119 | 1825 | # system "awk" is bad on some platforms. |
@@ -2180,7 +1886,7 @@ END | ||
2180 | 1886 | Aborting the configuration process, to ensure you take notice of the issue. |
2181 | 1887 | |
2182 | 1888 | You can download and install GNU coreutils to get an 'rm' implementation |
2183 | -that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
1889 | +that behaves properly: <https://www.gnu.org/software/coreutils/>. | |
2184 | 1890 | |
2185 | 1891 | If you want to complete the configuration process using your problematic |
2186 | 1892 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
@@ -2222,7 +1928,7 @@ for _am_header in $config_headers :; do | ||
2222 | 1928 | done |
2223 | 1929 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
2224 | 1930 | |
2225 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1931 | +# Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2226 | 1932 | # |
2227 | 1933 | # This file is free software; the Free Software Foundation |
2228 | 1934 | # gives unlimited permission to copy and/or distribute it, |
@@ -2243,7 +1949,7 @@ if test x"${install_sh+set}" != xset; then | ||
2243 | 1949 | fi |
2244 | 1950 | AC_SUBST([install_sh])]) |
2245 | 1951 | |
2246 | -# Copyright (C) 2003-2014 Free Software Foundation, Inc. | |
1952 | +# Copyright (C) 2003-2018 Free Software Foundation, Inc. | |
2247 | 1953 | # |
2248 | 1954 | # This file is free software; the Free Software Foundation |
2249 | 1955 | # gives unlimited permission to copy and/or distribute it, |
@@ -2264,7 +1970,7 @@ AC_SUBST([am__leading_dot])]) | ||
2264 | 1970 | |
2265 | 1971 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
2266 | 1972 | |
2267 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
1973 | +# Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2268 | 1974 | # |
2269 | 1975 | # This file is free software; the Free Software Foundation |
2270 | 1976 | # gives unlimited permission to copy and/or distribute it, |
@@ -2272,49 +1978,42 @@ AC_SUBST([am__leading_dot])]) | ||
2272 | 1978 | |
2273 | 1979 | # AM_MAKE_INCLUDE() |
2274 | 1980 | # ----------------- |
2275 | -# Check to see how make treats includes. | |
1981 | +# Check whether make has an 'include' directive that can support all | |
1982 | +# the idioms we need for our automatic dependency tracking code. | |
2276 | 1983 | AC_DEFUN([AM_MAKE_INCLUDE], |
2277 | -[am_make=${MAKE-make} | |
2278 | -cat > confinc << 'END' | |
1984 | +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) | |
1985 | +cat > confinc.mk << 'END' | |
2279 | 1986 | am__doit: |
2280 | - @echo this is the am__doit target | |
1987 | + @echo this is the am__doit target >confinc.out | |
2281 | 1988 | .PHONY: am__doit |
2282 | 1989 | END |
2283 | -# If we don't find an include directive, just comment out the code. | |
2284 | -AC_MSG_CHECKING([for style of include used by $am_make]) | |
2285 | 1990 | am__include="#" |
2286 | 1991 | am__quote= |
2287 | -_am_result=none | |
2288 | -# First try GNU make style include. | |
2289 | -echo "include confinc" > confmf | |
2290 | -# Ignore all kinds of additional output from 'make'. | |
2291 | -case `$am_make -s -f confmf 2> /dev/null` in #( | |
2292 | -*the\ am__doit\ target*) | |
2293 | - am__include=include | |
2294 | - am__quote= | |
2295 | - _am_result=GNU | |
2296 | - ;; | |
2297 | -esac | |
2298 | -# Now try BSD make style include. | |
2299 | -if test "$am__include" = "#"; then | |
2300 | - echo '.include "confinc"' > confmf | |
2301 | - case `$am_make -s -f confmf 2> /dev/null` in #( | |
2302 | - *the\ am__doit\ target*) | |
2303 | - am__include=.include | |
2304 | - am__quote="\"" | |
2305 | - _am_result=BSD | |
2306 | - ;; | |
2307 | - esac | |
2308 | -fi | |
2309 | -AC_SUBST([am__include]) | |
2310 | -AC_SUBST([am__quote]) | |
2311 | -AC_MSG_RESULT([$_am_result]) | |
2312 | -rm -f confinc confmf | |
2313 | -]) | |
1992 | +# BSD make does it like this. | |
1993 | +echo '.include "confinc.mk" # ignored' > confmf.BSD | |
1994 | +# Other make implementations (GNU, Solaris 10, AIX) do it like this. | |
1995 | +echo 'include confinc.mk # ignored' > confmf.GNU | |
1996 | +_am_result=no | |
1997 | +for s in GNU BSD; do | |
1998 | + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) | |
1999 | + AS_CASE([$?:`cat confinc.out 2>/dev/null`], | |
2000 | + ['0:this is the am__doit target'], | |
2001 | + [AS_CASE([$s], | |
2002 | + [BSD], [am__include='.include' am__quote='"'], | |
2003 | + [am__include='include' am__quote=''])]) | |
2004 | + if test "$am__include" != "#"; then | |
2005 | + _am_result="yes ($s style)" | |
2006 | + break | |
2007 | + fi | |
2008 | +done | |
2009 | +rm -f confinc.* confmf.* | |
2010 | +AC_MSG_RESULT([${_am_result}]) | |
2011 | +AC_SUBST([am__include])]) | |
2012 | +AC_SUBST([am__quote])]) | |
2314 | 2013 | |
2315 | 2014 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
2316 | 2015 | |
2317 | -# Copyright (C) 1997-2014 Free Software Foundation, Inc. | |
2016 | +# Copyright (C) 1997-2018 Free Software Foundation, Inc. | |
2318 | 2017 | # |
2319 | 2018 | # This file is free software; the Free Software Foundation |
2320 | 2019 | # gives unlimited permission to copy and/or distribute it, |
@@ -2353,7 +2052,7 @@ fi | ||
2353 | 2052 | |
2354 | 2053 | # Helper functions for option handling. -*- Autoconf -*- |
2355 | 2054 | |
2356 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2055 | +# Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2357 | 2056 | # |
2358 | 2057 | # This file is free software; the Free Software Foundation |
2359 | 2058 | # gives unlimited permission to copy and/or distribute it, |
@@ -2382,7 +2081,7 @@ AC_DEFUN([_AM_SET_OPTIONS], | ||
2382 | 2081 | AC_DEFUN([_AM_IF_OPTION], |
2383 | 2082 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
2384 | 2083 | |
2385 | -# Copyright (C) 1999-2014 Free Software Foundation, Inc. | |
2084 | +# Copyright (C) 1999-2018 Free Software Foundation, Inc. | |
2386 | 2085 | # |
2387 | 2086 | # This file is free software; the Free Software Foundation |
2388 | 2087 | # gives unlimited permission to copy and/or distribute it, |
@@ -2429,7 +2128,7 @@ AC_LANG_POP([C])]) | ||
2429 | 2128 | # For backward compatibility. |
2430 | 2129 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
2431 | 2130 | |
2432 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2131 | +# Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2433 | 2132 | # |
2434 | 2133 | # This file is free software; the Free Software Foundation |
2435 | 2134 | # gives unlimited permission to copy and/or distribute it, |
@@ -2448,7 +2147,7 @@ AC_DEFUN([AM_RUN_LOG], | ||
2448 | 2147 | |
2449 | 2148 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
2450 | 2149 | |
2451 | -# Copyright (C) 1996-2014 Free Software Foundation, Inc. | |
2150 | +# Copyright (C) 1996-2018 Free Software Foundation, Inc. | |
2452 | 2151 | # |
2453 | 2152 | # This file is free software; the Free Software Foundation |
2454 | 2153 | # gives unlimited permission to copy and/or distribute it, |
@@ -2529,7 +2228,7 @@ AC_CONFIG_COMMANDS_PRE( | ||
2529 | 2228 | rm -f conftest.file |
2530 | 2229 | ]) |
2531 | 2230 | |
2532 | -# Copyright (C) 2009-2014 Free Software Foundation, Inc. | |
2231 | +# Copyright (C) 2009-2018 Free Software Foundation, Inc. | |
2533 | 2232 | # |
2534 | 2233 | # This file is free software; the Free Software Foundation |
2535 | 2234 | # gives unlimited permission to copy and/or distribute it, |
@@ -2589,7 +2288,7 @@ AC_SUBST([AM_BACKSLASH])dnl | ||
2589 | 2288 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
2590 | 2289 | ]) |
2591 | 2290 | |
2592 | -# Copyright (C) 2001-2014 Free Software Foundation, Inc. | |
2291 | +# Copyright (C) 2001-2018 Free Software Foundation, Inc. | |
2593 | 2292 | # |
2594 | 2293 | # This file is free software; the Free Software Foundation |
2595 | 2294 | # gives unlimited permission to copy and/or distribute it, |
@@ -2617,7 +2316,7 @@ fi | ||
2617 | 2316 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
2618 | 2317 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
2619 | 2318 | |
2620 | -# Copyright (C) 2006-2014 Free Software Foundation, Inc. | |
2319 | +# Copyright (C) 2006-2018 Free Software Foundation, Inc. | |
2621 | 2320 | # |
2622 | 2321 | # This file is free software; the Free Software Foundation |
2623 | 2322 | # gives unlimited permission to copy and/or distribute it, |
@@ -2636,7 +2335,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | ||
2636 | 2335 | |
2637 | 2336 | # Check how to create a tarball. -*- Autoconf -*- |
2638 | 2337 | |
2639 | -# Copyright (C) 2004-2014 Free Software Foundation, Inc. | |
2338 | +# Copyright (C) 2004-2018 Free Software Foundation, Inc. | |
2640 | 2339 | # |
2641 | 2340 | # This file is free software; the Free Software Foundation |
2642 | 2341 | # 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,10 +625,8 @@ 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 | 630 | am__fastdepCXX_FALSE |
633 | 631 | am__fastdepCXX_TRUE |
634 | 632 | CXXDEPMODE |
@@ -637,13 +635,9 @@ CXXFLAGS | ||
637 | 635 | CXX |
638 | 636 | GLU_LIBS |
639 | 637 | GLU_CFLAGS |
640 | -GL_LDFLAGS | |
641 | -X_EXTRA_LIBS | |
642 | -X_LIBS | |
643 | -X_PRE_LIBS | |
644 | -X_CFLAGS | |
645 | 638 | EGREP |
646 | 639 | GREP |
640 | +CPP | |
647 | 641 | GL_LIBS |
648 | 642 | GL_CFLAGS |
649 | 643 | PKG_CONFIG_LIBDIR |
@@ -657,8 +651,6 @@ build_os | ||
657 | 651 | build_vendor |
658 | 652 | build_cpu |
659 | 653 | build |
660 | -CPP | |
661 | -XMKMF | |
662 | 654 | am__fastdepCC_FALSE |
663 | 655 | am__fastdepCC_TRUE |
664 | 656 | CCDEPMODE |
@@ -666,7 +658,6 @@ am__nodep | ||
666 | 658 | AMDEPBACKSLASH |
667 | 659 | AMDEP_FALSE |
668 | 660 | AMDEP_TRUE |
669 | -am__quote | |
670 | 661 | am__include |
671 | 662 | DEPDIR |
672 | 663 | OBJEXT |
@@ -722,7 +713,6 @@ infodir | ||
722 | 713 | docdir |
723 | 714 | oldincludedir |
724 | 715 | includedir |
725 | -runstatedir | |
726 | 716 | localstatedir |
727 | 717 | sharedstatedir |
728 | 718 | sysconfdir |
@@ -741,16 +731,15 @@ PACKAGE_VERSION | ||
741 | 731 | PACKAGE_TARNAME |
742 | 732 | PACKAGE_NAME |
743 | 733 | PATH_SEPARATOR |
744 | -SHELL' | |
734 | +SHELL | |
735 | +am__quote' | |
745 | 736 | ac_subst_files='' |
746 | 737 | ac_user_opts=' |
747 | 738 | enable_option_checking |
748 | 739 | enable_silent_rules |
749 | 740 | enable_dependency_tracking |
750 | 741 | with_openmp |
751 | -with_x | |
752 | -with_gl | |
753 | -with_Mesa | |
742 | +with_xquartz_gl | |
754 | 743 | ' |
755 | 744 | ac_precious_vars='build_alias |
756 | 745 | host_alias |
@@ -760,18 +749,19 @@ CFLAGS | ||
760 | 749 | LDFLAGS |
761 | 750 | LIBS |
762 | 751 | CPPFLAGS |
763 | -XMKMF | |
764 | -CPP | |
765 | 752 | PKG_CONFIG |
766 | 753 | PKG_CONFIG_PATH |
767 | 754 | PKG_CONFIG_LIBDIR |
768 | 755 | GL_CFLAGS |
769 | 756 | GL_LIBS |
757 | +CPP | |
770 | 758 | GLU_CFLAGS |
771 | 759 | GLU_LIBS |
772 | 760 | CXX |
773 | 761 | CXXFLAGS |
774 | -CCC' | |
762 | +CCC | |
763 | +GLUT_CFLAGS | |
764 | +GLUT_LIBS' | |
775 | 765 | |
776 | 766 | |
777 | 767 | # Initialize some variables set by options. |
@@ -810,7 +800,6 @@ datadir='${datarootdir}' | ||
810 | 800 | sysconfdir='${prefix}/etc' |
811 | 801 | sharedstatedir='${prefix}/com' |
812 | 802 | localstatedir='${prefix}/var' |
813 | -runstatedir='${localstatedir}/run' | |
814 | 803 | includedir='${prefix}/include' |
815 | 804 | oldincludedir='/usr/include' |
816 | 805 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
@@ -1063,15 +1052,6 @@ do | ||
1063 | 1052 | | -silent | --silent | --silen | --sile | --sil) |
1064 | 1053 | silent=yes ;; |
1065 | 1054 | |
1066 | - -runstatedir | --runstatedir | --runstatedi | --runstated \ | |
1067 | - | --runstate | --runstat | --runsta | --runst | --runs \ | |
1068 | - | --run | --ru | --r) | |
1069 | - ac_prev=runstatedir ;; | |
1070 | - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | |
1071 | - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | |
1072 | - | --run=* | --ru=* | --r=*) | |
1073 | - runstatedir=$ac_optarg ;; | |
1074 | - | |
1075 | 1055 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
1076 | 1056 | ac_prev=sbindir ;; |
1077 | 1057 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
@@ -1209,7 +1189,7 @@ fi | ||
1209 | 1189 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
1210 | 1190 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
1211 | 1191 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
1212 | - libdir localedir mandir runstatedir | |
1192 | + libdir localedir mandir | |
1213 | 1193 | do |
1214 | 1194 | eval ac_val=\$$ac_var |
1215 | 1195 | # Remove trailing slashes. |
@@ -1362,7 +1342,6 @@ Fine tuning of the installation directories: | ||
1362 | 1342 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
1363 | 1343 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
1364 | 1344 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
1365 | - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] | |
1366 | 1345 | --libdir=DIR object code libraries [EPREFIX/lib] |
1367 | 1346 | --includedir=DIR C header files [PREFIX/include] |
1368 | 1347 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
@@ -1385,10 +1364,6 @@ Program names: | ||
1385 | 1364 | --program-suffix=SUFFIX append SUFFIX to installed program names |
1386 | 1365 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names |
1387 | 1366 | |
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 | 1367 | System types: |
1393 | 1368 | --build=BUILD configure for building on BUILD [guessed] |
1394 | 1369 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
@@ -1417,13 +1392,10 @@ Optional Packages: | ||
1417 | 1392 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
1418 | 1393 | --with-openmp compile with OpenMP (parallelization) support. If |
1419 | 1394 | 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] | |
1395 | + --with-xquartz-gl[=DIR] On Mac OSX, use opengl provided by X11/XQuartz | |
1396 | + instead of the built-in framework. If enabled, the | |
1397 | + default location is [DIR=/opt/X11]. This option is | |
1398 | + default to false. | |
1427 | 1399 | |
1428 | 1400 | Some influential environment variables: |
1429 | 1401 | CC C compiler command |
@@ -1433,19 +1405,20 @@ Some influential environment variables: | ||
1433 | 1405 | LIBS libraries to pass to the linker, e.g. -l<library> |
1434 | 1406 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
1435 | 1407 | you have headers in a nonstandard directory <include dir> |
1436 | - XMKMF Path to xmkmf, Makefile generator for X Window System | |
1437 | - CPP C preprocessor | |
1438 | 1408 | PKG_CONFIG path to pkg-config utility |
1439 | 1409 | PKG_CONFIG_PATH |
1440 | 1410 | directories to add to pkg-config's search path |
1441 | 1411 | PKG_CONFIG_LIBDIR |
1442 | 1412 | 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 | |
1413 | + GL_CFLAGS C compiler flags for GL, overriding configure script defaults | |
1414 | + GL_LIBS Linker flags for GL, overriding configure script defaults | |
1415 | + CPP C preprocessor | |
1416 | + GLU_CFLAGS C compiler flags for GLU, overriding system check | |
1417 | + GLU_LIBS Linker flags for GLU, overriding system check | |
1447 | 1418 | CXX C++ compiler command |
1448 | 1419 | CXXFLAGS C++ compiler flags |
1420 | + GLUT_CFLAGS C compiler flags for GLUT, overriding configure script defaults | |
1421 | + GLUT_LIBS Linker flags for GLUT, overriding configure script defaults | |
1449 | 1422 | |
1450 | 1423 | Use these variables to override the choices made by `configure' or to help |
1451 | 1424 | it to find libraries and programs with nonstandard names/locations. |
@@ -1648,36 +1621,96 @@ fi | ||
1648 | 1621 | |
1649 | 1622 | } # ac_fn_c_try_cpp |
1650 | 1623 | |
1651 | -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1624 | +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES | |
1652 | 1625 | # ------------------------------------------------------- |
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 () | |
1626 | +# Tests whether HEADER exists, giving a warning if it cannot be compiled using | |
1627 | +# the include files in INCLUDES and setting the cache variable VAR | |
1628 | +# accordingly. | |
1629 | +ac_fn_c_check_header_mongrel () | |
1656 | 1630 | { |
1657 | 1631 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1632 | + if eval \${$3+:} false; then : | |
1658 | 1633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
1659 | 1634 | $as_echo_n "checking for $2... " >&6; } |
1660 | 1635 | if eval \${$3+:} false; then : |
1661 | 1636 | $as_echo_n "(cached) " >&6 |
1637 | +fi | |
1638 | +eval ac_res=\$$3 | |
1639 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
1640 | +$as_echo "$ac_res" >&6; } | |
1662 | 1641 | else |
1663 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1642 | + # Is the header compilable? | |
1643 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 | |
1644 | +$as_echo_n "checking $2 usability... " >&6; } | |
1645 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1664 | 1646 | /* end confdefs.h. */ |
1665 | 1647 | $4 |
1666 | 1648 | #include <$2> |
1667 | 1649 | _ACEOF |
1668 | 1650 | if ac_fn_c_try_compile "$LINENO"; then : |
1669 | - eval "$3=yes" | |
1651 | + ac_header_compiler=yes | |
1670 | 1652 | else |
1671 | - eval "$3=no" | |
1653 | + ac_header_compiler=no | |
1672 | 1654 | fi |
1673 | 1655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
1656 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 | |
1657 | +$as_echo "$ac_header_compiler" >&6; } | |
1658 | + | |
1659 | +# Is the header present? | |
1660 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 | |
1661 | +$as_echo_n "checking $2 presence... " >&6; } | |
1662 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
1663 | +/* end confdefs.h. */ | |
1664 | +#include <$2> | |
1665 | +_ACEOF | |
1666 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
1667 | + ac_header_preproc=yes | |
1668 | +else | |
1669 | + ac_header_preproc=no | |
1670 | +fi | |
1671 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
1672 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 | |
1673 | +$as_echo "$ac_header_preproc" >&6; } | |
1674 | + | |
1675 | +# So? What about this header? | |
1676 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( | |
1677 | + yes:no: ) | |
1678 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 | |
1679 | +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
1680 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1681 | +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1682 | + ;; | |
1683 | + no:yes:* ) | |
1684 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 | |
1685 | +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} | |
1686 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 | |
1687 | +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} | |
1688 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 | |
1689 | +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} | |
1690 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 | |
1691 | +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} | |
1692 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 | |
1693 | +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} | |
1694 | +( $as_echo "## ------------------------------------------- ## | |
1695 | +## Report this to mkawamura@issp.u-tokyo.ac.jp ## | |
1696 | +## ------------------------------------------- ##" | |
1697 | + ) | sed "s/^/$as_me: WARNING: /" >&2 | |
1698 | + ;; | |
1699 | +esac | |
1700 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
1701 | +$as_echo_n "checking for $2... " >&6; } | |
1702 | +if eval \${$3+:} false; then : | |
1703 | + $as_echo_n "(cached) " >&6 | |
1704 | +else | |
1705 | + eval "$3=\$ac_header_compiler" | |
1674 | 1706 | fi |
1675 | 1707 | eval ac_res=\$$3 |
1676 | 1708 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
1677 | 1709 | $as_echo "$ac_res" >&6; } |
1710 | +fi | |
1678 | 1711 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1679 | 1712 | |
1680 | -} # ac_fn_c_check_header_compile | |
1713 | +} # ac_fn_c_check_header_mongrel | |
1681 | 1714 | |
1682 | 1715 | # ac_fn_c_try_run LINENO |
1683 | 1716 | # ---------------------- |
@@ -1721,10 +1754,11 @@ fi | ||
1721 | 1754 | |
1722 | 1755 | } # ac_fn_c_try_run |
1723 | 1756 | |
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 () | |
1757 | +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
1758 | +# ------------------------------------------------------- | |
1759 | +# Tests whether HEADER exists and can be compiled using the include files in | |
1760 | +# INCLUDES, setting the cache variable VAR accordingly. | |
1761 | +ac_fn_c_check_header_compile () | |
1728 | 1762 | { |
1729 | 1763 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
1730 | 1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
@@ -1734,59 +1768,22 @@ if eval \${$3+:} false; then : | ||
1734 | 1768 | else |
1735 | 1769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1736 | 1770 | /* 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 | -} | |
1771 | +$4 | |
1772 | +#include <$2> | |
1775 | 1773 | _ACEOF |
1776 | -if ac_fn_c_try_link "$LINENO"; then : | |
1774 | +if ac_fn_c_try_compile "$LINENO"; then : | |
1777 | 1775 | eval "$3=yes" |
1778 | 1776 | else |
1779 | 1777 | eval "$3=no" |
1780 | 1778 | fi |
1781 | -rm -f core conftest.err conftest.$ac_objext \ | |
1782 | - conftest$ac_exeext conftest.$ac_ext | |
1779 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
1783 | 1780 | fi |
1784 | 1781 | eval ac_res=\$$3 |
1785 | 1782 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
1786 | 1783 | $as_echo "$ac_res" >&6; } |
1787 | 1784 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
1788 | 1785 | |
1789 | -} # ac_fn_c_check_func | |
1786 | +} # ac_fn_c_check_header_compile | |
1790 | 1787 | |
1791 | 1788 | # ac_fn_cxx_try_compile LINENO |
1792 | 1789 | # ---------------------------- |
@@ -2206,7 +2203,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. | ||
2206 | 2203 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
2207 | 2204 | |
2208 | 2205 | |
2209 | -am__api_version='1.15' | |
2206 | +am__api_version='1.16' | |
2210 | 2207 | |
2211 | 2208 | # Find a good install program. We prefer a C program (faster), |
2212 | 2209 | # so one script is as good as another. But avoid the broken or |
@@ -2722,8 +2719,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | ||
2722 | 2719 | |
2723 | 2720 | # For better backward compatibility. To be removed once Automake 1.9.x |
2724 | 2721 | # dies out for good. For more background, see: |
2725 | -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
2726 | -# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
2722 | +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
2723 | +# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
2727 | 2724 | mkdir_p='$(MKDIR_P)' |
2728 | 2725 | |
2729 | 2726 | # We need awk for the "check" target (and possibly the TAP driver). The |
@@ -2774,7 +2771,7 @@ END | ||
2774 | 2771 | Aborting the configuration process, to ensure you take notice of the issue. |
2775 | 2772 | |
2776 | 2773 | You can download and install GNU coreutils to get an 'rm' implementation |
2777 | -that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
2774 | +that behaves properly: <https://www.gnu.org/software/coreutils/>. | |
2778 | 2775 | |
2779 | 2776 | If you want to complete the configuration process using your problematic |
2780 | 2777 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
@@ -3642,45 +3639,45 @@ DEPDIR="${am__leading_dot}deps" | ||
3642 | 3639 | |
3643 | 3640 | ac_config_commands="$ac_config_commands depfiles" |
3644 | 3641 | |
3645 | - | |
3646 | -am_make=${MAKE-make} | |
3647 | -cat > confinc << 'END' | |
3642 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 | |
3643 | +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } | |
3644 | +cat > confinc.mk << 'END' | |
3648 | 3645 | am__doit: |
3649 | - @echo this is the am__doit target | |
3646 | + @echo this is the am__doit target >confinc.out | |
3650 | 3647 | .PHONY: am__doit |
3651 | 3648 | END |
3652 | -# If we don't find an include directive, just comment out the code. | |
3653 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 | |
3654 | -$as_echo_n "checking for style of include used by $am_make... " >&6; } | |
3655 | 3649 | am__include="#" |
3656 | 3650 | am__quote= |
3657 | -_am_result=none | |
3658 | -# First try GNU make style include. | |
3659 | -echo "include confinc" > confmf | |
3660 | -# Ignore all kinds of additional output from 'make'. | |
3661 | -case `$am_make -s -f confmf 2> /dev/null` in #( | |
3662 | -*the\ am__doit\ target*) | |
3663 | - am__include=include | |
3664 | - am__quote= | |
3665 | - _am_result=GNU | |
3666 | - ;; | |
3667 | -esac | |
3668 | -# Now try BSD make style include. | |
3669 | -if test "$am__include" = "#"; then | |
3670 | - echo '.include "confinc"' > confmf | |
3671 | - case `$am_make -s -f confmf 2> /dev/null` in #( | |
3672 | - *the\ am__doit\ target*) | |
3673 | - am__include=.include | |
3674 | - am__quote="\"" | |
3675 | - _am_result=BSD | |
3651 | +# BSD make does it like this. | |
3652 | +echo '.include "confinc.mk" # ignored' > confmf.BSD | |
3653 | +# Other make implementations (GNU, Solaris 10, AIX) do it like this. | |
3654 | +echo 'include confinc.mk # ignored' > confmf.GNU | |
3655 | +_am_result=no | |
3656 | +for s in GNU BSD; do | |
3657 | + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 | |
3658 | + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 | |
3659 | + ac_status=$? | |
3660 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3661 | + (exit $ac_status); } | |
3662 | + case $?:`cat confinc.out 2>/dev/null` in #( | |
3663 | + '0:this is the am__doit target') : | |
3664 | + case $s in #( | |
3665 | + BSD) : | |
3666 | + am__include='.include' am__quote='"' ;; #( | |
3667 | + *) : | |
3668 | + am__include='include' am__quote='' ;; | |
3669 | +esac ;; #( | |
3670 | + *) : | |
3676 | 3671 | ;; |
3677 | - esac | |
3678 | -fi | |
3679 | - | |
3680 | - | |
3681 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 | |
3682 | -$as_echo "$_am_result" >&6; } | |
3683 | -rm -f confinc confmf | |
3672 | +esac | |
3673 | + if test "$am__include" != "#"; then | |
3674 | + _am_result="yes ($s style)" | |
3675 | + break | |
3676 | + fi | |
3677 | +done | |
3678 | +rm -f confinc.* confmf.* | |
3679 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 | |
3680 | +$as_echo "${_am_result}" >&6; } | |
3684 | 3681 | |
3685 | 3682 | # Check whether --enable-dependency-tracking was given. |
3686 | 3683 | if test "${enable_dependency_tracking+set}" = set; then : |
@@ -3852,9 +3849,12 @@ if ${ax_cv_c_openmp+:} false; then : | ||
3852 | 3849 | else |
3853 | 3850 | saveCFLAGS=$CFLAGS |
3854 | 3851 | 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" | |
3852 | +# Flags to try: -fopenmp (gcc), -mp (SGI & PGI), | |
3853 | +# -qopenmp (icc>=15), -openmp (icc), | |
3854 | +# -xopenmp (Sun), -omp (Tru64), | |
3855 | +# -qsmp=omp (AIX), | |
3856 | +# none | |
3857 | +ax_openmp_flags="-fopenmp -openmp -qopenmp -mp -xopenmp -omp -qsmp=omp none" | |
3858 | 3858 | if test "x$OPENMP_CFLAGS" != x; then |
3859 | 3859 | ax_openmp_flags="$OPENMP_CFLAGS $ax_openmp_flags" |
3860 | 3860 | fi |
@@ -3914,406 +3914,75 @@ fi | ||
3914 | 3914 | echo "" |
3915 | 3915 | echo " Check OpenGL and GLUT" |
3916 | 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 | -fi | |
3928 | -if test -z "$CPP"; then | |
3929 | - if ${ac_cv_prog_CPP+:} false; then : | |
3917 | +# Make sure we can run config.sub. | |
3918 | +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || | |
3919 | + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 | |
3920 | + | |
3921 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
3922 | +$as_echo_n "checking build system type... " >&6; } | |
3923 | +if ${ac_cv_build+:} false; then : | |
3930 | 3924 | $as_echo_n "(cached) " >&6 |
3931 | 3925 | 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 : | |
3926 | + ac_build_alias=$build_alias | |
3927 | +test "x$ac_build_alias" = x && | |
3928 | + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` | |
3929 | +test "x$ac_build_alias" = x && | |
3930 | + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
3931 | +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || | |
3932 | + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 | |
3954 | 3933 | |
3955 | -else | |
3956 | - # Broken: fails on valid input. | |
3957 | -continue | |
3958 | 3934 | fi |
3959 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
3935 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
3936 | +$as_echo "$ac_cv_build" >&6; } | |
3937 | +case $ac_cv_build in | |
3938 | +*-*-*) ;; | |
3939 | +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
3940 | +esac | |
3941 | +build=$ac_cv_build | |
3942 | +ac_save_IFS=$IFS; IFS='-' | |
3943 | +set x $ac_cv_build | |
3944 | +shift | |
3945 | +build_cpu=$1 | |
3946 | +build_vendor=$2 | |
3947 | +shift; shift | |
3948 | +# Remember, the first character of IFS is used to create $*, | |
3949 | +# except with old shells: | |
3950 | +build_os=$* | |
3951 | +IFS=$ac_save_IFS | |
3952 | +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
3960 | 3953 | |
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 | |
3954 | + | |
3955 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
3956 | +$as_echo_n "checking host system type... " >&6; } | |
3957 | +if ${ac_cv_host+:} false; then : | |
3958 | + $as_echo_n "(cached) " >&6 | |
3970 | 3959 | else |
3971 | - # Passes both tests. | |
3972 | -ac_preproc_ok=: | |
3973 | -break | |
3960 | + if test "x$host_alias" = x; then | |
3961 | + ac_cv_host=$ac_cv_build | |
3962 | +else | |
3963 | + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || | |
3964 | + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 | |
3974 | 3965 | fi |
3975 | -rm -f conftest.err conftest.i conftest.$ac_ext | |
3976 | 3966 | |
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 | |
3982 | 3967 | fi |
3983 | - | |
3984 | - done | |
3985 | - ac_cv_prog_CPP=$CPP | |
3986 | - | |
3987 | -fi | |
3988 | - CPP=$ac_cv_prog_CPP | |
3989 | -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 | |
3996 | -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 : | |
4013 | - | |
4014 | -else | |
4015 | - # Broken: fails on valid input. | |
4016 | -continue | |
4017 | -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 | -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 | - | |
4041 | -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; } | |
4046 | -fi | |
4047 | - | |
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 | - | |
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; | |
4062 | -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 : | |
4072 | - $as_echo_n "(cached) " >&6 | |
4073 | -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= | |
4166 | -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 | |
4171 | - fi | |
4172 | -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 | - 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 | |
4214 | - | |
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 | |
4225 | -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 | -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 | -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 | |
4293 | -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 | - | |
4298 | -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 | |
3968 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
3969 | +$as_echo "$ac_cv_host" >&6; } | |
3970 | +case $ac_cv_host in | |
3971 | +*-*-*) ;; | |
3972 | +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
3973 | +esac | |
3974 | +host=$ac_cv_host | |
3975 | +ac_save_IFS=$IFS; IFS='-' | |
3976 | +set x $ac_cv_host | |
3977 | +shift | |
3978 | +host_cpu=$1 | |
3979 | +host_vendor=$2 | |
3980 | +shift; shift | |
3981 | +# Remember, the first character of IFS is used to create $*, | |
3982 | +# except with old shells: | |
3983 | +host_os=$* | |
3984 | +IFS=$ac_save_IFS | |
3985 | +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
4317 | 3986 | |
4318 | 3987 | |
4319 | 3988 |
@@ -4436,99 +4105,268 @@ $as_echo "no" >&6; } | ||
4436 | 4105 | PKG_CONFIG="" |
4437 | 4106 | fi |
4438 | 4107 | 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 | 4108 | |
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 | |
4109 | + | |
4110 | +# Check whether --with-xquartz-gl was given. | |
4111 | +if test "${with_xquartz_gl+set}" = set; then : | |
4112 | + withval=$with_xquartz_gl; if test "X$with_xquartz_gl"="Xyes"; then : | |
4113 | + with_xquartz_gl="/opt/X11" | |
4114 | +fi | |
4492 | 4115 | else |
4493 | - ac_cv_path_GREP=$GREP | |
4116 | + with_xquartz_gl=no | |
4494 | 4117 | fi |
4495 | 4118 | |
4119 | + if test "X$with_xquartz_gl" != "Xno"; then : | |
4120 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking OSX X11 path" >&5 | |
4121 | +$as_echo_n "checking OSX X11 path... " >&6; } | |
4122 | + if test -e "$with_xquartz_gl"; then : | |
4123 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$with_xquartz_gl\"" >&5 | |
4124 | +$as_echo "\"$with_xquartz_gl\"" >&6; } | |
4125 | + CFLAGS="-I$with_xquartz_gl/include $CFLAGS" | |
4126 | + LIBS="-L$with_xquartz_gl/lib $LIBS" | |
4127 | + | |
4128 | +else | |
4129 | + with_xquartz_gl=no | |
4130 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4131 | +$as_echo "no" >&6; } | |
4132 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-xquartz-gl was given, but test for X11 failed. Fallback to system framework" >&5 | |
4133 | +$as_echo "$as_me: WARNING: --with-xquartz-gl was given, but test for X11 failed. Fallback to system framework" >&2;} | |
4134 | + | |
4496 | 4135 | 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 | 4136 | |
4137 | +fi | |
4501 | 4138 | |
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 : | |
4139 | +ac_ext=c | |
4140 | +ac_cpp='$CPP $CPPFLAGS' | |
4141 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4142 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4143 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4144 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
4145 | +$as_echo_n "checking how to run the C preprocessor... " >&6; } | |
4146 | +# On Suns, sometimes $CPP names a directory. | |
4147 | +if test -n "$CPP" && test -d "$CPP"; then | |
4148 | + CPP= | |
4149 | +fi | |
4150 | +if test -z "$CPP"; then | |
4151 | + if ${ac_cv_prog_CPP+:} false; then : | |
4505 | 4152 | $as_echo_n "(cached) " >&6 |
4506 | 4153 | 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 | |
4154 | + # Double quotes because CPP needs to be expanded | |
4155 | + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
4156 | + do | |
4157 | + ac_preproc_ok=false | |
4158 | +for ac_c_preproc_warn_flag in '' yes | |
4515 | 4159 | 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 | |
4160 | + # Use a header file that comes with gcc, so configuring glibc | |
4161 | + # with a fresh cross-compiler works. | |
4162 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4163 | + # <limits.h> exists even on freestanding compilers. | |
4164 | + # On the NeXT, cc -E runs the code through the compiler's parser, | |
4165 | + # not just through cpp. "Syntax error" is here to catch this case. | |
4166 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4167 | +/* end confdefs.h. */ | |
4168 | +#ifdef __STDC__ | |
4169 | +# include <limits.h> | |
4170 | +#else | |
4171 | +# include <assert.h> | |
4172 | +#endif | |
4173 | + Syntax error | |
4174 | +_ACEOF | |
4175 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4176 | + | |
4177 | +else | |
4178 | + # Broken: fails on valid input. | |
4179 | +continue | |
4180 | +fi | |
4181 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
4182 | + | |
4183 | + # OK, works on sane cases. Now check whether nonexistent headers | |
4184 | + # can be detected and how. | |
4185 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4186 | +/* end confdefs.h. */ | |
4187 | +#include <ac_nonexistent.h> | |
4188 | +_ACEOF | |
4189 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4190 | + # Broken: success on invalid input. | |
4191 | +continue | |
4192 | +else | |
4193 | + # Passes both tests. | |
4194 | +ac_preproc_ok=: | |
4195 | +break | |
4196 | +fi | |
4197 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
4198 | + | |
4199 | +done | |
4200 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4201 | +rm -f conftest.i conftest.err conftest.$ac_ext | |
4202 | +if $ac_preproc_ok; then : | |
4203 | + break | |
4204 | +fi | |
4205 | + | |
4206 | + done | |
4207 | + ac_cv_prog_CPP=$CPP | |
4208 | + | |
4209 | +fi | |
4210 | + CPP=$ac_cv_prog_CPP | |
4211 | +else | |
4212 | + ac_cv_prog_CPP=$CPP | |
4213 | +fi | |
4214 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
4215 | +$as_echo "$CPP" >&6; } | |
4216 | +ac_preproc_ok=false | |
4217 | +for ac_c_preproc_warn_flag in '' yes | |
4218 | +do | |
4219 | + # Use a header file that comes with gcc, so configuring glibc | |
4220 | + # with a fresh cross-compiler works. | |
4221 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
4222 | + # <limits.h> exists even on freestanding compilers. | |
4223 | + # On the NeXT, cc -E runs the code through the compiler's parser, | |
4224 | + # not just through cpp. "Syntax error" is here to catch this case. | |
4225 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4226 | +/* end confdefs.h. */ | |
4227 | +#ifdef __STDC__ | |
4228 | +# include <limits.h> | |
4229 | +#else | |
4230 | +# include <assert.h> | |
4231 | +#endif | |
4232 | + Syntax error | |
4233 | +_ACEOF | |
4234 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4235 | + | |
4236 | +else | |
4237 | + # Broken: fails on valid input. | |
4238 | +continue | |
4239 | +fi | |
4240 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
4241 | + | |
4242 | + # OK, works on sane cases. Now check whether nonexistent headers | |
4243 | + # can be detected and how. | |
4244 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4245 | +/* end confdefs.h. */ | |
4246 | +#include <ac_nonexistent.h> | |
4247 | +_ACEOF | |
4248 | +if ac_fn_c_try_cpp "$LINENO"; then : | |
4249 | + # Broken: success on invalid input. | |
4250 | +continue | |
4251 | +else | |
4252 | + # Passes both tests. | |
4253 | +ac_preproc_ok=: | |
4254 | +break | |
4255 | +fi | |
4256 | +rm -f conftest.err conftest.i conftest.$ac_ext | |
4257 | + | |
4258 | +done | |
4259 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
4260 | +rm -f conftest.i conftest.err conftest.$ac_ext | |
4261 | +if $ac_preproc_ok; then : | |
4262 | + | |
4263 | +else | |
4264 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | |
4265 | +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | |
4266 | +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
4267 | +See \`config.log' for more details" "$LINENO" 5; } | |
4268 | +fi | |
4269 | + | |
4270 | +ac_ext=c | |
4271 | +ac_cpp='$CPP $CPPFLAGS' | |
4272 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4273 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4274 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4275 | + | |
4276 | + | |
4277 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 | |
4278 | +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } | |
4279 | +if ${ac_cv_path_GREP+:} false; then : | |
4280 | + $as_echo_n "(cached) " >&6 | |
4281 | +else | |
4282 | + if test -z "$GREP"; then | |
4283 | + ac_path_GREP_found=false | |
4284 | + # Loop through the user's path and test for each of PROGNAME-LIST | |
4285 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4286 | +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4287 | +do | |
4288 | + IFS=$as_save_IFS | |
4289 | + test -z "$as_dir" && as_dir=. | |
4290 | + for ac_prog in grep ggrep; do | |
4291 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4292 | + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" | |
4293 | + as_fn_executable_p "$ac_path_GREP" || continue | |
4294 | +# Check for GNU ac_path_GREP and select it if it is found. | |
4295 | + # Check for GNU $ac_path_GREP | |
4296 | +case `"$ac_path_GREP" --version 2>&1` in | |
4297 | +*GNU*) | |
4298 | + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; | |
4299 | +*) | |
4300 | + ac_count=0 | |
4301 | + $as_echo_n 0123456789 >"conftest.in" | |
4302 | + while : | |
4303 | + do | |
4304 | + cat "conftest.in" "conftest.in" >"conftest.tmp" | |
4305 | + mv "conftest.tmp" "conftest.in" | |
4306 | + cp "conftest.in" "conftest.nl" | |
4307 | + $as_echo 'GREP' >> "conftest.nl" | |
4308 | + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
4309 | + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
4310 | + as_fn_arith $ac_count + 1 && ac_count=$as_val | |
4311 | + if test $ac_count -gt ${ac_path_GREP_max-0}; then | |
4312 | + # Best one so far, save it but keep looking for a better one | |
4313 | + ac_cv_path_GREP="$ac_path_GREP" | |
4314 | + ac_path_GREP_max=$ac_count | |
4315 | + fi | |
4316 | + # 10*(2^10) chars as input seems more than enough | |
4317 | + test $ac_count -gt 10 && break | |
4318 | + done | |
4319 | + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
4320 | +esac | |
4321 | + | |
4322 | + $ac_path_GREP_found && break 3 | |
4323 | + done | |
4324 | + done | |
4325 | + done | |
4326 | +IFS=$as_save_IFS | |
4327 | + if test -z "$ac_cv_path_GREP"; then | |
4328 | + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
4329 | + fi | |
4330 | +else | |
4331 | + ac_cv_path_GREP=$GREP | |
4332 | +fi | |
4333 | + | |
4334 | +fi | |
4335 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 | |
4336 | +$as_echo "$ac_cv_path_GREP" >&6; } | |
4337 | + GREP="$ac_cv_path_GREP" | |
4338 | + | |
4339 | + | |
4340 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 | |
4341 | +$as_echo_n "checking for egrep... " >&6; } | |
4342 | +if ${ac_cv_path_EGREP+:} false; then : | |
4343 | + $as_echo_n "(cached) " >&6 | |
4344 | +else | |
4345 | + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 | |
4346 | + then ac_cv_path_EGREP="$GREP -E" | |
4347 | + else | |
4348 | + if test -z "$EGREP"; then | |
4349 | + ac_path_EGREP_found=false | |
4350 | + # Loop through the user's path and test for each of PROGNAME-LIST | |
4351 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4352 | +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
4353 | +do | |
4354 | + IFS=$as_save_IFS | |
4355 | + test -z "$as_dir" && as_dir=. | |
4356 | + for ac_prog in egrep; do | |
4357 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4358 | + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" | |
4359 | + as_fn_executable_p "$ac_path_EGREP" || continue | |
4360 | +# Check for GNU ac_path_EGREP and select it if it is found. | |
4361 | + # Check for GNU $ac_path_EGREP | |
4362 | +case `"$ac_path_EGREP" --version 2>&1` in | |
4363 | +*GNU*) | |
4364 | + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; | |
4365 | +*) | |
4366 | + ac_count=0 | |
4367 | + $as_echo_n 0123456789 >"conftest.in" | |
4368 | + while : | |
4369 | + do | |
4532 | 4370 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
4533 | 4371 | mv "conftest.tmp" "conftest.in" |
4534 | 4372 | cp "conftest.in" "conftest.nl" |
@@ -4695,212 +4533,54 @@ fi | ||
4695 | 4533 | done |
4696 | 4534 | |
4697 | 4535 | |
4698 | -if test "$no_x" = yes; then | |
4699 | - # Not all programs may use this symbol, but it does not hurt to define it. | |
4700 | 4536 | |
4701 | -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h | |
4702 | 4537 | |
4703 | - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= | |
4704 | -else | |
4705 | - if test -n "$x_includes"; then | |
4706 | - X_CFLAGS="$X_CFLAGS -I$x_includes" | |
4707 | - fi | |
4708 | 4538 | |
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 | 4539 | |
4722 | -int | |
4723 | -main () | |
4724 | -{ | |
4725 | 4540 | |
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" | |
4734 | -else | |
4735 | - LIBS="$ac_xsave_LIBS -R $x_libraries" | |
4736 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4737 | -/* end confdefs.h. */ | |
4541 | + case ${host} in #( | |
4542 | + *-darwin*) : | |
4738 | 4543 | |
4739 | -int | |
4740 | -main () | |
4741 | -{ | |
4742 | 4544 | |
4743 | - ; | |
4744 | - return 0; | |
4745 | -} | |
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" | |
4545 | + if test "x$with_xquartz_gl" != "xno"; then : | |
4546 | + GL_LIBS="${GL_LIBS:--lGL}" | |
4751 | 4547 | else |
4752 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 | |
4753 | -$as_echo "neither works" >&6; } | |
4548 | + GL_LIBS="${GL_LIBS:--framework OpenGL}" | |
4754 | 4549 | fi |
4755 | -rm -f core conftest.err conftest.$ac_objext \ | |
4756 | - conftest$ac_exeext conftest.$ac_ext | |
4550 | + ;; #( | |
4551 | + *-cygwin*|*-mingw*) : | |
4552 | + | |
4553 | + | |
4554 | + if test -n "$GL_LIBS"; then : | |
4555 | + | |
4556 | +else | |
4557 | + | |
4558 | + ax_check_gl_manual_libs_generic_extra_libs="opengl32 GL gl" | |
4559 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
4560 | + as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
4757 | 4561 | 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 | 4562 | |
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 | 4563 | |
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 | 4564 | |
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 () | |
4787 | -{ | |
4788 | -return XOpenDisplay (); | |
4789 | - ; | |
4790 | - return 0; | |
4791 | -} | |
4792 | -_ACEOF | |
4793 | -if ac_fn_c_try_link "$LINENO"; then : | |
4794 | - | |
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. */ | |
4805 | - | |
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 (); | |
4813 | -int | |
4814 | -main () | |
4815 | -{ | |
4816 | -return dnet_ntoa (); | |
4817 | - ; | |
4818 | - return 0; | |
4819 | -} | |
4820 | -_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 | |
4825 | -fi | |
4826 | -rm -f core conftest.err conftest.$ac_objext \ | |
4827 | - conftest$ac_exeext conftest.$ac_ext | |
4828 | -LIBS=$ac_check_lib_save_LIBS | |
4829 | -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" | |
4834 | -fi | |
4835 | 4565 | |
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 : | |
4840 | - $as_echo_n "(cached) " >&6 | |
4841 | -else | |
4842 | - ac_check_lib_save_LIBS=$LIBS | |
4843 | -LIBS="-ldnet_stub $LIBS" | |
4844 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4845 | -/* end confdefs.h. */ | |
4566 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
4567 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
4846 | 4568 | |
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 | -int | |
4855 | -main () | |
4856 | -{ | |
4857 | -return dnet_ntoa (); | |
4858 | - ; | |
4859 | - return 0; | |
4860 | -} | |
4861 | -_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 | 4569 | |
4877 | - fi | |
4878 | -fi | |
4879 | -rm -f core conftest.err conftest.$ac_objext \ | |
4880 | - conftest$ac_exeext conftest.$ac_ext | |
4881 | - LIBS="$ac_xsave_LIBS" | |
4882 | 4570 | |
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 : | |
4571 | + ac_ext=c | |
4572 | +ac_cpp='$CPP $CPPFLAGS' | |
4573 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4574 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4575 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
4893 | 4576 | |
4894 | -fi | |
4895 | 4577 | |
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 : | |
4578 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
4579 | +$as_echo_n "checking for library containing glBegin... " >&6; } | |
4580 | +if ${ac_cv_search_glBegin+:} false; then : | |
4900 | 4581 | $as_echo_n "(cached) " >&6 |
4901 | 4582 | else |
4902 | - ac_check_lib_save_LIBS=$LIBS | |
4903 | -LIBS="-lnsl $LIBS" | |
4583 | + ac_func_search_save_LIBS=$LIBS | |
4904 | 4584 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4905 | 4585 | /* end confdefs.h. */ |
4906 | 4586 |
@@ -4910,477 +4590,209 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
4910 | 4590 | #ifdef __cplusplus |
4911 | 4591 | extern "C" |
4912 | 4592 | #endif |
4913 | -char gethostbyname (); | |
4593 | +char glBegin (); | |
4914 | 4594 | int |
4915 | 4595 | main () |
4916 | 4596 | { |
4917 | -return gethostbyname (); | |
4597 | +return glBegin (); | |
4918 | 4598 | ; |
4919 | 4599 | return 0; |
4920 | 4600 | } |
4921 | 4601 | _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 | |
4602 | +for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
4603 | + if test -z "$ac_lib"; then | |
4604 | + ac_res="none required" | |
4605 | + else | |
4606 | + ac_res=-l$ac_lib | |
4607 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
4608 | + fi | |
4609 | + if ac_fn_c_try_link "$LINENO"; then : | |
4610 | + ac_cv_search_glBegin=$ac_res | |
4926 | 4611 | fi |
4927 | 4612 | 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" | |
4613 | + conftest$ac_exeext | |
4614 | + if ${ac_cv_search_glBegin+:} false; then : | |
4615 | + break | |
4935 | 4616 | fi |
4617 | +done | |
4618 | +if ${ac_cv_search_glBegin+:} false; then : | |
4936 | 4619 | |
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. */ | |
4947 | - | |
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 | 4620 | 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 | |
4621 | + ac_cv_search_glBegin=no | |
4971 | 4622 | 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" | |
4623 | +rm conftest.$ac_ext | |
4624 | +LIBS=$ac_func_search_save_LIBS | |
4976 | 4625 | fi |
4626 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
4627 | +$as_echo "$ac_cv_search_glBegin" >&6; } | |
4628 | +ac_res=$ac_cv_search_glBegin | |
4629 | +if test "$ac_res" != no; then : | |
4630 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
4977 | 4631 | |
4978 | - fi | |
4979 | - 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 : | |
4632 | + ax_check_gl_lib_opengl="yes" | |
4633 | + break | |
4990 | 4634 | |
4991 | 4635 | fi |
4992 | 4636 | |
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" | |
4637 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
4638 | + GL_LIBS="${ac_cv_search_glBegin}" | |
5032 | 4639 | fi |
5033 | 4640 | |
5034 | - fi | |
5035 | 4641 | |
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 | 4642 | |
5040 | -fi | |
4643 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5041 | 4644 | |
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 | 4645 | |
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 | 4646 | |
5083 | - fi | |
5084 | 4647 | |
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 : | |
4648 | + ac_ext=c | |
4649 | +ac_cpp='$CPP $CPPFLAGS' | |
4650 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
4651 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
4652 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5088 | 4653 | |
5089 | -fi | |
5090 | 4654 | |
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 | 4655 | |
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 | 4656 | fi |
5131 | 4657 | |
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 | -} | |
4658 | + for ac_header in windows.h | |
4659 | +do : | |
4660 | + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
4661 | +if test "x$ac_cv_header_windows_h" = xyes; then : | |
4662 | + cat >>confdefs.h <<_ACEOF | |
4663 | +#define HAVE_WINDOWS_H 1 | |
5168 | 4664 | _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 | 4665 | |
5186 | 4666 | fi |
5187 | 4667 | |
4668 | +done | |
5188 | 4669 | |
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" ;; #( | |
4670 | + ;; #( | |
5199 | 4671 | *) : |
5200 | - ax_check_gl_want_gl="$withval" ;; | |
5201 | -esac | |
5202 | - | |
5203 | -else | |
5204 | - ax_check_gl_want_gl="yes" | |
5205 | -fi | |
5206 | - | |
5207 | 4672 | |
5208 | 4673 | |
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 | 4674 | |
5221 | -else | |
5222 | - ax_check_gl_want_mesa="default" | |
5223 | -fi | |
5224 | 4675 | |
5225 | 4676 | |
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 | 4677 | |
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 | 4678 | |
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 ;; | |
4679 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
4680 | + if test -n "$ac_tool_prefix"; then | |
4681 | + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
4682 | +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
4683 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4684 | +$as_echo_n "checking for $ac_word... " >&6; } | |
4685 | +if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
4686 | + $as_echo_n "(cached) " >&6 | |
4687 | +else | |
4688 | + case $PKG_CONFIG in | |
4689 | + [\\/]* | ?:[\\/]*) | |
4690 | + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
4691 | + ;; | |
4692 | + *) | |
4693 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4694 | +for as_dir in $PATH | |
4695 | +do | |
4696 | + IFS=$as_save_IFS | |
4697 | + test -z "$as_dir" && as_dir=. | |
4698 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4699 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4700 | + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
4701 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4702 | + break 2 | |
4703 | + fi | |
4704 | +done | |
4705 | + done | |
4706 | +IFS=$as_save_IFS | |
4707 | + | |
4708 | + ;; | |
5250 | 4709 | esac |
5251 | 4710 | 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" | |
4711 | +PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
4712 | +if test -n "$PKG_CONFIG"; then | |
4713 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
4714 | +$as_echo "$PKG_CONFIG" >&6; } | |
5263 | 4715 | else |
5264 | - ax_check_gl_order="gl mesagl" | |
5265 | -fi | |
4716 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4717 | +$as_echo "no" >&6; } | |
5266 | 4718 | 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 | 4719 | |
5274 | - # now do the real testing | |
5275 | - if test X$ax_check_gl_want_gl != "Xno"; then : | |
5276 | 4720 | |
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 | 4721 | 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 | |
4722 | +if test -z "$ac_cv_path_PKG_CONFIG"; then | |
4723 | + ac_pt_PKG_CONFIG=$PKG_CONFIG | |
4724 | + # Extract the first word of "pkg-config", so it can be a program name with args. | |
4725 | +set dummy pkg-config; ac_word=$2 | |
4726 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
4727 | +$as_echo_n "checking for $ac_word... " >&6; } | |
4728 | +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
4729 | + $as_echo_n "(cached) " >&6 | |
5301 | 4730 | 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; } | |
4731 | + case $ac_pt_PKG_CONFIG in | |
4732 | + [\\/]* | ?:[\\/]*) | |
4733 | + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
4734 | + ;; | |
4735 | + *) | |
4736 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4737 | +for as_dir in $PATH | |
4738 | +do | |
4739 | + IFS=$as_save_IFS | |
4740 | + test -z "$as_dir" && as_dir=. | |
4741 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
4742 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4743 | + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
4744 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4745 | + break 2 | |
4746 | + fi | |
4747 | +done | |
4748 | + done | |
4749 | +IFS=$as_save_IFS | |
5312 | 4750 | |
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 | |
4751 | + ;; | |
4752 | +esac | |
5329 | 4753 | 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 | |
4754 | +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
4755 | +if test -n "$ac_pt_PKG_CONFIG"; then | |
4756 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
4757 | +$as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
5341 | 4758 | 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 | |
4759 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5352 | 4760 | $as_echo "no" >&6; } |
4761 | +fi | |
5353 | 4762 | |
5354 | -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
5355 | - _pkg_short_errors_supported=yes | |
4763 | + if test "x$ac_pt_PKG_CONFIG" = x; then | |
4764 | + PKG_CONFIG="" | |
4765 | + else | |
4766 | + case $cross_compiling:$ac_tool_warned in | |
4767 | +yes:) | |
4768 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
4769 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
4770 | +ac_tool_warned=yes ;; | |
4771 | +esac | |
4772 | + PKG_CONFIG=$ac_pt_PKG_CONFIG | |
4773 | + fi | |
5356 | 4774 | else |
5357 | - _pkg_short_errors_supported=no | |
4775 | + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
5358 | 4776 | 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 | 4777 | |
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 | |
4778 | +fi | |
4779 | +if test -n "$PKG_CONFIG"; then | |
4780 | + _pkg_min_version=0.9.0 | |
4781 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
4782 | +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
4783 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
4784 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5376 | 4785 | $as_echo "yes" >&6; } |
5377 | - ax_check_gl_pkg_config=yes | |
5378 | -fi ;; #( | |
5379 | - "gl mesagl") : | |
4786 | + else | |
4787 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4788 | +$as_echo "no" >&6; } | |
4789 | + PKG_CONFIG="" | |
4790 | + fi | |
4791 | +fi | |
5380 | 4792 | |
5381 | 4793 | pkg_failed=no |
5382 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GL" >&5 | |
5383 | -$as_echo_n "checking for GL... " >&6; } | |
4794 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl" >&5 | |
4795 | +$as_echo_n "checking for gl... " >&6; } | |
5384 | 4796 | |
5385 | 4797 | if test -n "$GL_CFLAGS"; then |
5386 | 4798 | pkg_cv_GL_CFLAGS="$GL_CFLAGS" |
@@ -5398,997 +4810,70 @@ else | ||
5398 | 4810 | fi |
5399 | 4811 | else |
5400 | 4812 | 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 | |
5789 | -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 | |
5795 | -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 | - | |
5835 | -fi | |
5836 | - | |
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 | |
5856 | -else | |
5857 | - ax_check_gl_have_headers_headers="no" | |
5858 | -fi | |
5859 | - | |
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 | - | |
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 | - | |
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 | - | |
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 | - | |
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 : | |
5891 | - $as_echo_n "(cached) " >&6 | |
5892 | -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 | |
5906 | -/* end confdefs.h. */ | |
5907 | - | |
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 | |
5918 | - | |
5919 | -int | |
5920 | -main () | |
5921 | -{ | |
5922 | -glBegin(0) | |
5923 | - ; | |
5924 | - return 0; | |
5925 | -} | |
5926 | -_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" | |
5931 | -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}" | |
5937 | - | |
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 | |
5943 | - | |
5944 | - | |
5945 | - ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}" | |
5946 | -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 | - | |
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 | -fi | |
5954 | - | |
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 : | |
5958 | - $as_echo_n "(cached) " >&6 | |
5959 | -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 | |
5987 | - | |
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 | -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 | |
6013 | - | |
6014 | - | |
6015 | - ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}" | |
6016 | -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 | - | |
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 | -fi | |
6024 | - | |
6025 | -else | |
6026 | - ax_check_gl_pkg_config=no | |
6027 | -fi | |
6028 | - | |
6029 | -fi | |
6030 | - | |
6031 | - # if no pkgconfig or pkgconfig fail try manual way | |
6032 | - if test "X$ax_check_gl_pkg_config" = "Xno"; then : | |
6033 | - | |
6034 | - no_gl="yes" | |
6035 | - | |
6036 | - | |
6037 | - case ${host} in #( | |
6038 | - *-darwin*) : | |
6039 | - _AX_CHECK_GL_MANUAL_HEADERS_DARWIN ;; #( | |
6040 | - *) : | |
6041 | - | |
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 | - | |
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 | - | |
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 | |
6063 | - | |
6064 | -fi | |
6065 | - | |
6066 | -done | |
6067 | - | |
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 | |
6073 | - | |
6074 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6075 | - # include <windows.h> | |
6076 | - # endif | |
6077 | - | |
6078 | - | |
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" | |
6085 | -else | |
6086 | - ax_check_gl_have_headers_headers="no" | |
6087 | -fi | |
6088 | - | |
6089 | -done | |
6090 | - | |
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}" | |
6096 | - | |
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 | |
6102 | - | |
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 | -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 | - | |
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 | |
6122 | -ac_cpp='$CPP $CPPFLAGS' | |
6123 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6124 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6125 | -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 | |
6134 | -/* end confdefs.h. */ | |
6135 | - | |
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 | |
6146 | - | |
6147 | -int | |
6148 | -main () | |
6149 | -{ | |
6150 | -glBegin(0) | |
6151 | - ; | |
6152 | - return 0; | |
6153 | -} | |
6154 | -_ACEOF | |
6155 | -if ac_fn_c_try_compile "$LINENO"; then : | |
6156 | - ax_check_gl_compile_opengl="yes" | |
6157 | -else | |
6158 | - ax_check_gl_compile_opengl="no" | |
6159 | -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}" | |
6165 | - | |
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 | |
6171 | - | |
6172 | - | |
6173 | - ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}" | |
6174 | -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}" | |
6178 | - | |
6179 | -else | |
6180 | - ax_check_gl_compile_opengl=no | |
6181 | -fi | |
6182 | - | |
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 | |
6221 | -/* 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 | -} | |
6241 | -_ACEOF | |
6242 | -if ac_fn_c_try_link "$LINENO"; then : | |
6243 | - ax_check_gl_link_opengl="yes" | |
6244 | -else | |
6245 | - ax_check_gl_link_opengl="no" | |
6246 | -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 | |
6259 | - | |
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*) : | |
6273 | - | |
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 | |
6279 | -fi | |
6280 | - | |
6281 | - ac_ext=c | |
6282 | -ac_cpp='$CPP $CPPFLAGS' | |
6283 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6284 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6285 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6286 | - | |
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 | - | |
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 : | |
6297 | - $as_echo_n "(cached) " >&6 | |
6298 | -else | |
6299 | - ac_func_search_save_LIBS=$LIBS | |
6300 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6301 | -/* end confdefs.h. */ | |
6302 | - | |
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" | |
6324 | - 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 | - | |
4813 | +fi | |
4814 | +if test -n "$GL_LIBS"; then | |
4815 | + pkg_cv_GL_LIBS="$GL_LIBS" | |
4816 | + elif test -n "$PKG_CONFIG"; then | |
4817 | + if test -n "$PKG_CONFIG" && \ | |
4818 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gl\""; } >&5 | |
4819 | + ($PKG_CONFIG --exists --print-errors "gl") 2>&5 | |
4820 | + ac_status=$? | |
4821 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
4822 | + test $ac_status = 0; }; then | |
4823 | + pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "gl" 2>/dev/null` | |
4824 | + test "x$?" != "x0" && pkg_failed=yes | |
6336 | 4825 | else |
6337 | - ac_cv_search_glBegin=no | |
4826 | + pkg_failed=yes | |
6338 | 4827 | fi |
6339 | -rm conftest.$ac_ext | |
6340 | -LIBS=$ac_func_search_save_LIBS | |
4828 | + else | |
4829 | + pkg_failed=untried | |
6341 | 4830 | 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" | |
4831 | + | |
4832 | + | |
4833 | + | |
4834 | +if test $pkg_failed = yes; then | |
4835 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4836 | +$as_echo "no" >&6; } | |
4837 | + | |
4838 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
4839 | + _pkg_short_errors_supported=yes | |
6348 | 4840 | else |
6349 | - ax_check_gl_lib_opengl="no" | |
4841 | + _pkg_short_errors_supported=no | |
6350 | 4842 | fi |
4843 | + if test $_pkg_short_errors_supported = yes; then | |
4844 | + GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gl" 2>&1` | |
4845 | + else | |
4846 | + GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gl" 2>&1` | |
4847 | + fi | |
4848 | + # Put the nasty error message in config.log where it belongs | |
4849 | + echo "$GL_PKG_ERRORS" >&5 | |
6351 | 4850 | |
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}" | |
6364 | 4851 | |
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 | |
4852 | + if test -n "$GL_LIBS"; then : | |
6370 | 4853 | |
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 : | |
4854 | +else | |
4855 | + | |
4856 | + ax_check_gl_manual_libs_generic_extra_libs="GL gl" | |
4857 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6375 | 4858 | as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 |
6376 | 4859 | fi |
6377 | 4860 | |
4861 | + | |
4862 | + | |
4863 | + | |
4864 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
4865 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
4866 | + | |
4867 | + | |
4868 | + | |
6378 | 4869 | ac_ext=c |
6379 | 4870 | ac_cpp='$CPP $CPPFLAGS' |
6380 | 4871 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6381 | 4872 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6382 | 4873 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6383 | 4874 | |
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}" | |
6388 | 4875 | |
6389 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6390 | - LIBS="${GL_LIBS} ${LIBS}" | |
6391 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
4876 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6392 | 4877 | $as_echo_n "checking for library containing glBegin... " >&6; } |
6393 | 4878 | if ${ac_cv_search_glBegin+:} false; then : |
6394 | 4879 | $as_echo_n "(cached) " >&6 |
@@ -6441,157 +4926,62 @@ $as_echo "$ac_cv_search_glBegin" >&6; } | ||
6441 | 4926 | ac_res=$ac_cv_search_glBegin |
6442 | 4927 | if test "$ac_res" != no; then : |
6443 | 4928 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
6444 | - ax_check_gl_lib_opengl="yes" | |
6445 | -else | |
6446 | - ax_check_gl_lib_opengl="no" | |
6447 | -fi | |
6448 | 4929 | |
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}" | |
4930 | + ax_check_gl_lib_opengl="yes" | |
4931 | + break | |
6461 | 4932 | |
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 | |
4933 | +fi | |
6467 | 4934 | |
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 | |
4935 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
4936 | + GL_LIBS="${ac_cv_search_glBegin}" | |
6473 | 4937 | fi |
6474 | 4938 | |
4939 | + | |
4940 | + | |
4941 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
4942 | + | |
4943 | + | |
4944 | + | |
4945 | + | |
6475 | 4946 | ac_ext=c |
6476 | 4947 | ac_cpp='$CPP $CPPFLAGS' |
6477 | 4948 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6478 | 4949 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6479 | 4950 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6480 | 4951 | |
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}" | |
6485 | 4952 | |
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 | |
6495 | -/* end confdefs.h. */ | |
6496 | 4953 | |
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 | -_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 | 4954 | 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 : | |
6529 | 4955 | |
6530 | -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" | |
6544 | -fi | |
4956 | +elif test $pkg_failed = untried; then | |
4957 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
4958 | +$as_echo "no" >&6; } | |
6545 | 4959 | |
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}" | |
4960 | + if test -n "$GL_LIBS"; then : | |
6558 | 4961 | |
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 | |
4962 | +else | |
6564 | 4963 | |
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 : | |
4964 | + ax_check_gl_manual_libs_generic_extra_libs="GL gl" | |
4965 | + if test "X$ax_check_gl_manual_libs_generic_extra_libs" = "X"; then : | |
6578 | 4966 | as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 |
6579 | 4967 | fi |
6580 | 4968 | |
4969 | + | |
4970 | + | |
4971 | + | |
4972 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
4973 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
4974 | + | |
4975 | + | |
4976 | + | |
6581 | 4977 | ac_ext=c |
6582 | 4978 | ac_cpp='$CPP $CPPFLAGS' |
6583 | 4979 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6584 | 4980 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6585 | 4981 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6586 | 4982 | |
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 | 4983 | |
6592 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6593 | - LIBS="${GL_LIBS} ${LIBS}" | |
6594 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
4984 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6595 | 4985 | $as_echo_n "checking for library containing glBegin... " >&6; } |
6596 | 4986 | if ${ac_cv_search_glBegin+:} false; then : |
6597 | 4987 | $as_echo_n "(cached) " >&6 |
@@ -6644,133 +5034,49 @@ $as_echo "$ac_cv_search_glBegin" >&6; } | ||
6644 | 5034 | ac_res=$ac_cv_search_glBegin |
6645 | 5035 | if test "$ac_res" != no; then : |
6646 | 5036 | 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" | |
6650 | -fi | |
6651 | 5037 | |
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}" | |
5038 | + ax_check_gl_lib_opengl="yes" | |
5039 | + break | |
6664 | 5040 | |
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 | |
5041 | +fi | |
6670 | 5042 | |
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 | |
5043 | + if test "X$ax_check_gl_lib_opengl"="Xyes"; then : | |
5044 | + GL_LIBS="${ac_cv_search_glBegin}" | |
6676 | 5045 | fi |
6677 | 5046 | |
5047 | + | |
5048 | + | |
5049 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5050 | + | |
5051 | + | |
5052 | + | |
5053 | + | |
6678 | 5054 | ac_ext=c |
6679 | 5055 | ac_cpp='$CPP $CPPFLAGS' |
6680 | 5056 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6681 | 5057 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6682 | 5058 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6683 | 5059 | |
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 | 5060 | |
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 | 5061 | |
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 | 5062 | fi |
6730 | -done | |
6731 | -if ${ac_cv_search_glBegin+:} false; then : | |
6732 | 5063 | |
6733 | 5064 | 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" | |
6747 | -fi | |
5065 | + GL_CFLAGS=$pkg_cv_GL_CFLAGS | |
5066 | + GL_LIBS=$pkg_cv_GL_LIBS | |
5067 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
5068 | +$as_echo "yes" >&6; } | |
6748 | 5069 | |
6749 | - case $ac_cv_search_glBegin in #( | |
6750 | - "none required") : | |
6751 | - ;; #( | |
6752 | - no) : | |
6753 | - ;; #( | |
6754 | - *) : | |
6755 | - GL_LIBS="${ac_cv_search_glBegin} ${GL_LIBS}" ;; | |
5070 | +fi | |
5071 | + ;; | |
6756 | 5072 | 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 | 5073 | |
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 | |
6767 | 5074 | |
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 : | |
6772 | - as_fn_error $? "AX_CHECK_GL_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
6773 | -fi | |
5075 | + | |
5076 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
5077 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
5078 | + | |
5079 | + | |
6774 | 5080 | |
6775 | 5081 | ac_ext=c |
6776 | 5082 | ac_cpp='$CPP $CPPFLAGS' |
@@ -6778,136 +5084,57 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
6778 | 5084 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6779 | 5085 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6780 | 5086 | |
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 | - | |
6786 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6787 | - LIBS="${GL_LIBS} ${LIBS}" | |
6788 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glBegin" >&5 | |
6789 | -$as_echo_n "checking for library containing glBegin... " >&6; } | |
6790 | -if ${ac_cv_search_glBegin+:} false; then : | |
6791 | - $as_echo_n "(cached) " >&6 | |
6792 | -else | |
6793 | - ac_func_search_save_LIBS=$LIBS | |
6794 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6795 | -/* end confdefs.h. */ | |
6796 | 5087 | |
6797 | -/* Override any GCC internal prototype to avoid an error. | |
6798 | - Use char because int might match the return type of a GCC | |
6799 | - builtin and then its argument prototype would still apply. */ | |
6800 | -#ifdef __cplusplus | |
6801 | -extern "C" | |
6802 | -#endif | |
6803 | -char glBegin (); | |
6804 | -int | |
6805 | -main () | |
6806 | -{ | |
6807 | -return glBegin (); | |
6808 | - ; | |
6809 | - return 0; | |
6810 | -} | |
5088 | + for ac_header in GL/gl.h OpenGL/gl.h | |
5089 | +do : | |
5090 | + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5091 | +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |
5092 | +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
5093 | + cat >>confdefs.h <<_ACEOF | |
5094 | +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6811 | 5095 | _ACEOF |
6812 | -for ac_lib in '' $ax_check_gl_manual_libs_generic_extra_libs; do | |
6813 | - if test -z "$ac_lib"; then | |
6814 | - ac_res="none required" | |
6815 | - else | |
6816 | - ac_res=-l$ac_lib | |
6817 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6818 | - fi | |
6819 | - if ac_fn_c_try_link "$LINENO"; then : | |
6820 | - ac_cv_search_glBegin=$ac_res | |
6821 | -fi | |
6822 | -rm -f core conftest.err conftest.$ac_objext \ | |
6823 | - conftest$ac_exeext | |
6824 | - if ${ac_cv_search_glBegin+:} false; then : | |
6825 | - break | |
5096 | + ax_check_gl_have_headers="yes";break | |
6826 | 5097 | fi |
5098 | + | |
6827 | 5099 | done |
6828 | -if ${ac_cv_search_glBegin+:} false; then : | |
6829 | 5100 | |
6830 | -else | |
6831 | - ac_cv_search_glBegin=no | |
6832 | -fi | |
6833 | -rm conftest.$ac_ext | |
6834 | -LIBS=$ac_func_search_save_LIBS | |
6835 | -fi | |
6836 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glBegin" >&5 | |
6837 | -$as_echo "$ac_cv_search_glBegin" >&6; } | |
6838 | -ac_res=$ac_cv_search_glBegin | |
6839 | -if test "$ac_res" != no; then : | |
6840 | - 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 | 5101 | |
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 | 5102 | |
6859 | - ac_ext=c | |
5103 | + | |
5104 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5105 | + | |
5106 | + | |
5107 | + | |
5108 | + | |
5109 | + ac_ext=c | |
6860 | 5110 | ac_cpp='$CPP $CPPFLAGS' |
6861 | 5111 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6862 | 5112 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6863 | 5113 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6864 | 5114 | |
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 | 5115 | |
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 : | |
5116 | + | |
5117 | + if test "X$ax_check_gl_have_headers" = "Xyes"; then : | |
5118 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL program" >&5 | |
5119 | +$as_echo_n "checking for compiling a minimal OpenGL program... " >&6; } | |
5120 | +if ${ax_cv_check_gl_compile_opengl+:} false; then : | |
6879 | 5121 | $as_echo_n "(cached) " >&6 |
6880 | 5122 | 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}" | |
6886 | 5123 | |
6887 | -else | |
6888 | - ax_check_gl_lib_opengl=no | |
6889 | -fi | |
6890 | 5124 | |
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 | |
5125 | + | |
5126 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
5127 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
5128 | + | |
5129 | + | |
5130 | + | |
5131 | + ac_ext=c | |
6898 | 5132 | ac_cpp='$CPP $CPPFLAGS' |
6899 | 5133 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6900 | 5134 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6901 | 5135 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6902 | 5136 | |
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 | 5137 | |
6908 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6909 | - LIBS="${GL_LIBS} ${LIBS}" | |
6910 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
6911 | 5138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6912 | 5139 | /* end confdefs.h. */ |
6913 | 5140 |
@@ -6930,17 +5157,19 @@ glBegin(0) | ||
6930 | 5157 | return 0; |
6931 | 5158 | } |
6932 | 5159 | _ACEOF |
6933 | -if ac_fn_c_try_link "$LINENO"; then : | |
6934 | - ax_check_gl_link_opengl="yes" | |
5160 | +if ac_fn_c_try_compile "$LINENO"; then : | |
5161 | + ax_check_gl_compile_opengl="yes" | |
6935 | 5162 | else |
6936 | - ax_check_gl_link_opengl="no" | |
5163 | + ax_check_gl_compile_opengl="no" | |
6937 | 5164 | 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}" | |
5165 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
5166 | + | |
5167 | + | |
5168 | + | |
5169 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5170 | + | |
5171 | + | |
5172 | + | |
6944 | 5173 | |
6945 | 5174 | ac_ext=c |
6946 | 5175 | ac_cpp='$CPP $CPPFLAGS' |
@@ -6949,80 +5178,91 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ | ||
6949 | 5178 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6950 | 5179 | |
6951 | 5180 | |
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 | - | |
6958 | -else | |
6959 | - ax_check_gl_link_opengl=no | |
6960 | -fi | |
6961 | 5181 | |
6962 | - if test "X$ax_check_gl_link_opengl" = "Xyes"; then : | |
6963 | - no_gl="no" | |
6964 | -else | |
6965 | - no_gl="yes" | |
5182 | + ax_cv_check_gl_compile_opengl="${ax_check_gl_compile_opengl}" | |
6966 | 5183 | fi |
5184 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_compile_opengl" >&5 | |
5185 | +$as_echo "$ax_cv_check_gl_compile_opengl" >&6; } | |
5186 | + ax_check_gl_compile_opengl="${ax_cv_check_gl_compile_opengl}" | |
6967 | 5187 | |
6968 | 5188 | else |
6969 | - no_gl=no | |
5189 | + no_gl=yes | |
6970 | 5190 | fi |
6971 | - | |
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 : | |
5191 | + if test "X$ax_check_gl_compile_opengl" = "Xyes"; then : | |
5192 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL program" >&5 | |
5193 | +$as_echo_n "checking for linking a minimal OpenGL program... " >&6; } | |
5194 | +if ${ax_cv_check_gl_link_opengl+:} false; then : | |
6979 | 5195 | $as_echo_n "(cached) " >&6 |
6980 | 5196 | else |
6981 | 5197 | |
6982 | - # try if opengl need X | |
5198 | + | |
5199 | + | |
5200 | +_ax_gl_saved_flag_cflags="$CFLAGS" | |
5201 | +CFLAGS="$GL_CFLAGS $CFLAGS" | |
5202 | + | |
5203 | + | |
5204 | +_ax_gl_saved_flag_libs="$LIBS" | |
5205 | +LIBS="$GL_LIBS $LIBS" | |
5206 | + | |
5207 | + | |
5208 | +_ax_gl_saved_flag_ldflags="$LDFLAGS" | |
5209 | +LDFLAGS="$GL_LDFLAGS $LDFLAGS" | |
5210 | + | |
5211 | + | |
5212 | + | |
5213 | + | |
5214 | + | |
6983 | 5215 | ac_ext=c |
6984 | 5216 | ac_cpp='$CPP $CPPFLAGS' |
6985 | 5217 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
6986 | 5218 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
6987 | 5219 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
6988 | 5220 | |
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 | 5221 | |
6994 | - CFLAGS="${GL_CFLAGS} ${CFLAGS}" | |
6995 | - LIBS="${GL_LIBS} ${LIBS}" | |
6996 | - LDFLAGS="${GL_LDFLAGS} ${LDFLAGS}" | |
6997 | 5222 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
6998 | 5223 | /* end confdefs.h. */ |
6999 | 5224 | |
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 (); | |
5225 | +# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
5226 | +# include <windows.h> | |
5227 | +# endif | |
5228 | +# ifdef HAVE_GL_GL_H | |
5229 | +# include <GL/gl.h> | |
5230 | +# elif defined(HAVE_OPENGL_GL_H) | |
5231 | +# include <OpenGL/gl.h> | |
5232 | +# else | |
5233 | +# error no gl.h | |
5234 | +# endif | |
5235 | + | |
7007 | 5236 | int |
7008 | 5237 | main () |
7009 | 5238 | { |
7010 | -return glXQueryVersion (); | |
5239 | +glBegin(0) | |
7011 | 5240 | ; |
7012 | 5241 | return 0; |
7013 | 5242 | } |
7014 | 5243 | _ACEOF |
7015 | 5244 | if ac_fn_c_try_link "$LINENO"; then : |
7016 | - ax_check_gl_link_implicitly_with_x="yes" | |
5245 | + ax_check_gl_link_opengl="yes" | |
7017 | 5246 | else |
7018 | - ax_check_gl_link_implicitly_with_x="no" | |
5247 | + ax_check_gl_link_opengl="no" | |
7019 | 5248 | fi |
7020 | 5249 | rm -f core conftest.err conftest.$ac_objext \ |
7021 | 5250 | 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}" | |
5251 | + | |
5252 | + | |
5253 | + | |
5254 | +CFLAGS="$_ax_gl_saved_flag_cflags" | |
5255 | + | |
5256 | + | |
5257 | +LIBS="$_ax_gl_saved_flag_libs" | |
5258 | + | |
5259 | + | |
5260 | +LDFLAGS="$_ax_gl_saved_flag_ldflags" | |
5261 | + | |
5262 | + | |
5263 | + | |
5264 | + | |
5265 | + | |
7026 | 5266 | |
7027 | 5267 | ac_ext=c |
7028 | 5268 | ac_cpp='$CPP $CPPFLAGS' |
@@ -7031,50 +5271,27 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ | ||
7031 | 5271 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7032 | 5272 | |
7033 | 5273 | |
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 | -fi | |
7044 | - | |
7045 | -fi | |
7046 | 5274 | |
5275 | + ax_cv_check_gl_link_opengl="${ax_check_gl_link_opengl}" | |
7047 | 5276 | fi |
5277 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_gl_link_opengl" >&5 | |
5278 | +$as_echo "$ax_cv_check_gl_link_opengl" >&6; } | |
5279 | + ax_check_gl_link_opengl="${ax_cv_check_gl_link_opengl}" | |
7048 | 5280 | |
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 | 5281 | 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="" | |
5282 | + no_gl=yes | |
7073 | 5283 | fi |
5284 | + if test "X$no_gl" = "X"; then : | |
7074 | 5285 | |
5286 | +$as_echo "#define HAVE_GL 1" >>confdefs.h | |
7075 | 5287 | |
5288 | + CFLAGS="$GL_CFLAGS $CFLAGS" | |
5289 | + LIBS="$GL_LIBS $LIBS" | |
7076 | 5290 | |
5291 | +else | |
5292 | + as_fn_error $? "Could not find a valid OpenGL implementation" "$LINENO" 5 | |
7077 | 5293 | |
5294 | +fi | |
7078 | 5295 | |
7079 | 5296 | ac_ext=cpp |
7080 | 5297 | ac_cpp='$CXXCPP $CPPFLAGS' |
@@ -7327,11 +5544,11 @@ else | ||
7327 | 5544 | CXXFLAGS= |
7328 | 5545 | fi |
7329 | 5546 | fi |
7330 | -ac_ext=c | |
7331 | -ac_cpp='$CPP $CPPFLAGS' | |
7332 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7333 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7334 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5547 | +ac_ext=cpp | |
5548 | +ac_cpp='$CXXCPP $CPPFLAGS' | |
5549 | +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5550 | +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5551 | +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | |
7335 | 5552 | |
7336 | 5553 | depcc="$CXX" am_compiler_list= |
7337 | 5554 |
@@ -7466,114 +5683,118 @@ fi | ||
7466 | 5683 | |
7467 | 5684 | |
7468 | 5685 | |
7469 | - # set flags | |
7470 | - no_glu="yes" | |
7471 | - have_GLU="no" | |
7472 | 5686 | |
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 | |
5687 | + | |
5688 | + | |
5689 | + case ${host} in #( | |
5690 | + *-darwin*) : | |
5691 | + | |
5692 | + | |
5693 | + if test "x$with_xquartz_gl" != "xno"; then : | |
5694 | + GLU_LIBS="${GLU_LIBS:--lGLU}" | |
7480 | 5695 | else |
7481 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7482 | -$as_echo "yes" >&6; } | |
5696 | + GLU_LIBS="${GLU_LIBS:--framework OpenGL}" | |
5697 | +fi | |
5698 | + ;; #( | |
5699 | + *-cygwin*) : | |
7483 | 5700 | |
7484 | 5701 | |
5702 | + ac_ext=c | |
5703 | +ac_cpp='$CPP $CPPFLAGS' | |
5704 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5705 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5706 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7485 | 5707 | |
7486 | 5708 | |
7487 | -pkg_failed=no | |
7488 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLU" >&5 | |
7489 | -$as_echo_n "checking for GLU... " >&6; } | |
7490 | 5709 | |
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 | |
5710 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
5711 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
5712 | + | |
5713 | + | |
5714 | +_ax_glu_saved_flag_libs="$LIBS" | |
5715 | +LIBS="$GLU_LIBS $LIBS" | |
5716 | + | |
5717 | + | |
5718 | + | |
5719 | + | |
5720 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gluBeginCurve" >&5 | |
5721 | +$as_echo_n "checking for library containing gluBeginCurve... " >&6; } | |
5722 | +if ${ac_cv_search_gluBeginCurve+:} false; then : | |
5723 | + $as_echo_n "(cached) " >&6 | |
7502 | 5724 | else |
7503 | - pkg_failed=yes | |
5725 | + ac_func_search_save_LIBS=$LIBS | |
5726 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5727 | +/* end confdefs.h. */ | |
5728 | + | |
5729 | +/* Override any GCC internal prototype to avoid an error. | |
5730 | + Use char because int might match the return type of a GCC | |
5731 | + builtin and then its argument prototype would still apply. */ | |
5732 | +#ifdef __cplusplus | |
5733 | +extern "C" | |
5734 | +#endif | |
5735 | +char gluBeginCurve (); | |
5736 | +int | |
5737 | +main () | |
5738 | +{ | |
5739 | +return gluBeginCurve (); | |
5740 | + ; | |
5741 | + return 0; | |
5742 | +} | |
5743 | +_ACEOF | |
5744 | +for ac_lib in '' GLU glu MesaGLU glu32; do | |
5745 | + if test -z "$ac_lib"; then | |
5746 | + ac_res="none required" | |
5747 | + else | |
5748 | + ac_res=-l$ac_lib | |
5749 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5750 | + fi | |
5751 | + if ac_fn_c_try_link "$LINENO"; then : | |
5752 | + ac_cv_search_gluBeginCurve=$ac_res | |
7504 | 5753 | fi |
7505 | - else | |
7506 | - pkg_failed=untried | |
5754 | +rm -f core conftest.err conftest.$ac_objext \ | |
5755 | + conftest$ac_exeext | |
5756 | + if ${ac_cv_search_gluBeginCurve+:} false; then : | |
5757 | + break | |
7507 | 5758 | 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 | |
5759 | +done | |
5760 | +if ${ac_cv_search_gluBeginCurve+:} false; then : | |
5761 | + | |
7519 | 5762 | else |
7520 | - pkg_failed=yes | |
5763 | + ac_cv_search_gluBeginCurve=no | |
7521 | 5764 | fi |
7522 | - else | |
7523 | - pkg_failed=untried | |
5765 | +rm conftest.$ac_ext | |
5766 | +LIBS=$ac_func_search_save_LIBS | |
5767 | +fi | |
5768 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gluBeginCurve" >&5 | |
5769 | +$as_echo "$ac_cv_search_gluBeginCurve" >&6; } | |
5770 | +ac_res=$ac_cv_search_gluBeginCurve | |
5771 | +if test "$ac_res" != no; then : | |
5772 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5773 | + GLU_LIBS="${GLU_LIBS:-$ac_cv_search_gluBeginCurve}" | |
7524 | 5774 | fi |
7525 | 5775 | |
7526 | 5776 | |
7527 | 5777 | |
7528 | -if test $pkg_failed = yes; then | |
7529 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7530 | -$as_echo "no" >&6; } | |
7531 | 5778 | |
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 | -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 | |
5779 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
7544 | 5780 | |
7545 | - ax_check_glu_pkg_config=no | |
7546 | -elif test $pkg_failed = untried; then | |
7547 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
7548 | -$as_echo "no" >&6; } | |
7549 | - ax_check_glu_pkg_config=no | |
7550 | -else | |
7551 | - GLU_CFLAGS=$pkg_cv_GLU_CFLAGS | |
7552 | - GLU_LIBS=$pkg_cv_GLU_LIBS | |
7553 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
7554 | -$as_echo "yes" >&6; } | |
7555 | - ax_check_glu_pkg_config=yes | |
7556 | -fi | |
7557 | 5781 | |
7558 | - if test "X$ax_check_glu_pkg_config" = "Xyes"; then : | |
5782 | +LIBS="$_ax_glu_saved_flag_libs" | |
7559 | 5783 | |
7560 | - # check headers | |
7561 | - ac_ext=c | |
5784 | + | |
5785 | + | |
5786 | + | |
5787 | + ac_ext=c | |
7562 | 5788 | ac_cpp='$CPP $CPPFLAGS' |
7563 | 5789 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
7564 | 5790 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
7565 | 5791 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7566 | 5792 | |
7567 | - ax_check_glu_saved_libs="${LIBS}" | |
7568 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7569 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7570 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7571 | 5793 | |
7572 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7573 | - for ac_header in windows.h | |
5794 | + | |
5795 | + for ac_header in windows.h | |
7574 | 5796 | do : |
7575 | - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
7576 | -" | |
5797 | + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
7577 | 5798 | if test "x$ac_cv_header_windows_h" = xyes; then : |
7578 | 5799 | cat >>confdefs.h <<_ACEOF |
7579 | 5800 | #define HAVE_WINDOWS_H 1 |
@@ -7582,258 +5803,297 @@ _ACEOF | ||
7582 | 5803 | fi |
7583 | 5804 | |
7584 | 5805 | done |
5806 | + ;; #( | |
5807 | + # try first native | |
5808 | + *-mingw*) : | |
7585 | 5809 | |
7586 | - for ac_header in GL/glu.h OpenGL/glu.h | |
7587 | -do : | |
7588 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7589 | -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " | |
7590 | - $ac_includes_default | |
7591 | 5810 | |
7592 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
7593 | - # include <windows.h> | |
7594 | - # endif | |
5811 | + ac_ext=c | |
5812 | +ac_cpp='$CPP $CPPFLAGS' | |
5813 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
5814 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
5815 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7595 | 5816 | |
7596 | 5817 | |
7597 | -" | |
7598 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7599 | - cat >>confdefs.h <<_ACEOF | |
7600 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7601 | -_ACEOF | |
7602 | - ax_check_glu_have_headers="yes";break | |
7603 | -else | |
7604 | - ax_check_glu_have_headers_headers="no" | |
7605 | -fi | |
7606 | 5818 | |
7607 | -done | |
5819 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
5820 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
7608 | 5821 | |
7609 | - LIBS="${ax_check_glu_saved_libs}" | |
7610 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
7611 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
7612 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
7613 | 5822 | |
7614 | - ac_ext=c | |
7615 | -ac_cpp='$CPP $CPPFLAGS' | |
7616 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7617 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7618 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5823 | +_ax_glu_saved_flag_libs="$LIBS" | |
5824 | +LIBS="$GLU_LIBS $LIBS" | |
7619 | 5825 | |
7620 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility (GLU) headers" >&5 | |
7621 | -$as_echo_n "checking for OpenGL Utility (GLU) headers... " >&6; } | |
7622 | -if ${ax_cv_check_glu_have_headers+:} false; then : | |
7623 | - $as_echo_n "(cached) " >&6 | |
7624 | -else | |
7625 | - ax_cv_check_glu_have_headers="${ax_check_glu_have_headers}" | |
7626 | -fi | |
7627 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_have_headers" >&5 | |
7628 | -$as_echo "$ax_cv_check_glu_have_headers" >&6; } | |
7629 | 5826 | |
7630 | - # pkgconfig library are suposed to work ... | |
7631 | - if test "X$ax_cv_check_glu_have_headers" = "Xno"; then : | |
7632 | - as_fn_error $? "\"Pkgconfig detected OpenGL Utility (GLU) library has no headers!\"" "$LINENO" 5 | |
7633 | -fi | |
7634 | 5827 | |
7635 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL Utility (GLU) program" >&5 | |
7636 | -$as_echo_n "checking for compiling a minimal OpenGL Utility (GLU) program... " >&6; } | |
7637 | -if ${ax_cv_check_glu_compile_opengl+:} false; then : | |
5828 | + | |
5829 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gluBeginCurve" >&5 | |
5830 | +$as_echo_n "checking for library containing gluBeginCurve... " >&6; } | |
5831 | +if ${ac_cv_search_gluBeginCurve+:} false; then : | |
7638 | 5832 | $as_echo_n "(cached) " >&6 |
7639 | 5833 | else |
7640 | - ac_ext=c | |
7641 | -ac_cpp='$CPP $CPPFLAGS' | |
7642 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7643 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7644 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7645 | - | |
7646 | - ax_check_glu_saved_libs="${LIBS}" | |
7647 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7648 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7649 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7650 | - | |
7651 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7652 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
5834 | + ac_func_search_save_LIBS=$LIBS | |
5835 | +cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7653 | 5836 | /* end confdefs.h. */ |
7654 | 5837 | |
7655 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
7656 | -# include <windows.h> | |
7657 | -# endif | |
7658 | -# ifdef HAVE_GL_GLU_H | |
7659 | -# include <GL/glu.h> | |
7660 | -# elif defined(HAVE_OPENGL_GLU_H) | |
7661 | -# include <OpenGL/glu.h> | |
7662 | -# else | |
7663 | -# error no glu.h | |
7664 | -# endif | |
7665 | - | |
5838 | +/* Override any GCC internal prototype to avoid an error. | |
5839 | + Use char because int might match the return type of a GCC | |
5840 | + builtin and then its argument prototype would still apply. */ | |
5841 | +#ifdef __cplusplus | |
5842 | +extern "C" | |
5843 | +#endif | |
5844 | +char gluBeginCurve (); | |
7666 | 5845 | int |
7667 | 5846 | main () |
7668 | 5847 | { |
7669 | -gluBeginCurve(0) | |
5848 | +return gluBeginCurve (); | |
7670 | 5849 | ; |
7671 | 5850 | return 0; |
7672 | 5851 | } |
7673 | 5852 | _ACEOF |
7674 | -if ac_fn_c_try_compile "$LINENO"; then : | |
7675 | - ax_check_glu_compile_opengl="yes" | |
5853 | +for ac_lib in '' glu32 GLU glu MesaGLU; do | |
5854 | + if test -z "$ac_lib"; then | |
5855 | + ac_res="none required" | |
5856 | + else | |
5857 | + ac_res=-l$ac_lib | |
5858 | + LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
5859 | + fi | |
5860 | + if ac_fn_c_try_link "$LINENO"; then : | |
5861 | + ac_cv_search_gluBeginCurve=$ac_res | |
5862 | +fi | |
5863 | +rm -f core conftest.err conftest.$ac_objext \ | |
5864 | + conftest$ac_exeext | |
5865 | + if ${ac_cv_search_gluBeginCurve+:} false; then : | |
5866 | + break | |
5867 | +fi | |
5868 | +done | |
5869 | +if ${ac_cv_search_gluBeginCurve+:} false; then : | |
5870 | + | |
7676 | 5871 | else |
7677 | - ax_check_glu_compile_opengl="no" | |
5872 | + ac_cv_search_gluBeginCurve=no | |
5873 | +fi | |
5874 | +rm conftest.$ac_ext | |
5875 | +LIBS=$ac_func_search_save_LIBS | |
5876 | +fi | |
5877 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gluBeginCurve" >&5 | |
5878 | +$as_echo "$ac_cv_search_gluBeginCurve" >&6; } | |
5879 | +ac_res=$ac_cv_search_gluBeginCurve | |
5880 | +if test "$ac_res" != no; then : | |
5881 | + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
5882 | + GLU_LIBS="${GLU_LIBS:-$ac_cv_search_gluBeginCurve}" | |
7678 | 5883 | fi |
7679 | -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
7680 | - LIBS="${ax_check_glu_saved_libs}" | |
7681 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
7682 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
7683 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
7684 | 5884 | |
7685 | - ac_ext=c | |
5885 | + | |
5886 | + | |
5887 | + | |
5888 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
5889 | + | |
5890 | + | |
5891 | +LIBS="$_ax_glu_saved_flag_libs" | |
5892 | + | |
5893 | + | |
5894 | + | |
5895 | + | |
5896 | + ac_ext=c | |
7686 | 5897 | ac_cpp='$CPP $CPPFLAGS' |
7687 | 5898 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
7688 | 5899 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
7689 | 5900 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7690 | 5901 | |
7691 | 5902 | |
7692 | - ax_cv_check_glu_compile_opengl="${ax_check_glu_compile_opengl}" | |
7693 | -fi | |
7694 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_compile_opengl" >&5 | |
7695 | -$as_echo "$ax_cv_check_glu_compile_opengl" >&6; } | |
7696 | - ax_check_glu_compile_opengl="${ax_cv_check_glu_compile_opengl}" | |
7697 | 5903 | |
7698 | - if test "X$ax_cv_check_glu_compile_opengl" = "Xno"; then : | |
7699 | - as_fn_error $? "\"Pkgconfig detected OpenGL Utility (GLU) library could not be used for compiling minimal program!\"" "$LINENO" 5 | |
5904 | + for ac_header in windows.h | |
5905 | +do : | |
5906 | + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
5907 | +if test "x$ac_cv_header_windows_h" = xyes; then : | |
5908 | + cat >>confdefs.h <<_ACEOF | |
5909 | +#define HAVE_WINDOWS_H 1 | |
5910 | +_ACEOF | |
5911 | + | |
7700 | 5912 | fi |
7701 | 5913 | |
7702 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL Utility (GLU) program" >&5 | |
7703 | -$as_echo_n "checking for linking a minimal OpenGL Utility (GLU) program... " >&6; } | |
7704 | -if ${ax_cv_check_glu_link_opengl+:} false; then : | |
7705 | - $as_echo_n "(cached) " >&6 | |
7706 | -else | |
7707 | - ac_ext=c | |
7708 | -ac_cpp='$CPP $CPPFLAGS' | |
7709 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7710 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7711 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
5914 | +done | |
5915 | + ;; #( | |
5916 | + *) : | |
7712 | 5917 | |
7713 | - ax_check_glu_saved_libs="${LIBS}" | |
7714 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7715 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7716 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7717 | 5918 | |
7718 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7719 | - LIBS="${GLU_LIBS} ${LIBS}" | |
7720 | - LDFLAGS="${GLU_LDFLAGS} ${LDFLAGS}" | |
7721 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7722 | -/* end confdefs.h. */ | |
7723 | 5919 | |
7724 | -# if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
7725 | -# include <windows.h> | |
7726 | -# endif | |
7727 | -# ifdef HAVE_GL_GLU_H | |
7728 | -# include <GL/glu.h> | |
7729 | -# elif defined(HAVE_OPENGL_GLU_H) | |
7730 | -# include <OpenGL/glu.h> | |
7731 | -# else | |
7732 | -# error no glu.h | |
7733 | -# endif | |
7734 | 5920 | |
7735 | -int | |
7736 | -main () | |
7737 | -{ | |
7738 | -gluBeginCurve(0) | |
7739 | - ; | |
7740 | - return 0; | |
7741 | -} | |
7742 | -_ACEOF | |
7743 | -if ac_fn_c_try_link "$LINENO"; then : | |
7744 | - ax_check_glu_link_opengl="yes" | |
5921 | + | |
5922 | + | |
5923 | + | |
5924 | +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then | |
5925 | + if test -n "$ac_tool_prefix"; then | |
5926 | + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. | |
5927 | +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 | |
5928 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5929 | +$as_echo_n "checking for $ac_word... " >&6; } | |
5930 | +if ${ac_cv_path_PKG_CONFIG+:} false; then : | |
5931 | + $as_echo_n "(cached) " >&6 | |
7745 | 5932 | else |
7746 | - ax_check_glu_link_opengl="no" | |
5933 | + case $PKG_CONFIG in | |
5934 | + [\\/]* | ?:[\\/]*) | |
5935 | + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. | |
5936 | + ;; | |
5937 | + *) | |
5938 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5939 | +for as_dir in $PATH | |
5940 | +do | |
5941 | + IFS=$as_save_IFS | |
5942 | + test -z "$as_dir" && as_dir=. | |
5943 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
5944 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5945 | + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
5946 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5947 | + break 2 | |
5948 | + fi | |
5949 | +done | |
5950 | + done | |
5951 | +IFS=$as_save_IFS | |
5952 | + | |
5953 | + ;; | |
5954 | +esac | |
5955 | +fi | |
5956 | +PKG_CONFIG=$ac_cv_path_PKG_CONFIG | |
5957 | +if test -n "$PKG_CONFIG"; then | |
5958 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 | |
5959 | +$as_echo "$PKG_CONFIG" >&6; } | |
5960 | +else | |
5961 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
5962 | +$as_echo "no" >&6; } | |
7747 | 5963 | fi |
7748 | -rm -f core conftest.err conftest.$ac_objext \ | |
7749 | - conftest$ac_exeext conftest.$ac_ext | |
7750 | - LIBS="${ax_check_glu_saved_libs}" | |
7751 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
7752 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
7753 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
7754 | 5964 | |
7755 | - ac_ext=c | |
7756 | -ac_cpp='$CPP $CPPFLAGS' | |
7757 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7758 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7759 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7760 | 5965 | |
5966 | +fi | |
5967 | +if test -z "$ac_cv_path_PKG_CONFIG"; then | |
5968 | + ac_pt_PKG_CONFIG=$PKG_CONFIG | |
5969 | + # Extract the first word of "pkg-config", so it can be a program name with args. | |
5970 | +set dummy pkg-config; ac_word=$2 | |
5971 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
5972 | +$as_echo_n "checking for $ac_word... " >&6; } | |
5973 | +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : | |
5974 | + $as_echo_n "(cached) " >&6 | |
5975 | +else | |
5976 | + case $ac_pt_PKG_CONFIG in | |
5977 | + [\\/]* | ?:[\\/]*) | |
5978 | + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. | |
5979 | + ;; | |
5980 | + *) | |
5981 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5982 | +for as_dir in $PATH | |
5983 | +do | |
5984 | + IFS=$as_save_IFS | |
5985 | + test -z "$as_dir" && as_dir=. | |
5986 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
5987 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5988 | + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" | |
5989 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5990 | + break 2 | |
5991 | + fi | |
5992 | +done | |
5993 | + done | |
5994 | +IFS=$as_save_IFS | |
7761 | 5995 | |
7762 | - ax_cv_check_glu_link_opengl="${ax_check_glu_link_opengl}" | |
5996 | + ;; | |
5997 | +esac | |
7763 | 5998 | fi |
7764 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_link_opengl" >&5 | |
7765 | -$as_echo "$ax_cv_check_glu_link_opengl" >&6; } | |
7766 | - ax_check_glu_link_opengl="${ax_cv_check_glu_link_opengl}" | |
7767 | - | |
7768 | - if test "X$ax_cv_check_glu_link_opengl" = "Xno"; then : | |
7769 | - as_fn_error $? "\"Pkgconfig detected OpenGL Utility (GLU) library could not be used for linking minimal program!\"" "$LINENO" 5 | |
5999 | +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG | |
6000 | +if test -n "$ac_pt_PKG_CONFIG"; then | |
6001 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 | |
6002 | +$as_echo "$ac_pt_PKG_CONFIG" >&6; } | |
6003 | +else | |
6004 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6005 | +$as_echo "no" >&6; } | |
7770 | 6006 | fi |
7771 | 6007 | |
6008 | + if test "x$ac_pt_PKG_CONFIG" = x; then | |
6009 | + PKG_CONFIG="" | |
6010 | + else | |
6011 | + case $cross_compiling:$ac_tool_warned in | |
6012 | +yes:) | |
6013 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
6014 | +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
6015 | +ac_tool_warned=yes ;; | |
6016 | +esac | |
6017 | + PKG_CONFIG=$ac_pt_PKG_CONFIG | |
6018 | + fi | |
6019 | +else | |
6020 | + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" | |
7772 | 6021 | fi |
7773 | 6022 | |
7774 | 6023 | fi |
6024 | +if test -n "$PKG_CONFIG"; then | |
6025 | + _pkg_min_version=0.9.0 | |
6026 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 | |
6027 | +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } | |
6028 | + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then | |
6029 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6030 | +$as_echo "yes" >&6; } | |
6031 | + else | |
6032 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6033 | +$as_echo "no" >&6; } | |
6034 | + PKG_CONFIG="" | |
6035 | + fi | |
6036 | +fi | |
7775 | 6037 | |
7776 | - # if no pkg-config or pkg-config fail try manual way | |
7777 | - if test "X$ax_check_glu_pkg_config" = "Xno"; then : | |
7778 | - | |
7779 | -# inherit cflags | |
7780 | -GLU_CFLAGS="${GLU_CFLAGS} ${GL_CFLAGS}" | |
7781 | - | |
7782 | -# check headers | |
7783 | -ac_ext=c | |
7784 | -ac_cpp='$CPP $CPPFLAGS' | |
7785 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7786 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7787 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7788 | - | |
7789 | - ax_check_glu_saved_libs="${LIBS}" | |
7790 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7791 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7792 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7793 | - | |
7794 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7795 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
7796 | - for ac_header in windows.h | |
7797 | -do : | |
7798 | - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
7799 | -" | |
7800 | -if test "x$ac_cv_header_windows_h" = xyes; then : | |
7801 | - cat >>confdefs.h <<_ACEOF | |
7802 | -#define HAVE_WINDOWS_H 1 | |
7803 | -_ACEOF | |
6038 | +pkg_failed=no | |
6039 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glu" >&5 | |
6040 | +$as_echo_n "checking for glu... " >&6; } | |
7804 | 6041 | |
6042 | +if test -n "$GLU_CFLAGS"; then | |
6043 | + pkg_cv_GLU_CFLAGS="$GLU_CFLAGS" | |
6044 | + elif test -n "$PKG_CONFIG"; then | |
6045 | + if test -n "$PKG_CONFIG" && \ | |
6046 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5 | |
6047 | + ($PKG_CONFIG --exists --print-errors "glu") 2>&5 | |
6048 | + ac_status=$? | |
6049 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6050 | + test $ac_status = 0; }; then | |
6051 | + pkg_cv_GLU_CFLAGS=`$PKG_CONFIG --cflags "glu" 2>/dev/null` | |
6052 | + test "x$?" != "x0" && pkg_failed=yes | |
6053 | +else | |
6054 | + pkg_failed=yes | |
6055 | +fi | |
6056 | + else | |
6057 | + pkg_failed=untried | |
6058 | +fi | |
6059 | +if test -n "$GLU_LIBS"; then | |
6060 | + pkg_cv_GLU_LIBS="$GLU_LIBS" | |
6061 | + elif test -n "$PKG_CONFIG"; then | |
6062 | + if test -n "$PKG_CONFIG" && \ | |
6063 | + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glu\""; } >&5 | |
6064 | + ($PKG_CONFIG --exists --print-errors "glu") 2>&5 | |
6065 | + ac_status=$? | |
6066 | + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
6067 | + test $ac_status = 0; }; then | |
6068 | + pkg_cv_GLU_LIBS=`$PKG_CONFIG --libs "glu" 2>/dev/null` | |
6069 | + test "x$?" != "x0" && pkg_failed=yes | |
6070 | +else | |
6071 | + pkg_failed=yes | |
6072 | +fi | |
6073 | + else | |
6074 | + pkg_failed=untried | |
7805 | 6075 | fi |
7806 | 6076 | |
7807 | -done | |
7808 | - | |
7809 | - for ac_header in GL/glu.h OpenGL/glu.h | |
7810 | -do : | |
7811 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
7812 | -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " | |
7813 | - $ac_includes_default | |
7814 | 6077 | |
7815 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
7816 | - # include <windows.h> | |
7817 | - # endif | |
7818 | 6078 | |
6079 | +if test $pkg_failed = yes; then | |
6080 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6081 | +$as_echo "no" >&6; } | |
7819 | 6082 | |
7820 | -" | |
7821 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
7822 | - cat >>confdefs.h <<_ACEOF | |
7823 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7824 | -_ACEOF | |
7825 | - ax_check_glu_have_headers="yes";break | |
6083 | +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |
6084 | + _pkg_short_errors_supported=yes | |
7826 | 6085 | else |
7827 | - ax_check_glu_have_headers_headers="no" | |
6086 | + _pkg_short_errors_supported=no | |
7828 | 6087 | fi |
6088 | + if test $_pkg_short_errors_supported = yes; then | |
6089 | + GLU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glu" 2>&1` | |
6090 | + else | |
6091 | + GLU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glu" 2>&1` | |
6092 | + fi | |
6093 | + # Put the nasty error message in config.log where it belongs | |
6094 | + echo "$GLU_PKG_ERRORS" >&5 | |
7829 | 6095 | |
7830 | -done | |
7831 | 6096 | |
7832 | - # do not try darwin specific OpenGl/gl.h | |
7833 | - LIBS="${ax_check_glu_saved_libs}" | |
7834 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
7835 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
7836 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
7837 | 6097 | |
7838 | 6098 | ac_ext=c |
7839 | 6099 | ac_cpp='$CPP $CPPFLAGS' |
@@ -7843,30 +6103,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
7843 | 6103 | |
7844 | 6104 | |
7845 | 6105 | |
7846 | -if test "X$ax_check_glu_have_headers" = "Xyes"; then : | |
6106 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6107 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6108 | + | |
6109 | + | |
6110 | +_ax_glu_saved_flag_libs="$LIBS" | |
6111 | +LIBS="$GLU_LIBS $LIBS" | |
7847 | 6112 | |
7848 | - GLU_LIBS="${GLU_LIBS} ${GL_LIBS}" | |
7849 | - case ${host} in #( | |
7850 | - # try first cygwin version | |
7851 | - *-cygwin*) : | |
7852 | - ax_check_glu_manual_libs_generic_extra_libs="GLU glu MesaGLU glu32" | |
7853 | - if test "X$ax_check_glu_manual_libs_generic_extra_libs" = "X"; then : | |
7854 | - as_fn_error $? "AX_CHECK_GLU_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
7855 | -fi | |
7856 | 6113 | |
7857 | - ac_ext=c | |
7858 | -ac_cpp='$CPP $CPPFLAGS' | |
7859 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7860 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7861 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7862 | 6114 | |
7863 | - ax_check_glu_saved_libs="${LIBS}" | |
7864 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7865 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7866 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7867 | 6115 | |
7868 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7869 | - LIBS="${GLU_LIBS} ${LIBS}" | |
7870 | 6116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gluBeginCurve" >&5 |
7871 | 6117 | $as_echo_n "checking for library containing gluBeginCurve... " >&6; } |
7872 | 6118 | if ${ac_cv_search_gluBeginCurve+:} false; then : |
@@ -7891,7 +6137,7 @@ return gluBeginCurve (); | ||
7891 | 6137 | return 0; |
7892 | 6138 | } |
7893 | 6139 | _ACEOF |
7894 | -for ac_lib in '' $ax_check_glu_manual_libs_generic_extra_libs; do | |
6140 | +for ac_lib in '' GLU glu MesaGLU; do | |
7895 | 6141 | if test -z "$ac_lib"; then |
7896 | 6142 | ac_res="none required" |
7897 | 6143 | else |
@@ -7920,23 +6166,19 @@ $as_echo "$ac_cv_search_gluBeginCurve" >&6; } | ||
7920 | 6166 | ac_res=$ac_cv_search_gluBeginCurve |
7921 | 6167 | if test "$ac_res" != no; then : |
7922 | 6168 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
7923 | - ax_check_glu_lib_opengl="yes" | |
7924 | -else | |
7925 | - ax_check_glu_lib_opengl="no" | |
6169 | + GLU_LIBS="${GLU_LIBS:-$ac_cv_search_gluBeginCurve}" | |
7926 | 6170 | fi |
7927 | 6171 | |
7928 | - case $ac_cv_search_gluBeginCurve in #( | |
7929 | - "none required") : | |
7930 | - ;; #( | |
7931 | - no) : | |
7932 | - ;; #( | |
7933 | - *) : | |
7934 | - GLU_LIBS="${ac_cv_search_gluBeginCurve} ${GLU_LIBS}" ;; | |
7935 | -esac | |
7936 | - LIBS="${ax_check_glu_saved_libs}" | |
7937 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
7938 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
7939 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
6172 | + | |
6173 | + | |
6174 | + | |
6175 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6176 | + | |
6177 | + | |
6178 | +LIBS="$_ax_glu_saved_flag_libs" | |
6179 | + | |
6180 | + | |
6181 | + | |
7940 | 6182 | |
7941 | 6183 | ac_ext=c |
7942 | 6184 | ac_cpp='$CPP $CPPFLAGS' |
@@ -7944,13 +6186,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
7944 | 6186 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
7945 | 6187 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7946 | 6188 | |
7947 | - ;; #( | |
7948 | - # try first native | |
7949 | - *-mingw*) : | |
7950 | - ax_check_glu_manual_libs_generic_extra_libs="glu32 GLU glu MesaGLU" | |
7951 | - if test "X$ax_check_glu_manual_libs_generic_extra_libs" = "X"; then : | |
7952 | - as_fn_error $? "AX_CHECK_GLU_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
7953 | -fi | |
6189 | + | |
6190 | + | |
6191 | +elif test $pkg_failed = untried; then | |
6192 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6193 | +$as_echo "no" >&6; } | |
6194 | + | |
7954 | 6195 | |
7955 | 6196 | ac_ext=c |
7956 | 6197 | ac_cpp='$CPP $CPPFLAGS' |
@@ -7958,13 +6199,18 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
7958 | 6199 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
7959 | 6200 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
7960 | 6201 | |
7961 | - ax_check_glu_saved_libs="${LIBS}" | |
7962 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
7963 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
7964 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
7965 | 6202 | |
7966 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
7967 | - LIBS="${GLU_LIBS} ${LIBS}" | |
6203 | + | |
6204 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6205 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6206 | + | |
6207 | + | |
6208 | +_ax_glu_saved_flag_libs="$LIBS" | |
6209 | +LIBS="$GLU_LIBS $LIBS" | |
6210 | + | |
6211 | + | |
6212 | + | |
6213 | + | |
7968 | 6214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gluBeginCurve" >&5 |
7969 | 6215 | $as_echo_n "checking for library containing gluBeginCurve... " >&6; } |
7970 | 6216 | if ${ac_cv_search_gluBeginCurve+:} false; then : |
@@ -7989,7 +6235,7 @@ return gluBeginCurve (); | ||
7989 | 6235 | return 0; |
7990 | 6236 | } |
7991 | 6237 | _ACEOF |
7992 | -for ac_lib in '' $ax_check_glu_manual_libs_generic_extra_libs; do | |
6238 | +for ac_lib in '' GLU glu MesaGLU; do | |
7993 | 6239 | if test -z "$ac_lib"; then |
7994 | 6240 | ac_res="none required" |
7995 | 6241 | else |
@@ -8018,23 +6264,133 @@ $as_echo "$ac_cv_search_gluBeginCurve" >&6; } | ||
8018 | 6264 | ac_res=$ac_cv_search_gluBeginCurve |
8019 | 6265 | if test "$ac_res" != no; then : |
8020 | 6266 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
8021 | - ax_check_glu_lib_opengl="yes" | |
8022 | -else | |
8023 | - ax_check_glu_lib_opengl="no" | |
6267 | + GLU_LIBS="${GLU_LIBS:-$ac_cv_search_gluBeginCurve}" | |
8024 | 6268 | fi |
8025 | 6269 | |
8026 | - case $ac_cv_search_gluBeginCurve in #( | |
8027 | - "none required") : | |
8028 | - ;; #( | |
8029 | - no) : | |
8030 | - ;; #( | |
8031 | - *) : | |
8032 | - GLU_LIBS="${ac_cv_search_gluBeginCurve} ${GLU_LIBS}" ;; | |
6270 | + | |
6271 | + | |
6272 | + | |
6273 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6274 | + | |
6275 | + | |
6276 | +LIBS="$_ax_glu_saved_flag_libs" | |
6277 | + | |
6278 | + | |
6279 | + | |
6280 | + | |
6281 | + ac_ext=c | |
6282 | +ac_cpp='$CPP $CPPFLAGS' | |
6283 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6284 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6285 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6286 | + | |
6287 | + | |
6288 | + | |
6289 | +else | |
6290 | + GLU_CFLAGS=$pkg_cv_GLU_CFLAGS | |
6291 | + GLU_LIBS=$pkg_cv_GLU_LIBS | |
6292 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6293 | +$as_echo "yes" >&6; } | |
6294 | + | |
6295 | +fi | |
6296 | + ;; | |
8033 | 6297 | esac |
8034 | - LIBS="${ax_check_glu_saved_libs}" | |
8035 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
8036 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
8037 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
6298 | + | |
6299 | + case $host in #( | |
6300 | + *-darwin*) : | |
6301 | + if test "X$with_xquartz_gl" = "Xno"; then : | |
6302 | + | |
6303 | + | |
6304 | + ac_ext=c | |
6305 | +ac_cpp='$CPP $CPPFLAGS' | |
6306 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6307 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6308 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6309 | + | |
6310 | + | |
6311 | + | |
6312 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6313 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6314 | + | |
6315 | + | |
6316 | + | |
6317 | + for ac_header in OpenGL/glu.h | |
6318 | +do : | |
6319 | + ac_fn_c_check_header_compile "$LINENO" "OpenGL/glu.h" "ac_cv_header_OpenGL_glu_h" " | |
6320 | + $ac_includes_default | |
6321 | + | |
6322 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6323 | + # include <windows.h> | |
6324 | + # endif | |
6325 | + | |
6326 | + | |
6327 | +" | |
6328 | +if test "x$ac_cv_header_OpenGL_glu_h" = xyes; then : | |
6329 | + cat >>confdefs.h <<_ACEOF | |
6330 | +#define HAVE_OPENGL_GLU_H 1 | |
6331 | +_ACEOF | |
6332 | + ax_check_glu_have_headers="yes"; | |
6333 | +fi | |
6334 | + | |
6335 | +done | |
6336 | + | |
6337 | + | |
6338 | + | |
6339 | + | |
6340 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6341 | + | |
6342 | + | |
6343 | + | |
6344 | + ac_ext=c | |
6345 | +ac_cpp='$CPP $CPPFLAGS' | |
6346 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6347 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6348 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6349 | + | |
6350 | + | |
6351 | + | |
6352 | +else | |
6353 | + | |
6354 | + | |
6355 | + ac_ext=c | |
6356 | +ac_cpp='$CPP $CPPFLAGS' | |
6357 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6358 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6359 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6360 | + | |
6361 | + | |
6362 | + | |
6363 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6364 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6365 | + | |
6366 | + | |
6367 | + | |
6368 | + for ac_header in GL/glu.h | |
6369 | +do : | |
6370 | + ac_fn_c_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" " | |
6371 | + $ac_includes_default | |
6372 | + | |
6373 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6374 | + # include <windows.h> | |
6375 | + # endif | |
6376 | + | |
6377 | + | |
6378 | +" | |
6379 | +if test "x$ac_cv_header_GL_glu_h" = xyes; then : | |
6380 | + cat >>confdefs.h <<_ACEOF | |
6381 | +#define HAVE_GL_GLU_H 1 | |
6382 | +_ACEOF | |
6383 | + ax_check_glu_have_headers="yes"; | |
6384 | +fi | |
6385 | + | |
6386 | +done | |
6387 | + | |
6388 | + | |
6389 | + | |
6390 | + | |
6391 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6392 | + | |
6393 | + | |
8038 | 6394 | |
8039 | 6395 | ac_ext=c |
8040 | 6396 | ac_cpp='$CPP $CPPFLAGS' |
@@ -8042,12 +6398,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8042 | 6398 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8043 | 6399 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8044 | 6400 | |
8045 | - ;; #( | |
6401 | + | |
6402 | + | |
6403 | + | |
6404 | +fi ;; #( | |
8046 | 6405 | *) : |
8047 | - ax_check_glu_manual_libs_generic_extra_libs="GLU glu MesaGLU" | |
8048 | - if test "X$ax_check_glu_manual_libs_generic_extra_libs" = "X"; then : | |
8049 | - as_fn_error $? "AX_CHECK_GLU_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
8050 | -fi | |
6406 | + | |
8051 | 6407 | |
8052 | 6408 | ac_ext=c |
8053 | 6409 | ac_cpp='$CPP $CPPFLAGS' |
@@ -8055,83 +6411,39 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8055 | 6411 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8056 | 6412 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8057 | 6413 | |
8058 | - ax_check_glu_saved_libs="${LIBS}" | |
8059 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
8060 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
8061 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
8062 | 6414 | |
8063 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
8064 | - LIBS="${GLU_LIBS} ${LIBS}" | |
8065 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gluBeginCurve" >&5 | |
8066 | -$as_echo_n "checking for library containing gluBeginCurve... " >&6; } | |
8067 | -if ${ac_cv_search_gluBeginCurve+:} false; then : | |
8068 | - $as_echo_n "(cached) " >&6 | |
8069 | -else | |
8070 | - ac_func_search_save_LIBS=$LIBS | |
8071 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8072 | -/* end confdefs.h. */ | |
8073 | 6415 | |
8074 | -/* Override any GCC internal prototype to avoid an error. | |
8075 | - Use char because int might match the return type of a GCC | |
8076 | - builtin and then its argument prototype would still apply. */ | |
8077 | -#ifdef __cplusplus | |
8078 | -extern "C" | |
8079 | -#endif | |
8080 | -char gluBeginCurve (); | |
8081 | -int | |
8082 | -main () | |
8083 | -{ | |
8084 | -return gluBeginCurve (); | |
8085 | - ; | |
8086 | - return 0; | |
8087 | -} | |
6416 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6417 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6418 | + | |
6419 | + | |
6420 | + | |
6421 | + for ac_header in GL/glu.h | |
6422 | +do : | |
6423 | + ac_fn_c_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" " | |
6424 | + $ac_includes_default | |
6425 | + | |
6426 | + # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
6427 | + # include <windows.h> | |
6428 | + # endif | |
6429 | + | |
6430 | + | |
6431 | +" | |
6432 | +if test "x$ac_cv_header_GL_glu_h" = xyes; then : | |
6433 | + cat >>confdefs.h <<_ACEOF | |
6434 | +#define HAVE_GL_GLU_H 1 | |
8088 | 6435 | _ACEOF |
8089 | -for ac_lib in '' $ax_check_glu_manual_libs_generic_extra_libs; do | |
8090 | - if test -z "$ac_lib"; then | |
8091 | - ac_res="none required" | |
8092 | - else | |
8093 | - ac_res=-l$ac_lib | |
8094 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8095 | - fi | |
8096 | - if ac_fn_c_try_link "$LINENO"; then : | |
8097 | - ac_cv_search_gluBeginCurve=$ac_res | |
8098 | -fi | |
8099 | -rm -f core conftest.err conftest.$ac_objext \ | |
8100 | - conftest$ac_exeext | |
8101 | - if ${ac_cv_search_gluBeginCurve+:} false; then : | |
8102 | - break | |
6436 | + ax_check_glu_have_headers="yes"; | |
8103 | 6437 | fi |
6438 | + | |
8104 | 6439 | done |
8105 | -if ${ac_cv_search_gluBeginCurve+:} false; then : | |
8106 | 6440 | |
8107 | -else | |
8108 | - ac_cv_search_gluBeginCurve=no | |
8109 | -fi | |
8110 | -rm conftest.$ac_ext | |
8111 | -LIBS=$ac_func_search_save_LIBS | |
8112 | -fi | |
8113 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gluBeginCurve" >&5 | |
8114 | -$as_echo "$ac_cv_search_gluBeginCurve" >&6; } | |
8115 | -ac_res=$ac_cv_search_gluBeginCurve | |
8116 | -if test "$ac_res" != no; then : | |
8117 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8118 | - ax_check_glu_lib_opengl="yes" | |
8119 | -else | |
8120 | - ax_check_glu_lib_opengl="no" | |
8121 | -fi | |
8122 | 6441 | |
8123 | - case $ac_cv_search_gluBeginCurve in #( | |
8124 | - "none required") : | |
8125 | - ;; #( | |
8126 | - no) : | |
8127 | - ;; #( | |
8128 | - *) : | |
8129 | - GLU_LIBS="${ac_cv_search_gluBeginCurve} ${GLU_LIBS}" ;; | |
8130 | -esac | |
8131 | - LIBS="${ax_check_glu_saved_libs}" | |
8132 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
8133 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
8134 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
6442 | + | |
6443 | + | |
6444 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6445 | + | |
6446 | + | |
8135 | 6447 | |
8136 | 6448 | ac_ext=c |
8137 | 6449 | ac_cpp='$CPP $CPPFLAGS' |
@@ -8139,43 +6451,31 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8139 | 6451 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8140 | 6452 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8141 | 6453 | |
6454 | + | |
8142 | 6455 | ;; |
8143 | 6456 | esac |
8144 | 6457 | |
8145 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility (GLU) libraries" >&5 | |
8146 | -$as_echo_n "checking for OpenGL Utility (GLU) libraries... " >&6; } | |
8147 | -if ${ax_cv_check_glu_lib_opengl+:} false; then : | |
8148 | - $as_echo_n "(cached) " >&6 | |
8149 | -else | |
8150 | - ax_cv_check_glu_lib_opengl="${ax_check_glu_lib_opengl}" | |
8151 | -fi | |
8152 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_lib_opengl" >&5 | |
8153 | -$as_echo "$ax_cv_check_glu_lib_opengl" >&6; } | |
8154 | - ax_check_glu_lib_opengl="${ax_cv_check_glu_lib_opengl}" | |
8155 | - | |
8156 | -else | |
8157 | - ax_check_glu_lib_opengl="no" | |
8158 | -fi | |
8159 | - | |
8160 | -if test "X$ax_check_glu_lib_opengl" = "Xyes"; then : | |
8161 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL Utility (GLU) program" >&5 | |
6458 | + if test "X$ax_check_glu_have_headers" = "Xyes"; then : | |
6459 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL Utility (GLU) program" >&5 | |
8162 | 6460 | $as_echo_n "checking for compiling a minimal OpenGL Utility (GLU) program... " >&6; } |
8163 | -if ${ax_cv_check_glu_compile_opengl+:} false; then : | |
6461 | +if ${ax_cv_check_glu_compile+:} false; then : | |
8164 | 6462 | $as_echo_n "(cached) " >&6 |
8165 | 6463 | else |
8166 | - ac_ext=c | |
6464 | + | |
6465 | + ac_ext=c | |
8167 | 6466 | ac_cpp='$CPP $CPPFLAGS' |
8168 | 6467 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8169 | 6468 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8170 | 6469 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8171 | 6470 | |
8172 | - ax_check_glu_saved_libs="${LIBS}" | |
8173 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
8174 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
8175 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
8176 | 6471 | |
8177 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
8178 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6472 | + | |
6473 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6474 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6475 | + | |
6476 | + | |
6477 | + | |
6478 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8179 | 6479 | /* end confdefs.h. */ |
8180 | 6480 | |
8181 | 6481 | # if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
@@ -8198,54 +6498,57 @@ gluBeginCurve(0) | ||
8198 | 6498 | } |
8199 | 6499 | _ACEOF |
8200 | 6500 | if ac_fn_c_try_compile "$LINENO"; then : |
8201 | - ax_check_glu_compile_opengl="yes" | |
6501 | + ax_cv_check_glu_compile="yes" | |
8202 | 6502 | else |
8203 | - ax_check_glu_compile_opengl="no" | |
6503 | + ax_cv_check_glu_compile="no" | |
8204 | 6504 | fi |
8205 | 6505 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8206 | - LIBS="${ax_check_glu_saved_libs}" | |
8207 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
8208 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
8209 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
8210 | 6506 | |
8211 | - ac_ext=c | |
6507 | + | |
6508 | + | |
6509 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6510 | + | |
6511 | + | |
6512 | + | |
6513 | + ac_ext=c | |
8212 | 6514 | ac_cpp='$CPP $CPPFLAGS' |
8213 | 6515 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8214 | 6516 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8215 | 6517 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8216 | 6518 | |
8217 | 6519 | |
8218 | - ax_cv_check_glu_compile_opengl="${ax_check_glu_compile_opengl}" | |
8219 | 6520 | fi |
8220 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_compile_opengl" >&5 | |
8221 | -$as_echo "$ax_cv_check_glu_compile_opengl" >&6; } | |
8222 | - ax_check_glu_compile_opengl="${ax_cv_check_glu_compile_opengl}" | |
6521 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_compile" >&5 | |
6522 | +$as_echo "$ax_cv_check_glu_compile" >&6; } | |
8223 | 6523 | |
8224 | -else | |
8225 | - ax_cv_check_glu_compile_opengl="no" | |
8226 | 6524 | fi |
8227 | 6525 | |
8228 | -if test "X$ax_cv_check_glu_compile_opengl" = "Xyes"; then : | |
8229 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL Utility (GLU) program" >&5 | |
8230 | -$as_echo_n "checking for linking a minimal OpenGL Utility (GLU) program... " >&6; } | |
8231 | -if ${ax_cv_check_glu_link_opengl+:} false; then : | |
6526 | + if test "X$ax_cv_check_glu_compile" = "Xyes"; then : | |
6527 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal GLU program" >&5 | |
6528 | +$as_echo_n "checking for linking a minimal GLU program... " >&6; } | |
6529 | +if ${ax_cv_check_glu_link+:} false; then : | |
8232 | 6530 | $as_echo_n "(cached) " >&6 |
8233 | 6531 | else |
8234 | - ac_ext=c | |
6532 | + | |
6533 | + ac_ext=c | |
8235 | 6534 | ac_cpp='$CPP $CPPFLAGS' |
8236 | 6535 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8237 | 6536 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8238 | 6537 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8239 | 6538 | |
8240 | - ax_check_glu_saved_libs="${LIBS}" | |
8241 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
8242 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
8243 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
8244 | 6539 | |
8245 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
8246 | - LIBS="${GLU_LIBS} ${LIBS}" | |
8247 | - LDFLAGS="${GLU_LDFLAGS} ${LDFLAGS}" | |
8248 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6540 | + | |
6541 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6542 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6543 | + | |
6544 | + | |
6545 | +_ax_glu_saved_flag_libs="$LIBS" | |
6546 | +LIBS="$GLU_LIBS $LIBS" | |
6547 | + | |
6548 | + | |
6549 | + | |
6550 | + | |
6551 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8249 | 6552 | /* end confdefs.h. */ |
8250 | 6553 | |
8251 | 6554 | # if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
@@ -8268,49 +6571,42 @@ gluBeginCurve(0) | ||
8268 | 6571 | } |
8269 | 6572 | _ACEOF |
8270 | 6573 | if ac_fn_c_try_link "$LINENO"; then : |
8271 | - ax_check_glu_link_opengl="yes" | |
6574 | + ax_cv_check_glu_link="yes" | |
8272 | 6575 | else |
8273 | - ax_check_glu_link_opengl="no" | |
6576 | + ax_cv_check_glu_link="no" | |
8274 | 6577 | fi |
8275 | 6578 | rm -f core conftest.err conftest.$ac_objext \ |
8276 | 6579 | conftest$ac_exeext conftest.$ac_ext |
8277 | - LIBS="${ax_check_glu_saved_libs}" | |
8278 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
8279 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
8280 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
8281 | 6580 | |
8282 | - ac_ext=c | |
6581 | + | |
6582 | + | |
6583 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
6584 | + | |
6585 | + | |
6586 | +LIBS="$_ax_glu_saved_flag_libs" | |
6587 | + | |
6588 | + | |
6589 | + | |
6590 | + | |
6591 | + ac_ext=c | |
8283 | 6592 | ac_cpp='$CPP $CPPFLAGS' |
8284 | 6593 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8285 | 6594 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8286 | 6595 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8287 | 6596 | |
8288 | 6597 | |
8289 | - ax_cv_check_glu_link_opengl="${ax_check_glu_link_opengl}" | |
8290 | -fi | |
8291 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_link_opengl" >&5 | |
8292 | -$as_echo "$ax_cv_check_glu_link_opengl" >&6; } | |
8293 | - ax_check_glu_link_opengl="${ax_cv_check_glu_link_opengl}" | |
8294 | - | |
8295 | -else | |
8296 | - ax_cv_check_glu_link_opengl="no" | |
8297 | -fi | |
8298 | - | |
8299 | -if test "X$ax_cv_check_glu_link_opengl" = "Xyes"; then : | |
8300 | - no_glu="no" | |
8301 | -else | |
8302 | - no_glu="yes" | |
8303 | 6598 | fi |
6599 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glu_link" >&5 | |
6600 | +$as_echo "$ax_cv_check_glu_link" >&6; } | |
8304 | 6601 | |
8305 | -else | |
8306 | - no_glu=no | |
8307 | 6602 | fi |
8308 | 6603 | |
8309 | - # check broken implementation | |
8310 | - if test "X$no_glu" = "Xno"; then : | |
8311 | - | |
8312 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for varargs OpenGL Utility (GLU) tesselator callback function type" >&5 | |
8313 | -$as_echo_n "checking for varargs OpenGL Utility (GLU) tesselator callback function type... " >&6; } | |
6604 | +# | |
6605 | +# Some versions of Mac OS X include a broken interpretation of the GLU | |
6606 | +# tesselation callback function signature. | |
6607 | + if test "X$ax_cv_check_glu_link" = "Xyes"; then : | |
6608 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GLU varargs tesselator is using non-standard form" >&5 | |
6609 | +$as_echo_n "checking if GLU varargs tesselator is using non-standard form... " >&6; } | |
8314 | 6610 | if ${ax_cv_varargs_glu_tesscb+:} false; then : |
8315 | 6611 | $as_echo_n "(cached) " >&6 |
8316 | 6612 | else |
@@ -8321,13 +6617,14 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8321 | 6617 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8322 | 6618 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
8323 | 6619 | |
8324 | - ax_check_glu_saved_libs="${LIBS}" | |
8325 | -ax_check_glu_saved_cflags="${CFLAGS}" | |
8326 | -ax_check_glu_saved_cppflags="${CPPFLAGS}" | |
8327 | -ax_check_glu_saved_ldflags="${LDFLAGS}" | |
8328 | 6620 | |
8329 | - CFLAGS="${GLU_CFLAGS} ${CFLAGS}" | |
8330 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6621 | + | |
6622 | +_ax_glu_saved_flag_cflags="$CFLAGS" | |
6623 | +CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6624 | + | |
6625 | + | |
6626 | + | |
6627 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8331 | 6628 | /* end confdefs.h. */ |
8332 | 6629 | |
8333 | 6630 | # if defined(HAVE_WINDOWS_H) && defined(_WIN32) |
@@ -8351,261 +6648,81 @@ GLvoid (*func)(...); gluTessCallback(0, 0, func) | ||
8351 | 6648 | |
8352 | 6649 | _ACEOF |
8353 | 6650 | if ac_fn_cxx_try_compile "$LINENO"; then : |
8354 | - ax_check_glu_compile_varargs_tessvb_program="yes" | |
6651 | + ax_cv_varargs_glu_tesscb="yes" | |
8355 | 6652 | else |
8356 | - ax_check_glu_compile_varargs_tessvb_program="no" | |
6653 | + ax_cv_varargs_glu_tesscb="no" | |
8357 | 6654 | fi |
8358 | 6655 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8359 | - LIBS="${ax_check_glu_saved_libs}" | |
8360 | -CFLAGS="${ax_check_glu_saved_cflags}" | |
8361 | -CPPFLAGS="${ax_check_glu_saved_cppflags}" | |
8362 | -LDFLAGS="${ax_check_glu_saved_ldflags}" | |
8363 | - | |
8364 | - ac_ext=c | |
8365 | -ac_cpp='$CPP $CPPFLAGS' | |
8366 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8367 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8368 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8369 | - | |
8370 | - | |
8371 | - ax_cv_varargs_glu_tesscb="${ax_check_glu_compile_varargs_tessvb_program}" | |
8372 | -fi | |
8373 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_varargs_glu_tesscb" >&5 | |
8374 | -$as_echo "$ax_cv_varargs_glu_tesscb" >&6; } | |
8375 | -ax_check_glu_compile_varargs_tessvb_program="${ax_cv_varargs_glu_tesscb}" | |
8376 | - | |
8377 | -if test X$ax_cv_varargs_glu_tesscb = Xyes; then : | |
8378 | - | |
8379 | -$as_echo "#define HAVE_VARARGS_GLU_TESSCB 1" >>confdefs.h | |
8380 | - | |
8381 | -fi | |
8382 | - | |
8383 | -fi | |
8384 | - | |
8385 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working OpenGL Utility (GLU) implementation" >&5 | |
8386 | -$as_echo_n "checking for a working OpenGL Utility (GLU) implementation... " >&6; } | |
8387 | - if test "X$no_glu" = "Xno"; then : | |
8388 | - have_GLU="yes" | |
8389 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
8390 | -$as_echo "yes" >&6; } | |
8391 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS needed for OpenGL Utility (GLU)" >&5 | |
8392 | -$as_echo_n "checking for CFLAGS needed for OpenGL Utility (GLU)... " >&6; } | |
8393 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GLU_CFLAGS}\"" >&5 | |
8394 | -$as_echo "\"${GLU_CFLAGS}\"" >&6; } | |
8395 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBS needed for OpenGL Utility (GLU)" >&5 | |
8396 | -$as_echo_n "checking for LIBS needed for OpenGL Utility (GLU)... " >&6; } | |
8397 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GLU_LIBS}\"" >&5 | |
8398 | -$as_echo "\"${GLU_LIBS}\"" >&6; } | |
8399 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDFLAGS needed for OpenGL Utility (GLU)" >&5 | |
8400 | -$as_echo_n "checking for LDFLAGS needed for OpenGL Utility (GLU)... " >&6; } | |
8401 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${GLU_LDFLAGS}\"" >&5 | |
8402 | -$as_echo "\"${GLU_LDFLAGS}\"" >&6; } | |
8403 | -else | |
8404 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
8405 | -$as_echo "no" >&6; } | |
8406 | - GLU_CFLAGS="" | |
8407 | - GLU_LIBS="" | |
8408 | - GLU_LDFLAGS="" | |
8409 | -fi | |
8410 | - | |
8411 | 6656 | |
8412 | 6657 | |
8413 | 6658 | |
6659 | +CFLAGS="$_ax_glu_saved_flag_cflags" | |
8414 | 6660 | |
8415 | 6661 | |
8416 | 6662 | |
8417 | - # set flags | |
8418 | - no_glut="yes" | |
8419 | - have_GLUT="no" | |
8420 | - have_glut="no" | |
8421 | - | |
8422 | - | |
8423 | -GLUT_CFLAGS="${GLUT_CFLAGS} ${GLU_CFLAGS}" | |
8424 | -ac_ext=c | |
6663 | + ac_ext=c | |
8425 | 6664 | ac_cpp='$CPP $CPPFLAGS' |
8426 | 6665 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8427 | 6666 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8428 | 6667 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8429 | 6668 | |
8430 | - ax_check_glut_saved_libs="${LIBS}" | |
8431 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8432 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8433 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8434 | - | |
8435 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8436 | - # see comment in _AX_CHECK_GL_INCLUDES_DEFAULT | |
8437 | - for ac_header in windows.h | |
8438 | -do : | |
8439 | - ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default | |
8440 | -" | |
8441 | -if test "x$ac_cv_header_windows_h" = xyes; then : | |
8442 | - cat >>confdefs.h <<_ACEOF | |
8443 | -#define HAVE_WINDOWS_H 1 | |
8444 | -_ACEOF | |
8445 | 6669 | |
8446 | 6670 | fi |
6671 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_varargs_glu_tesscb" >&5 | |
6672 | +$as_echo "$ax_cv_varargs_glu_tesscb" >&6; } | |
6673 | + if test "X$ax_cv_varargs_glu_tesscb" = "yes"; then : | |
8447 | 6674 | |
8448 | -done | |
8449 | - | |
8450 | - for ac_header in GL/glut.h OpenGL/glut.h | |
8451 | -do : | |
8452 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
8453 | -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " | |
8454 | - $ac_includes_default | |
8455 | - | |
8456 | - # if defined(HAVE_WINDOWS_H) && defined(_WIN32) | |
8457 | - # include <windows.h> | |
8458 | - # endif | |
8459 | - | |
6675 | +$as_echo "#define HAVE_VARARGS_GLU_TESSCB 1" >>confdefs.h | |
8460 | 6676 | |
8461 | -" | |
8462 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |
8463 | - cat >>confdefs.h <<_ACEOF | |
8464 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8465 | -_ACEOF | |
8466 | - ax_check_glut_have_headers="yes";break | |
8467 | -else | |
8468 | - ax_check_glut_have_headers_headers="no" | |
8469 | 6677 | fi |
8470 | 6678 | |
8471 | -done | |
8472 | - | |
8473 | - # do not try darwin specific OpenGl/gl.h | |
8474 | - LIBS="${ax_check_glut_saved_libs}" | |
8475 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
8476 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
8477 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
8478 | - | |
8479 | - ac_ext=c | |
8480 | -ac_cpp='$CPP $CPPFLAGS' | |
8481 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8482 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8483 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8484 | - | |
8485 | - | |
8486 | - | |
8487 | -if test "X$ax_check_glut_have_headers" = "Xyes"; then : | |
8488 | - | |
8489 | - GLUT_LIBS="${GLUT_LIBS} ${GLU_LIBS}" | |
8490 | - case ${host} in #( | |
8491 | - # try first cygwin version | |
8492 | - *-cygwin*) : | |
8493 | - ax_check_glut_manual_libs_generic_extra_libs="GLUT glut MesaGLUT freeglut freeglut32 glut32" | |
8494 | - if test "X$ax_check_glut_manual_libs_generic_extra_libs" = "X"; then : | |
8495 | - as_fn_error $? "AX_CHECK_GLUT_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
8496 | 6679 | fi |
8497 | 6680 | |
8498 | - ac_ext=c | |
8499 | -ac_cpp='$CPP $CPPFLAGS' | |
8500 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8501 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8502 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8503 | - | |
8504 | - ax_check_glut_saved_libs="${LIBS}" | |
8505 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8506 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8507 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8508 | - | |
8509 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8510 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
8511 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glutMainLoop" >&5 | |
8512 | -$as_echo_n "checking for library containing glutMainLoop... " >&6; } | |
8513 | -if ${ac_cv_search_glutMainLoop+:} false; then : | |
8514 | - $as_echo_n "(cached) " >&6 | |
8515 | -else | |
8516 | - ac_func_search_save_LIBS=$LIBS | |
8517 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8518 | -/* end confdefs.h. */ | |
6681 | + if test "X$ax_cv_check_glu_link" = "Xyes"; then : | |
8519 | 6682 | |
8520 | -/* Override any GCC internal prototype to avoid an error. | |
8521 | - Use char because int might match the return type of a GCC | |
8522 | - builtin and then its argument prototype would still apply. */ | |
8523 | -#ifdef __cplusplus | |
8524 | -extern "C" | |
8525 | -#endif | |
8526 | -char glutMainLoop (); | |
8527 | -int | |
8528 | -main () | |
8529 | -{ | |
8530 | -return glutMainLoop (); | |
8531 | - ; | |
8532 | - return 0; | |
8533 | -} | |
8534 | -_ACEOF | |
8535 | -for ac_lib in '' $ax_check_glut_manual_libs_generic_extra_libs; do | |
8536 | - if test -z "$ac_lib"; then | |
8537 | - ac_res="none required" | |
8538 | - else | |
8539 | - ac_res=-l$ac_lib | |
8540 | - LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8541 | - fi | |
8542 | - if ac_fn_c_try_link "$LINENO"; then : | |
8543 | - ac_cv_search_glutMainLoop=$ac_res | |
8544 | -fi | |
8545 | -rm -f core conftest.err conftest.$ac_objext \ | |
8546 | - conftest$ac_exeext | |
8547 | - if ${ac_cv_search_glutMainLoop+:} false; then : | |
8548 | - break | |
8549 | -fi | |
8550 | -done | |
8551 | -if ${ac_cv_search_glutMainLoop+:} false; then : | |
6683 | +$as_echo "#define HAVE_GLU 1" >>confdefs.h | |
8552 | 6684 | |
6685 | + CFLAGS="$GLU_CFLAGS $CFLAGS" | |
6686 | + LIBS="$GLU_LIBS $LIBS" | |
8553 | 6687 | else |
8554 | - ac_cv_search_glutMainLoop=no | |
8555 | -fi | |
8556 | -rm conftest.$ac_ext | |
8557 | -LIBS=$ac_func_search_save_LIBS | |
8558 | -fi | |
8559 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_glutMainLoop" >&5 | |
8560 | -$as_echo "$ac_cv_search_glutMainLoop" >&6; } | |
8561 | -ac_res=$ac_cv_search_glutMainLoop | |
8562 | -if test "$ac_res" != no; then : | |
8563 | - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
8564 | - ax_check_glut_lib_opengl="yes" | |
8565 | -else | |
8566 | - ax_check_glut_lib_opengl="no" | |
6688 | + as_fn_error $? "Could not find a valid GLU implementation" "$LINENO" 5 | |
6689 | + | |
8567 | 6690 | fi |
8568 | 6691 | |
8569 | - case $ac_cv_search_glutMainLoop in #( | |
8570 | - "none required") : | |
8571 | - ;; #( | |
8572 | - no) : | |
8573 | - ;; #( | |
8574 | - *) : | |
8575 | - GLUT_LIBS="${ac_cv_search_glutMainLoop} ${GLU_LIBS}" ;; | |
8576 | -esac | |
8577 | - LIBS="${ax_check_glut_saved_libs}" | |
8578 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
8579 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
8580 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
8581 | 6692 | |
8582 | - ac_ext=c | |
8583 | -ac_cpp='$CPP $CPPFLAGS' | |
8584 | -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
8585 | -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
8586 | -ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
8587 | 6693 | |
8588 | - ;; #( | |
8589 | - # try first native | |
8590 | - *-mingw*) : | |
8591 | - ax_check_glut_manual_libs_generic_extra_libs="glut32 GLUT glut MesaGLUT freeglut freeglut32" | |
8592 | - if test "X$ax_check_glut_manual_libs_generic_extra_libs" = "X"; then : | |
8593 | - as_fn_error $? "AX_CHECK_GLUT_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
8594 | -fi | |
8595 | 6694 | |
8596 | - ac_ext=c | |
6695 | + | |
6696 | + | |
6697 | + case ${host} in #( | |
6698 | + *-darwin*) : | |
6699 | + if test "x$with_xquartz_gl" != "xno"; then : | |
6700 | + GLUT_LIBS="${GLUT_LIBS:--lGLUT}" | |
6701 | +else | |
6702 | + GLUT_LIBS="${GLUT_LIBS:--framework GLUT}" | |
6703 | +fi ;; #( | |
6704 | + *-cygwin*|*-mingw*) : | |
6705 | + | |
6706 | + | |
6707 | + | |
6708 | + | |
6709 | + | |
6710 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
6711 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
6712 | + | |
6713 | + | |
6714 | +_ax_glut_saved_flag_libs="$LIBS" | |
6715 | +LIBS="$GLUT_LIBS $LIBS" | |
6716 | + | |
6717 | + | |
6718 | + | |
6719 | + ac_ext=c | |
8597 | 6720 | ac_cpp='$CPP $CPPFLAGS' |
8598 | 6721 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8599 | 6722 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8600 | 6723 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8601 | 6724 | |
8602 | - ax_check_glut_saved_libs="${LIBS}" | |
8603 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8604 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8605 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8606 | 6725 | |
8607 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8608 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
8609 | 6726 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glutMainLoop" >&5 |
8610 | 6727 | $as_echo_n "checking for library containing glutMainLoop... " >&6; } |
8611 | 6728 | if ${ac_cv_search_glutMainLoop+:} false; then : |
@@ -8630,7 +6747,7 @@ return glutMainLoop (); | ||
8630 | 6747 | return 0; |
8631 | 6748 | } |
8632 | 6749 | _ACEOF |
8633 | -for ac_lib in '' $ax_check_glut_manual_libs_generic_extra_libs; do | |
6750 | +for ac_lib in '' glut32 glut; do | |
8634 | 6751 | if test -z "$ac_lib"; then |
8635 | 6752 | ac_res="none required" |
8636 | 6753 | else |
@@ -8659,23 +6776,19 @@ $as_echo "$ac_cv_search_glutMainLoop" >&6; } | ||
8659 | 6776 | ac_res=$ac_cv_search_glutMainLoop |
8660 | 6777 | if test "$ac_res" != no; then : |
8661 | 6778 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
8662 | - ax_check_glut_lib_opengl="yes" | |
8663 | -else | |
8664 | - ax_check_glut_lib_opengl="no" | |
6779 | + GLUT_LIBS="${GLUT_LIBS:-$ac_cv_search_glutMainLoop}" | |
8665 | 6780 | fi |
8666 | 6781 | |
8667 | - case $ac_cv_search_glutMainLoop in #( | |
8668 | - "none required") : | |
8669 | - ;; #( | |
8670 | - no) : | |
8671 | - ;; #( | |
8672 | - *) : | |
8673 | - GLUT_LIBS="${ac_cv_search_glutMainLoop} ${GLU_LIBS}" ;; | |
8674 | -esac | |
8675 | - LIBS="${ax_check_glut_saved_libs}" | |
8676 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
8677 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
8678 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
6782 | + | |
6783 | + | |
6784 | + | |
6785 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
6786 | + | |
6787 | + | |
6788 | +LIBS="$_ax_glut_saved_flag_libs" | |
6789 | + | |
6790 | + | |
6791 | + | |
8679 | 6792 | |
8680 | 6793 | ac_ext=c |
8681 | 6794 | ac_cpp='$CPP $CPPFLAGS' |
@@ -8683,26 +6796,42 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8683 | 6796 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8684 | 6797 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8685 | 6798 | |
8686 | - ;; #( | |
8687 | - *) : | |
8688 | - ax_check_glut_manual_libs_generic_extra_libs="GLUT glut freeglut MesaGLUT" | |
8689 | - if test "X$ax_check_glut_manual_libs_generic_extra_libs" = "X"; then : | |
8690 | - as_fn_error $? "AX_CHECK_GLUT_MANUAL_LIBS_GENERIC argument must no be empty" "$LINENO" 5 | |
6799 | + | |
6800 | + | |
6801 | + for ac_header in windows.h | |
6802 | +do : | |
6803 | + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" | |
6804 | +if test "x$ac_cv_header_windows_h" = xyes; then : | |
6805 | + cat >>confdefs.h <<_ACEOF | |
6806 | +#define HAVE_WINDOWS_H 1 | |
6807 | +_ACEOF | |
6808 | + | |
8691 | 6809 | fi |
8692 | 6810 | |
8693 | - ac_ext=c | |
6811 | +done | |
6812 | + | |
6813 | + ;; #( | |
6814 | + *) : | |
6815 | + | |
6816 | + | |
6817 | + | |
6818 | + | |
6819 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
6820 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
6821 | + | |
6822 | + | |
6823 | +_ax_glut_saved_flag_libs="$LIBS" | |
6824 | +LIBS="$GLUT_LIBS $LIBS" | |
6825 | + | |
6826 | + | |
6827 | + | |
6828 | + ac_ext=c | |
8694 | 6829 | ac_cpp='$CPP $CPPFLAGS' |
8695 | 6830 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8696 | 6831 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8697 | 6832 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8698 | 6833 | |
8699 | - ax_check_glut_saved_libs="${LIBS}" | |
8700 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8701 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8702 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8703 | 6834 | |
8704 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8705 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
8706 | 6835 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing glutMainLoop" >&5 |
8707 | 6836 | $as_echo_n "checking for library containing glutMainLoop... " >&6; } |
8708 | 6837 | if ${ac_cv_search_glutMainLoop+:} false; then : |
@@ -8727,7 +6856,7 @@ return glutMainLoop (); | ||
8727 | 6856 | return 0; |
8728 | 6857 | } |
8729 | 6858 | _ACEOF |
8730 | -for ac_lib in '' $ax_check_glut_manual_libs_generic_extra_libs; do | |
6859 | +for ac_lib in '' glut; do | |
8731 | 6860 | if test -z "$ac_lib"; then |
8732 | 6861 | ac_res="none required" |
8733 | 6862 | else |
@@ -8756,23 +6885,19 @@ $as_echo "$ac_cv_search_glutMainLoop" >&6; } | ||
8756 | 6885 | ac_res=$ac_cv_search_glutMainLoop |
8757 | 6886 | if test "$ac_res" != no; then : |
8758 | 6887 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
8759 | - ax_check_glut_lib_opengl="yes" | |
8760 | -else | |
8761 | - ax_check_glut_lib_opengl="no" | |
6888 | + GLUT_LIBS="${GLUT_LIBS:-$ac_cv_search_glutMainLoop}" | |
8762 | 6889 | fi |
8763 | 6890 | |
8764 | - case $ac_cv_search_glutMainLoop in #( | |
8765 | - "none required") : | |
8766 | - ;; #( | |
8767 | - no) : | |
8768 | - ;; #( | |
8769 | - *) : | |
8770 | - GLUT_LIBS="${ac_cv_search_glutMainLoop} ${GLU_LIBS}" ;; | |
8771 | -esac | |
8772 | - LIBS="${ax_check_glut_saved_libs}" | |
8773 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
8774 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
8775 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
6891 | + | |
6892 | + | |
6893 | + | |
6894 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
6895 | + | |
6896 | + | |
6897 | +LIBS="$_ax_glut_saved_flag_libs" | |
6898 | + | |
6899 | + | |
6900 | + | |
8776 | 6901 | |
8777 | 6902 | ac_ext=c |
8778 | 6903 | ac_cpp='$CPP $CPPFLAGS' |
@@ -8780,43 +6905,166 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
8780 | 6905 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8781 | 6906 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8782 | 6907 | |
8783 | - ;; | |
6908 | + | |
6909 | + | |
6910 | + ;; | |
8784 | 6911 | esac |
6912 | + case ${host} in #( | |
6913 | + *-darwin*) : | |
6914 | + if test "x$with_xquartz_gl" = "xno"; then : | |
8785 | 6915 | |
8786 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL Utility Toolkit (GLUT) libraries" >&5 | |
8787 | -$as_echo_n "checking for OpenGL Utility Toolkit (GLUT) libraries... " >&6; } | |
8788 | -if ${ax_cv_check_glut_lib_opengl+:} false; then : | |
8789 | - $as_echo_n "(cached) " >&6 | |
8790 | -else | |
8791 | - ax_cv_check_glut_lib_opengl="${ax_check_glut_lib_opengl}" | |
6916 | + | |
6917 | + | |
6918 | + | |
6919 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
6920 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
6921 | + | |
6922 | + | |
6923 | + ac_ext=c | |
6924 | +ac_cpp='$CPP $CPPFLAGS' | |
6925 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6926 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6927 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6928 | + | |
6929 | + | |
6930 | + for ac_header in GLUT/glut.h | |
6931 | +do : | |
6932 | + ac_fn_c_check_header_mongrel "$LINENO" "GLUT/glut.h" "ac_cv_header_GLUT_glut_h" "$ac_includes_default" | |
6933 | +if test "x$ac_cv_header_GLUT_glut_h" = xyes; then : | |
6934 | + cat >>confdefs.h <<_ACEOF | |
6935 | +#define HAVE_GLUT_GLUT_H 1 | |
6936 | +_ACEOF | |
6937 | + ax_check_glut_have_headers=yes | |
8792 | 6938 | fi |
8793 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_lib_opengl" >&5 | |
8794 | -$as_echo "$ax_cv_check_glut_lib_opengl" >&6; } | |
8795 | - ax_check_glut_lib_opengl="${ax_cv_check_glut_lib_opengl}" | |
6939 | + | |
6940 | +done | |
6941 | + | |
6942 | + | |
6943 | + | |
6944 | + | |
6945 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
6946 | + | |
6947 | + | |
6948 | + | |
6949 | + ac_ext=c | |
6950 | +ac_cpp='$CPP $CPPFLAGS' | |
6951 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6952 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6953 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6954 | + | |
6955 | + | |
8796 | 6956 | |
8797 | 6957 | else |
8798 | - ax_check_glut_lib="no" | |
6958 | + | |
6959 | + | |
6960 | + | |
6961 | + | |
6962 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
6963 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
6964 | + | |
6965 | + | |
6966 | + ac_ext=c | |
6967 | +ac_cpp='$CPP $CPPFLAGS' | |
6968 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6969 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6970 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6971 | + | |
6972 | + | |
6973 | + for ac_header in GL/glut.h | |
6974 | +do : | |
6975 | + ac_fn_c_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default" | |
6976 | +if test "x$ac_cv_header_GL_glut_h" = xyes; then : | |
6977 | + cat >>confdefs.h <<_ACEOF | |
6978 | +#define HAVE_GL_GLUT_H 1 | |
6979 | +_ACEOF | |
6980 | + ax_check_glut_have_headers=yes | |
6981 | +fi | |
6982 | + | |
6983 | +done | |
6984 | + | |
6985 | + | |
6986 | + | |
6987 | + | |
6988 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
6989 | + | |
6990 | + | |
6991 | + | |
6992 | + ac_ext=c | |
6993 | +ac_cpp='$CPP $CPPFLAGS' | |
6994 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
6995 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
6996 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
6997 | + | |
6998 | + | |
6999 | + | |
7000 | + | |
7001 | +fi ;; #( | |
7002 | + *) : | |
7003 | + | |
7004 | + | |
7005 | + | |
7006 | + | |
7007 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
7008 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
7009 | + | |
7010 | + | |
7011 | + ac_ext=c | |
7012 | +ac_cpp='$CPP $CPPFLAGS' | |
7013 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7014 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7015 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7016 | + | |
7017 | + | |
7018 | + for ac_header in GL/glut.h | |
7019 | +do : | |
7020 | + ac_fn_c_check_header_mongrel "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default" | |
7021 | +if test "x$ac_cv_header_GL_glut_h" = xyes; then : | |
7022 | + cat >>confdefs.h <<_ACEOF | |
7023 | +#define HAVE_GL_GLUT_H 1 | |
7024 | +_ACEOF | |
7025 | + ax_check_glut_have_headers=yes | |
8799 | 7026 | fi |
8800 | 7027 | |
8801 | -if test "X$ax_check_glut_lib_opengl" = "Xyes"; then : | |
8802 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal OpenGL Utility Toolkit (GLUT) program" >&5 | |
8803 | -$as_echo_n "checking for compiling a minimal OpenGL Utility Toolkit (GLUT) program... " >&6; } | |
8804 | -if ${ax_cv_check_glut_compile_opengl+:} false; then : | |
7028 | +done | |
7029 | + | |
7030 | + | |
7031 | + | |
7032 | + | |
7033 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
7034 | + | |
7035 | + | |
7036 | + | |
7037 | + ac_ext=c | |
7038 | +ac_cpp='$CPP $CPPFLAGS' | |
7039 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
7040 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
7041 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
7042 | + | |
7043 | + | |
7044 | + ;; | |
7045 | +esac | |
7046 | + | |
7047 | + if test "X$ax_check_glut_have_headers" = "Xyes"; then : | |
7048 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling a minimal GLUT program" >&5 | |
7049 | +$as_echo_n "checking for compiling a minimal GLUT program... " >&6; } | |
7050 | +if ${ax_cv_check_glut_compile+:} false; then : | |
8805 | 7051 | $as_echo_n "(cached) " >&6 |
8806 | 7052 | else |
8807 | - ac_ext=c | |
7053 | + | |
7054 | + | |
7055 | + | |
7056 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
7057 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
7058 | + | |
7059 | + | |
7060 | + ac_ext=c | |
8808 | 7061 | ac_cpp='$CPP $CPPFLAGS' |
8809 | 7062 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8810 | 7063 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8811 | 7064 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8812 | 7065 | |
8813 | - ax_check_glut_saved_libs="${LIBS}" | |
8814 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8815 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8816 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8817 | 7066 | |
8818 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8819 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7067 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8820 | 7068 | /* end confdefs.h. */ |
8821 | 7069 | |
8822 | 7070 | # if HAVE_WINDOWS_H && defined(_WIN32) |
@@ -8838,54 +7086,58 @@ glutMainLoop() | ||
8838 | 7086 | } |
8839 | 7087 | _ACEOF |
8840 | 7088 | if ac_fn_c_try_compile "$LINENO"; then : |
8841 | - ax_check_glut_compile_opengl="yes" | |
7089 | + ax_cv_check_glut_compile="yes" | |
8842 | 7090 | else |
8843 | - ax_check_glut_compile_opengl="no" | |
7091 | + ax_cv_check_glut_compile="no" | |
8844 | 7092 | fi |
8845 | 7093 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
8846 | - LIBS="${ax_check_glut_saved_libs}" | |
8847 | -CFLAGS="${ax_check_glut_saved_cflags}" | |
8848 | -CPPFLAGS="${ax_check_glut_saved_cppflags}" | |
8849 | -LDFLAGS="${ax_check_glut_saved_ldflags}" | |
8850 | 7094 | |
8851 | - ac_ext=c | |
7095 | + | |
7096 | + | |
7097 | +CFLAGS="$_ax_glut_saved_flag_cflags" | |
7098 | + | |
7099 | + | |
7100 | + | |
7101 | + ac_ext=c | |
8852 | 7102 | ac_cpp='$CPP $CPPFLAGS' |
8853 | 7103 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8854 | 7104 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8855 | 7105 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8856 | 7106 | |
8857 | 7107 | |
8858 | - ax_cv_check_glut_compile_opengl="${ax_check_glut_compile_opengl}" | |
7108 | + | |
8859 | 7109 | fi |
8860 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_compile_opengl" >&5 | |
8861 | -$as_echo "$ax_cv_check_glut_compile_opengl" >&6; } | |
8862 | - ax_check_glut_compile_opengl="${ax_cv_check_glut_compile_opengl}" | |
7110 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_glut_compile" >&5 | |
7111 | +$as_echo "$ax_cv_check_glut_compile" >&6; } | |
8863 | 7112 | |
8864 | -else | |
8865 | - ax_cv_check_glut_compile_opengl="no" | |
8866 | 7113 | fi |
8867 | 7114 | |
8868 | -if test "X$ax_cv_check_glut_compile_opengl" = "Xyes"; then : | |
8869 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal OpenGL Utility Toolkit (GLUT) program" >&5 | |
8870 | -$as_echo_n "checking for linking a minimal OpenGL Utility Toolkit (GLUT) program... " >&6; } | |
8871 | -if ${ax_cv_check_glut_link_opengl+:} false; then : | |
7115 | + if test "X$ax_cv_check_glut_compile" = "Xyes"; then : | |
7116 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking a minimal GLUT program" >&5 | |
7117 | +$as_echo_n "checking for linking a minimal GLUT program... " >&6; } | |
7118 | +if ${ax_cv_check_glut_link+:} false; then : | |
8872 | 7119 | $as_echo_n "(cached) " >&6 |
8873 | 7120 | else |
8874 | - ac_ext=c | |
7121 | + | |
7122 | + | |
7123 | + | |
7124 | +_ax_glut_saved_flag_cflags="$CFLAGS" | |
7125 | +CFLAGS="$GLUT_CFLAGS $CFLAGS" | |
7126 | + | |
7127 | + | |
7128 | +_ax_glut_saved_flag_libs="$LIBS" | |
7129 | +LIBS="$GLUT_LIBS $LIBS" | |
7130 | + | |
7131 | + | |
7132 | + | |
7133 | + ac_ext=c | |
8875 | 7134 | ac_cpp='$CPP $CPPFLAGS' |
8876 | 7135 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
8877 | 7136 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
8878 | 7137 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
8879 | 7138 | |
8880 | - ax_check_glut_saved_libs="${LIBS}" | |
8881 | -ax_check_glut_saved_cflags="${CFLAGS}" | |
8882 | -ax_check_glut_saved_cppflags="${CPPFLAGS}" | |
8883 | -ax_check_glut_saved_ldflags="${LDFLAGS}" | |
8884 | 7139 | |
8885 | - CFLAGS="${GLUT_CFLAGS} ${CFLAGS}" | |
8886 | - LIBS="${GLUT_LIBS} ${LIBS}" | |
8887 | - LDFLAGS="${GLUT_LDFLAGS} ${LDFLAGS}" | |
8888 | - cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
7140 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
8889 | 7141 | /* end confdefs.h. */ |
8890 | 7142 | |
8891 | 7143 | # if HAVE_WINDOWS_H && defined(_WIN32) |
@@ -8907,70 +7159,49 @@ glutMainLoop() | ||
8907 | 7159 | } |
8908 | 7160 | _ACEOF |
8909 | 7161 | if ac_fn_c_try_link "$LINENO"; then : |
8910 | - ax_check_glut_link_opengl="yes" | |
7162 | + ax_cv_check_glut_link="yes" | |
8911 | 7163 |