|
|
@ -90,16 +90,19 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [ |
|
|
|
fi |
|
|
|
fi |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS |
|
|
|
# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS and a |
|
|
|
|
|
|
|
# notz only a @name@ replacement, but also a @name_ENCODED@ one to be |
|
|
|
|
|
|
|
# used in code. |
|
|
|
# - parameters: |
|
|
|
# - parameters: |
|
|
|
# $1 = variable name |
|
|
|
# $1 = variable name |
|
|
|
AC_DEFUN([AX_SUBST], [ |
|
|
|
AC_DEFUN([AX_SUBST], [ |
|
|
|
|
|
|
|
[$1]_ENCODED=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,') |
|
|
|
|
|
|
|
[$1]_ENCODED=${[$1]_ENCODED//\"/\\\"} |
|
|
|
|
|
|
|
[$1]_ENCODED=${[$1]_ENCODED//\'/\'\"\'\"\'} |
|
|
|
|
|
|
|
[$1]_ENCODED=${[$1]_ENCODED//#/\\#} |
|
|
|
|
|
|
|
AM_CPPFLAGS+=" '-D$1=\"${[$1]_ENCODED}\"'" |
|
|
|
AC_SUBST([$1]) |
|
|
|
AC_SUBST([$1]) |
|
|
|
tmp_var=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,') |
|
|
|
AC_SUBST([$1]_ENCODED) |
|
|
|
tmp_var=${tmp_var//\"/\\\"} |
|
|
|
|
|
|
|
tmp_var=${tmp_var//\'/\'\"\'\"\'} |
|
|
|
|
|
|
|
tmp_var=${tmp_var//#/\\#} |
|
|
|
|
|
|
|
AM_CPPFLAGS+=" '-D$1=\"${tmp_var}\"'" |
|
|
|
|
|
|
|
AC_SUBST(AM_CPPFLAGS) |
|
|
|
AC_SUBST(AM_CPPFLAGS) |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|