mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
Update the autoconf macros and helper scripts to the current versions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
24 lines
925 B
Plaintext
24 lines
925 B
Plaintext
dnl --------------------------------------------------------------------------
|
|
dnl PA_ADD_FLAGS(variable, flag [,actual_flag [,success [,failure]]])
|
|
dnl
|
|
dnl Attempt to add the given option to CPPFLAGS, if it doesn't break
|
|
dnl compilation. If the option to be tested is different than the
|
|
dnl option that should actually be added, add the option to be
|
|
dnl actually added as a second argument.
|
|
dnl --------------------------------------------------------------------------
|
|
AC_DEFUN([PA_ADD_FLAGS],
|
|
[AC_MSG_CHECKING([if $CC accepts $2])
|
|
pa_add_flags__old_flags="$$1"
|
|
$1="$$1 $2"
|
|
AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
|
|
[printf("Hello, World!\n");])],
|
|
[AC_MSG_RESULT([yes])
|
|
$1="$pa_add_flags__old_flags ifelse([$3],[],[$2],[$3])"
|
|
AC_DEFINE(PA_SYM([$1_],[$2]), 1,
|
|
[Define to 1 if compiled with the `$2' compiler flag])
|
|
$4],
|
|
[AC_MSG_RESULT([no])
|
|
$1="$pa_add_flags__old_flags"
|
|
$5])])
|