Skip to content

Commit

Permalink
Merge pull request #585 from PCMDI/544_json-c_test
Browse files Browse the repository at this point in the history
Test for the function 'json_object_new_object' when testing json-c in the configure script.
  • Loading branch information
mauzey1 authored Mar 11, 2020
2 parents 0268181 + 1ee8136 commit 9511753
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4039,9 +4039,9 @@ else
JSONCFLAGS=""
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_get_userdata in -ljson-c" >&5
$as_echo_n "checking for json_object_get_userdata in -ljson-c... " >&6; }
if ${ac_cv_lib_json_c_json_object_get_userdata+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_object_new_object in -ljson-c" >&5
$as_echo_n "checking for json_object_new_object in -ljson-c... " >&6; }
if ${ac_cv_lib_json_c_json_object_new_object+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
Expand All @@ -4055,27 +4055,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
char json_object_get_userdata ();
char json_object_new_object ();
int
main ()
{
return json_object_get_userdata ();
return json_object_new_object ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_json_c_json_object_get_userdata=yes
ac_cv_lib_json_c_json_object_new_object=yes
else
ac_cv_lib_json_c_json_object_get_userdata=no
ac_cv_lib_json_c_json_object_new_object=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_json_c_json_object_get_userdata" >&5
$as_echo "$ac_cv_lib_json_c_json_object_get_userdata" >&6; }
if test "x$ac_cv_lib_json_c_json_object_get_userdata" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_json_c_json_object_new_object" >&5
$as_echo "$ac_cv_lib_json_c_json_object_new_object" >&6; }
if test "x$ac_cv_lib_json_c_json_object_new_object" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBJSON_C 1
_ACEOF
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ else
JSONCLDFLAGS="-ljson-c"
JSONCFLAGS=""
fi
AC_CHECK_LIB([json-c],[json_object_get_userdata],[],[AC_ERROR([Could not get a working json-c])],[ ${JSONCFLAGS} ${JSONCLDFLAGS} ])
AC_CHECK_LIB([json-c],[json_object_new_object],[],[AC_ERROR([Could not get a working json-c])],[ ${JSONCFLAGS} ${JSONCLDFLAGS} ])

AC_ARG_WITH([uuid],[AS_HELP_STRING([--with-uuid],[enable support for uuid in none standard location])],[],[with_uuid="no"])
if [ test x${with_uuid} != xyes ] ; then
Expand Down

0 comments on commit 9511753

Please sign in to comment.