diff --git a/configure b/configure index 0a5f15ed3c3191dd8ba025915cc46f39635889bd..e5867713436893d2cb1354a6bc430164a9326d72 100755 --- a/configure +++ b/configure @@ -10845,6 +10845,68 @@ fi LIBS="$_LIBS" +fi + +if test "$enable_mapreduce" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yaml_parser_initialize" >&5 +$as_echo_n "checking for library containing yaml_parser_initialize... " >&6; } +if ${ac_cv_search_yaml_parser_initialize+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char yaml_parser_initialize (); +int +main () +{ +return yaml_parser_initialize (); + ; + return 0; +} +_ACEOF +for ac_lib in '' yaml; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_yaml_parser_initialize=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_yaml_parser_initialize+:} false; then : + break +fi +done +if ${ac_cv_search_yaml_parser_initialize+:} false; then : + +else + ac_cv_search_yaml_parser_initialize=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yaml_parser_initialize" >&5 +$as_echo "$ac_cv_search_yaml_parser_initialize" >&6; } +ac_res=$ac_cv_search_yaml_parser_initialize +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + have_yaml=yes +else + as_fn_error $? "libyaml is required for Greenplum Mapreduce" "$LINENO" 5 +fi + + fi if test "$enable_gpperfmon" = yes; then diff --git a/configure.in b/configure.in index 53ea354d0aaa22c68184696a8a433f780b7e1ada..860c442f95283dfcae45c9a3748ce981dfa71ea7 100644 --- a/configure.in +++ b/configure.in @@ -1308,6 +1308,11 @@ if test "$enable_gpfdist" = yes ; then AC_SUBST(have_yaml) fi +if test "$enable_mapreduce" = yes; then + AC_SEARCH_LIBS(yaml_parser_initialize, [yaml], [have_yaml=yes], [AC_MSG_ERROR([libyaml is required for Greenplum Mapreduce])]) + AC_SUBST(have_yaml) +fi + if test "$enable_gpperfmon" = yes; then CHECK_APR() GPAC_PATH_APU_1_CONFIG diff --git a/gpAux/extensions/gpmapreduce/Makefile b/gpAux/extensions/gpmapreduce/Makefile index 81ea887e5b99cec2a25ab94c3704d917216f64fe..499831f6177234fc862d62db3e0103670e76df68 100644 --- a/gpAux/extensions/gpmapreduce/Makefile +++ b/gpAux/extensions/gpmapreduce/Makefile @@ -27,7 +27,6 @@ OBJS = mapred_test.o include $(top_srcdir)/src/Makefile.shlib override CPPFLAGS += $(BLD_CPPFLAGS_SOLARIS_OLD_VERSIONS) -I$(SRCDIR) -I$(INCDIR) -I$(libpq_srcdir) -override LDFLAGS += -lyaml FILES = main.o mapred.o parse.o yaml_scan.o yaml_parse.o GENFILES = yaml_parse.h yaml_parse.c yaml_scan.c yaml_scan.h