@@ -694,6 +694,7 @@ with_zlib
694
694
enable_libconfig
695
695
enable_extf
696
696
enable_liblua
697
+ enable_json
697
698
with_progname
698
699
enable_valgrind
699
700
'
@@ -1321,6 +1322,7 @@ Optional Features:
1321
1322
--enable-libconfig/--disable-libconfig
1322
1323
--enable-extf/--disable-extf
1323
1324
--enable-liblua/--disable-liblua
1325
+ --enable-json/--disable-json
1324
1326
--enable-valgrind/--disable-valgrind
1325
1327
1326
1328
Optional Packages:
@@ -5865,7 +5867,130 @@ fi
5865
5867
fi
5866
5868
5867
5869
5870
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for libjansson" >&5
5871
+ $as_echo_n " checking for libjansson... " >&6 ; }
5872
+ # Check whether --enable-json was given.
5873
+ if test " ${enable_json+set} " = set ; then :
5874
+ enableval=$enable_json ;
5875
+ if test " x$enableval " = " xno" ; then
5876
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: disabled" >&5
5877
+ $as_echo " disabled" >&6 ; }
5878
+ else
5879
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: enabled" >&5
5880
+ $as_echo " enabled" >&6 ; }
5881
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for json_array_set_new in -ljansson" >&5
5882
+ $as_echo_n " checking for json_array_set_new in -ljansson... " >&6 ; }
5883
+ if ${ac_cv_lib_jansson_json_array_set_new+: } false ; then :
5884
+ $as_echo_n " (cached) " >&6
5885
+ else
5886
+ ac_check_lib_save_LIBS=$LIBS
5887
+ LIBS=" -ljansson $LIBS "
5888
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5889
+ /* end confdefs.h. */
5890
+
5891
+ /* Override any GCC internal prototype to avoid an error.
5892
+ Use char because int might match the return type of a GCC
5893
+ builtin and then its argument prototype would still apply. */
5894
+ #ifdef __cplusplus
5895
+ extern "C"
5896
+ #endif
5897
+ char json_array_set_new ();
5898
+ int
5899
+ main ()
5900
+ {
5901
+ return json_array_set_new ();
5902
+ ;
5903
+ return 0;
5904
+ }
5905
+ _ACEOF
5906
+ if ac_fn_c_try_link " $LINENO " ; then :
5907
+ ac_cv_lib_jansson_json_array_set_new=yes
5908
+ else
5909
+ ac_cv_lib_jansson_json_array_set_new=no
5910
+ fi
5911
+ rm -f core conftest.err conftest.$ac_objext \
5912
+ conftest$ac_exeext conftest.$ac_ext
5913
+ LIBS=$ac_check_lib_save_LIBS
5914
+ fi
5915
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_jansson_json_array_set_new " >&5
5916
+ $as_echo " $ac_cv_lib_jansson_json_array_set_new " >&6 ; }
5917
+ if test " x$ac_cv_lib_jansson_json_array_set_new " = xyes; then :
5918
+ cat >> confdefs.h << _ACEOF
5919
+ #define HAVE_LIBJANSSON 1
5920
+ _ACEOF
5921
+
5922
+ LIBS=" -ljansson $LIBS "
5923
+
5924
+ else
5925
+ as_fn_error $? " No libjansson found. Try --disable-json" " $LINENO " 5
5926
+ fi
5927
+
5928
+
5929
+ $as_echo " #define USE_JSON 1" >> confdefs.h
5930
+
5931
+ fi
5932
+
5933
+ else
5934
+
5935
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: enabled" >&5
5936
+ $as_echo " enabled" >&6 ; }
5937
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for json_array_set_new in -ljansson" >&5
5938
+ $as_echo_n " checking for json_array_set_new in -ljansson... " >&6 ; }
5939
+ if ${ac_cv_lib_jansson_json_array_set_new+: } false ; then :
5940
+ $as_echo_n " (cached) " >&6
5941
+ else
5942
+ ac_check_lib_save_LIBS=$LIBS
5943
+ LIBS=" -ljansson $LIBS "
5944
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
5945
+ /* end confdefs.h. */
5946
+
5947
+ /* Override any GCC internal prototype to avoid an error.
5948
+ Use char because int might match the return type of a GCC
5949
+ builtin and then its argument prototype would still apply. */
5950
+ #ifdef __cplusplus
5951
+ extern "C"
5952
+ #endif
5953
+ char json_array_set_new ();
5954
+ int
5955
+ main ()
5956
+ {
5957
+ return json_array_set_new ();
5958
+ ;
5959
+ return 0;
5960
+ }
5961
+ _ACEOF
5962
+ if ac_fn_c_try_link " $LINENO " ; then :
5963
+ ac_cv_lib_jansson_json_array_set_new=yes
5964
+ else
5965
+ ac_cv_lib_jansson_json_array_set_new=no
5966
+ fi
5967
+ rm -f core conftest.err conftest.$ac_objext \
5968
+ conftest$ac_exeext conftest.$ac_ext
5969
+ LIBS=$ac_check_lib_save_LIBS
5970
+ fi
5971
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_lib_jansson_json_array_set_new " >&5
5972
+ $as_echo " $ac_cv_lib_jansson_json_array_set_new " >&6 ; }
5973
+ if test " x$ac_cv_lib_jansson_json_array_set_new " = xyes; then :
5974
+ cat >> confdefs.h << _ACEOF
5975
+ #define HAVE_LIBJANSSON 1
5976
+ _ACEOF
5977
+
5978
+ LIBS=" -ljansson $LIBS "
5979
+
5980
+ else
5981
+ as_fn_error $? " No libjansson found. Try --disable-json" " $LINENO " 5
5982
+ fi
5983
+
5984
+
5985
+ $as_echo " #define USE_JSON 1" >> confdefs.h
5986
+
5987
+
5988
+ fi
5989
+
5990
+
5868
5991
# check for custom prog name
5992
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking progname" >&5
5993
+ $as_echo_n " checking progname... " >&6 ; }
5869
5994
5870
5995
# Check whether --with-progname was given.
5871
5996
if test " ${with_progname+set} " = set ; then :
0 commit comments