From a66b63ba702c26f07c1726014f31766f056d085d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 7 May 2015 14:35:44 +0000 Subject: [PATCH] fixed mac issues --- ax_init_standard_project.m4 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index d27f299..8dcfb24 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -65,7 +65,7 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [ # $1 = variable name AC_DEFUN([AX_SUBST], [ AC_SUBST([$1]) - tmp_var=$(echo "${$1}" | sed ':a;N;$!ba;s/\n/\\n/g') + tmp_var=$(echo "${$1}" | awk 1 ORS='\\n') tmp_var=${tmp_var//\"/\\\"} tmp_var=${tmp_var//\'/\'\"\'\"\'} tmp_var=${tmp_var//#/\\#} @@ -364,10 +364,10 @@ AC_DEFUN([AX_PKG_REQUIRE], [ done if test ${$1_found} -eq 0; then for p in /usr/include ${$1_CFLAGS}; do - $1_file=$(find ${p\#-I} -name $3) - if test -e ${$1_file}; then - AC_MSG_WARN([Header file $3 found in ${$1_file%/$3}]) - $1_CFLAGS="${$1_CFLAGS} -I${p\#-I}/${$1_file%/$3}" + $1_file=$(find ${p#-I} -name $3) + if test -e "${$1_file}"; then + AC_MSG_NOTICE([Header file $3 found in sub path as ${$1_file}]) + $1_CFLAGS="${$1_CFLAGS} -I${$1_file%/$3}" $1_found=1 break fi @@ -397,7 +397,8 @@ AC_DEFUN([AX_PKG_REQUIRE], [ for p in /usr/include ${$1_CFLAGS}; do $1_file=$(find ${p#-I} -name $3) if test -e ${$1_file}; then - $1_CFLAGS="${$1_CFLAGS} -I${$1_file%/*}" + AC_MSG_NOTICE([Header file $3 found in sub path as ${$1_file}]) + $1_CFLAGS="${$1_CFLAGS} -I${$1_file%/$3}" $1_found=1 break fi