128 |
# Set the current language to LANG. |
# Set the current language to LANG. |
129 |
m4_defun([AC_LANG], |
m4_defun([AC_LANG], |
130 |
[_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), |
[_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), |
131 |
[$1])dnl |
[$1])dnl |
132 |
m4_define([_AC_LANG], [$1])]) |
m4_define([_AC_LANG], [$1])]) |
133 |
|
|
134 |
|
|
137 |
# Save the current language, and use LANG. |
# Save the current language, and use LANG. |
138 |
m4_defun([AC_LANG_PUSH], |
m4_defun([AC_LANG_PUSH], |
139 |
[_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), |
[_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), |
140 |
[$1])dnl |
[$1])dnl |
141 |
m4_pushdef([_AC_LANG], [$1])]) |
m4_pushdef([_AC_LANG], [$1])]) |
142 |
|
|
143 |
|
|
161 |
# Save the current language, but don't change language. |
# Save the current language, but don't change language. |
162 |
AU_DEFUN([AC_LANG_SAVE], |
AU_DEFUN([AC_LANG_SAVE], |
163 |
[AC_DIAGNOSE([obsolete], |
[AC_DIAGNOSE([obsolete], |
164 |
[instead of using `AC_LANG', `AC_LANG_SAVE', |
[instead of using `AC_LANG', `AC_LANG_SAVE', |
165 |
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.]) |
and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.]) |
166 |
m4_pushdef([_AC_LANG], _AC_LANG)]) |
m4_pushdef([_AC_LANG], _AC_LANG)]) |
167 |
|
|
275 |
# instance, the latter must be AC_DEFUN'd, not just define'd. |
# instance, the latter must be AC_DEFUN'd, not just define'd. |
276 |
m4_define([AC_LANG_COMPILER], |
m4_define([AC_LANG_COMPILER], |
277 |
[AC_BEFORE([AC_LANG_COMPILER(]_AC_LANG[)], |
[AC_BEFORE([AC_LANG_COMPILER(]_AC_LANG[)], |
278 |
[AC_LANG_PREPROC(]_AC_LANG[)])dnl |
[AC_LANG_PREPROC(]_AC_LANG[)])dnl |
279 |
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) |
_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) |
280 |
|
|
281 |
|
|
284 |
# Ensure we have a compiler for the current LANG. |
# Ensure we have a compiler for the current LANG. |
285 |
AC_DEFUN([AC_LANG_COMPILER_REQUIRE], |
AC_DEFUN([AC_LANG_COMPILER_REQUIRE], |
286 |
[m4_require([AC_LANG_COMPILER(]_AC_LANG[)], |
[m4_require([AC_LANG_COMPILER(]_AC_LANG[)], |
287 |
[AC_LANG_COMPILER])]) |
[AC_LANG_COMPILER])]) |
288 |
|
|
289 |
|
|
290 |
|
|
300 |
# continuation line, and warn instead of reporting an error. |
# continuation line, and warn instead of reporting an error. |
301 |
m4_define([_AC_LANG_COMPILER_GNU], |
m4_define([_AC_LANG_COMPILER_GNU], |
302 |
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler], |
[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler], |
303 |
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu], |
[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu], |
304 |
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __GNUC__ |
[_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __GNUC__ |
305 |
choke me |
choke me |
306 |
#endif |
#endif |
307 |
]])], |
]])], |
308 |
[ac_compiler_gnu=yes], |
[ac_compiler_gnu=yes], |
309 |
[ac_compiler_gnu=no]) |
[ac_compiler_gnu=no]) |
310 |
ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu |
ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu |
311 |
])])# _AC_LANG_COMPILER_GNU |
])])# _AC_LANG_COMPILER_GNU |
312 |
|
|
327 |
# Ensure we have a preprocessor for the current language. |
# Ensure we have a preprocessor for the current language. |
328 |
AC_DEFUN([AC_LANG_PREPROC_REQUIRE], |
AC_DEFUN([AC_LANG_PREPROC_REQUIRE], |
329 |
[m4_require([AC_LANG_PREPROC(]_AC_LANG[)], |
[m4_require([AC_LANG_PREPROC(]_AC_LANG[)], |
330 |
[AC_LANG_PREPROC])]) |
[AC_LANG_PREPROC])]) |
331 |
|
|
332 |
|
|
333 |
# AC_REQUIRE_CPP |
# AC_REQUIRE_CPP |
458 |
test -f "$ac_file" || continue |
test -f "$ac_file" || continue |
459 |
case $ac_file in |
case $ac_file in |
460 |
_AC_COMPILER_EXEEXT_REJECT ) |
_AC_COMPILER_EXEEXT_REJECT ) |
461 |
;; |
;; |
462 |
conftest.$ac_ext ) |
conftest.$ac_ext ) |
463 |
# This is the source file. |
# This is the source file. |
464 |
;; |
;; |
465 |
[[ab]].out ) |
[[ab]].out ) |
466 |
# We found the default executable, but exeext='' is most |
# We found the default executable, but exeext='' is most |
467 |
# certainly right. |
# certainly right. |
468 |
break;; |
break;; |
469 |
*.* ) |
*.* ) |
470 |
ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` |
ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` |
471 |
# FIXME: I believe we export ac_cv_exeext for Libtool, |
# FIXME: I believe we export ac_cv_exeext for Libtool, |
472 |
# but it would be cool to find out if it's true. Does anybody |
# but it would be cool to find out if it's true. Does anybody |
473 |
# maintain Libtool? --akim. |
# maintain Libtool? --akim. |
474 |
export ac_cv_exeext |
export ac_cv_exeext |
475 |
break;; |
break;; |
476 |
* ) |
* ) |
477 |
break;; |
break;; |
478 |
esac |
esac |
479 |
done], |
done], |
480 |
[_AC_MSG_LOG_CONFTEST |
[_AC_MSG_LOG_CONFTEST |
534 |
case $ac_file in |
case $ac_file in |
535 |
_AC_COMPILER_EXEEXT_REJECT ) ;; |
_AC_COMPILER_EXEEXT_REJECT ) ;; |
536 |
*.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` |
*.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` |
537 |
export ac_cv_exeext |
export ac_cv_exeext |
538 |
break;; |
break;; |
539 |
* ) break;; |
* ) break;; |
540 |
esac |
esac |
541 |
done], |
done], |
542 |
[AC_MSG_FAILURE([cannot compute suffix of executables: cannot compile and link])]) |
[AC_MSG_FAILURE([cannot compute suffix of executables: cannot compile and link])]) |
543 |
rm -f conftest$ac_cv_exeext |
rm -f conftest$ac_cv_exeext |
544 |
AC_MSG_RESULT([$ac_cv_exeext]) |
AC_MSG_RESULT([$ac_cv_exeext]) |
545 |
])# _AC_COMPILER_EXEEXT_O |
])# _AC_COMPILER_EXEEXT_O |