Hello,.

When calculate SVN_SERF_INCLUDES macro in serf.m4, it removes any '-D' in string. If $serf_major was installed into directory with '-D' in its path, such as "My-Demo", then get wrong value of SVN_SERF_INCLUDES.

[[[
Improve the regex of sed command of SVN_SERF_INCLUDES macro

The regex of sed command is too simple, which mangles any "-D"
in strings, for example, a path name is "My-Demo", it will be removed
from the path by the sed regex, which causes a build failure. Improving
it to only delete the -D behind of a space or the -D at start of a string.
]]]

--
Regards,
Neil | Kai Kang

Index: build/ac-macros/serf.m4
===================================================================
--- build/ac-macros/serf.m4	(revision 1689799)
+++ build/ac-macros/serf.m4	(working copy)
@@ -168,7 +168,7 @@
         if $PKG_CONFIG $serf_pc_arg --atleast-version=$serf_check_version; then
           AC_MSG_RESULT([yes])
           serf_found=yes
-          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/-D[^ ]*//g'`]
+          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/[[:space:]]-D[^ ]*//g' -e 's/^-D[^ ]*//g'`]
           SVN_SERF_LIBS=`$PKG_CONFIG $serf_pc_arg --libs-only-l` 
           dnl don't use --libs-only-L because then we might miss some options
           LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`"]

Reply via email to