diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-09-08 22:07:42 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-09-08 22:07:42 +0900 |
commit | 4732847654ed74ed893b7ea088805832fd91cc18 (patch) | |
tree | 393207d68983c3b587733b83714bef2de2457025 /m4 | |
download | xmlstarlet-4732847654ed74ed893b7ea088805832fd91cc18.tar.gz xmlstarlet-4732847654ed74ed893b7ea088805832fd91cc18.tar.bz2 xmlstarlet-4732847654ed74ed893b7ea088805832fd91cc18.zip |
tizen 2.3.1 releasetizen_2.4_mobile_releasetizen_2.3.1_releasesubmit/tizen_2.4/20151028.063429submit/tizen_2.3.1/20150915.075556accepted/tizen/2.4/mobile/20151029.035146tizen_2.4tizen_2.3.1accepted/tizen_2.4_mobile
Diffstat (limited to 'm4')
-rw-r--r-- | m4/quiet-rule.m4 | 12 | ||||
-rw-r--r-- | m4/xstar-check-libs.m4 | 49 |
2 files changed, 61 insertions, 0 deletions
diff --git a/m4/quiet-rule.m4 b/m4/quiet-rule.m4 new file mode 100644 index 0000000..29004e6 --- /dev/null +++ b/m4/quiet-rule.m4 @@ -0,0 +1,12 @@ +# serial 1 -*- mode: autoconf -*- +# SILENT_RULE(varname, [echo = varname]) +# defines V_varname to use for silent make rules +AC_DEFUN([np_SILENT_RULE],[dnl +m4_pushdef([varname], $1)dnl +m4_pushdef([echoname], [m4_default($2, varname)])dnl +# make silent rule for $1 +AC_SUBST(V_[]varname, ["\$(V_[]varname[]_$AM_V)"])dnl +AC_SUBST(V_[]varname[]_, ["\$(V_[]varname[]_$AM_DEFAULT_VERBOSITY)"])dnl +AC_SUBST(V_[]varname[]_0, ['@echo " echoname [$]@";'])dnl +m4_popdef([varname], [echoname])dnl +]) diff --git a/m4/xstar-check-libs.m4 b/m4/xstar-check-libs.m4 new file mode 100644 index 0000000..e5404cc --- /dev/null +++ b/m4/xstar-check-libs.m4 @@ -0,0 +1,49 @@ +# serial 1 -*- mode: autoconf -*- + +# XSTAR_LIB_ARGS_WITH(LIBXXX, [with-src = []]) +dnl pass [with-src] to get the --with-libxxx-src option +AC_DEFUN([XSTAR_LIB_ARGS_WITH], +[m4_pushdef([LIBXXX], $1)dnl +m4_pushdef([libxxx], m4_tolower(LIBXXX))dnl +AC_ARG_WITH(libxxx-prefix, + AS_HELP_STRING(--with-libxxx-prefix=[PFX], + Specify location of libxxx), + [LIBXXX()_PREFIX="$withval"]) +AC_ARG_WITH(libxxx-include-prefix, + AS_HELP_STRING([--with-libxxx-include-prefix=[PFX]], + Specify location of libxxx headers), + [LIBXXX()_INCDIR="$withval"]) +AC_ARG_WITH(libxxx-libs-prefix, + AS_HELP_STRING([--with-libxxx-libs-prefix=[PFX]], + Specify location of libxxx libs), + [LIBXXX()_LIBDIR="$withval"]) +m4_if($2, [with-src], +[AC_ARG_WITH(libxxx-src, + AS_HELP_STRING([--with-libxxx-src=[DIR]], + For libxxx that's not installed yet (sets all three above)), + [LIBXXX()_SRCDIR="$withval" + LIBXXX()_LIBDIR="$LIBXXX()_SRCDIR/.libs"])]) +m4_popdef([libxxx], [LIBXXX])]) + +# XSTAR_LIB_CHECK(LIBXXX, xxx-config) +# set LIBXXX_INCDIR and LIBXXX_LIBDIR based on location of xxx-config +# also check xxx-config --version against LIBXXX_REQUIRED_VERSION +# Ignores xxx-config if LIBXXX_SRCDIR is set +AC_DEFUN([XSTAR_LIB_CHECK], +[m4_pushdef([LIBXXX], $1) + m4_pushdef([libxxx], m4_tolower(LIBXXX)) + m4_pushdef([xxx_config], $2) + AS_IF([test "x$LIBXXX()_SRCDIR" != x], + [AC_MSG_NOTICE([using libxxx src dir "$LIBXXX()_SRCDIR"]) + AC_MSG_WARN([not checking libxxx version])], + [AC_PATH_PROG(LIBXXX()_CONFIG, xxx_config(), + [], [$LIBXXX()_PREFIX/bin$PATH_SEPARATOR$PATH]) + AS_IF([test "x$LIBXXX()_CONFIG" = x], [AC_MSG_FAILURE([xxx_config not found])]) + LIBXXX()_VERSION=$($LIBXXX()_CONFIG --version) + AS_VERSION_COMPARE([$LIBXXX()_VERSION], [$LIBXXX()_REQUIRED_VERSION], + [AC_MSG_ERROR([xmlstarlet needs at least libxxx version $LIBXXX()_REQUIRED_VERSION (http://www.xmlsoft.org/)])]) + AC_MSG_NOTICE([using libxxx-$LIBXXX()_VERSION]) + LIBXXX()_PREFIX=`AS_DIRNAME($LIBXXX()_CONFIG)` + LIBXXX()_PREFIX=`AS_DIRNAME($LIBXXX()_PREFIX)` + : ${LIBXXX()_LIBDIR="$LIBXXX()_PREFIX/lib"}]) + m4_popdef([xxx_config], [libxxx], [LIBXXX])]) |