autoconfiscated
This commit is contained in:
parent
be18a22bce
commit
d8a101f54e
7 changed files with 184 additions and 42 deletions
5
m4/.gitignore
vendored
Normal file
5
m4/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
24
m4/ax_let.m4
Normal file
24
m4/ax_let.m4
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#serial 1
|
||||
# Author: Michael Weber <michaelw@cs.utwente.nl>
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_LET(VAR1, EXPR1,
|
||||
# [VAR2, EXPR2,]...
|
||||
# BODY)
|
||||
#
|
||||
m4_define([AX_LET_counter_],0)
|
||||
m4_define([AX_LET_AUX], [dnl
|
||||
m4_if([$#], 2, [$1
|
||||
$2], [dnl
|
||||
ax_let_$2_[]AX_LET_counter_[]_tmp_=$3
|
||||
AX_LET_AUX([m4_if([$1],[],[],[$1
|
||||
])dnl
|
||||
ax_let_$2_[]AX_LET_counter_="[$]$2"
|
||||
$2="[$]ax_let_$2_[]AX_LET_counter_[]_tmp_"], m4_shiftn(3,$@))
|
||||
$2="[$]ax_let_$2_[]AX_LET_counter_"])])dnl
|
||||
|
||||
AC_DEFUN([AX_LET],
|
||||
[m4_define([AX_LET_counter_], m4_incr(AX_LET_counter_))dnl
|
||||
# AX_LET
|
||||
AX_LET_AUX([],$@)])
|
||||
46
m4/ax_try_cflags_ifelse.m4
Normal file
46
m4/ax_try_cflags_ifelse.m4
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#serial 1
|
||||
# Author: Michael Weber <michaelw@cs.utwente.nl>
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_TRY_CFLAGS_IFELSE(VAR, FLAGS...[, ACTION-IF-TRUE[, ACTION-IF-FALSE]])
|
||||
#
|
||||
AC_DEFUN([AX_TRY_CFLAGS_IFELSE],
|
||||
[AX_LET([CFLAGS],["$CFLAGS $1"],
|
||||
[AC_MSG_CHECKING([whether compiler accepts $1])
|
||||
AC_LANG_PUSH(C)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[ax_try_cflags_ifelse_res=yes],
|
||||
[ax_try_cflags_ifelse_res=no])])
|
||||
AC_LANG_POP(C)
|
||||
AC_MSG_RESULT([$ax_try_cflags_ifelse_res])
|
||||
AS_IF([test x"$ax_try_cflags_ifelse_res" = xyes],
|
||||
[ifelse([$2],,
|
||||
[AC_SUBST(CFLAGS, ["$CFLAGS $1"])],
|
||||
[$2])
|
||||
:]
|
||||
[$3
|
||||
:])
|
||||
])
|
||||
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_TRY_CXXFLAGS_IFELSE(VAR, FLAGS...[, ACTION-IF-TRUE[, ACTION-IF-FALSE]])
|
||||
#
|
||||
AC_DEFUN([AX_TRY_CXXFLAGS_IFELSE],
|
||||
[AX_LET([CXXFLAGS],["$CXXFLAGS $1"],
|
||||
[AC_MSG_CHECKING([whether compiler accepts $1])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
|
||||
[ax_try_cflags_ifelse_res=yes],
|
||||
[ax_try_cflags_ifelse_res=no])
|
||||
AC_LANG_POP(C++)])
|
||||
AC_MSG_RESULT([$ax_try_cflags_ifelse_res])
|
||||
AS_IF([test x"$ax_try_cflags_ifelse_res" = xyes],
|
||||
[ifelse([$2],,
|
||||
[AC_SUBST(CXXFLAGS, ["$CXXFLAGS $1"])],
|
||||
[$2])
|
||||
:]
|
||||
[$3
|
||||
:])
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue