[try this for a non-standard install prefix of the oniguruma library])], ,
[with_oniguruma=yes])
+onig_CFLAGS=
+onig_LDFLAGS=
build_oniguruma=no
AS_IF([test "x$with_oniguruma" != xno], [
save_CFLAGS="$CFLAGS"
], [
onig_CFLAGS="-I${with_oniguruma}/include"
onig_LDFLAGS="-L${with_oniguruma}/lib"
- CFLAGS="$CFLAGS $onig_CFLAGS"
- LDFLAGS="$LDFLAGS $onig_LDFLAGS"
])
])
AS_IF([test "x$build_oniguruma" = xno], [
- # check for ONIGURUMA library
+ # check for ONIGURUMA library, either in /usr or where requested
+ CFLAGS="$CFLAGS $onig_CFLAGS"
+ LDFLAGS="$LDFLAGS $onig_LDFLAGS"
AC_CHECK_HEADER("oniguruma.h",
AC_CHECK_LIB([onig],[onig_version]))
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"
-
# handle check results
AS_IF([test "x$ac_cv_lib_onig_onig_version" != "xyes"], [
build_oniguruma=yes
AS_IF([test "x$build_oniguruma" = xyes], [
onig_CFLAGS="-I${srcdir}/modules/oniguruma/src"
onig_LDFLAGS="-L${srcdir}/modules/oniguruma/src -Wl,-rpath,${libdir}"
- CFLAGS="$CFLAGS $onig_CFLAGS"
- LDFLAGS="$LDFLAGS $onig_LDFLAGS"
AC_CONFIG_SUBDIRS([modules/oniguruma])
AC_DEFINE([HAVE_LIBONIG],1,[Define to 1 if the system includes libonig])
])
- AC_SUBST(onig_CFLAGS)
- AC_SUBST(onig_LDFLAGS)
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"
])
+AC_SUBST(onig_CFLAGS)
+AC_SUBST(onig_LDFLAGS)
AM_CONDITIONAL([BUILD_ONIGURUMA], [test "x$build_oniguruma" = xyes])
AC_SUBST([BUNDLER], ["$bundle_cmd"])