Changeset da0202a


Ignore:
Timestamp:
2022-08-22T14:38:38Z (3 months ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
b9572c1
Parents:
b82ba4a
git-author:
Jelmer Vernooij <jelmer@…> (30-08-20 20:52:36)
git-committer:
Jelmer Vernooij <jelmer@…> (22-08-22 14:38:38)
Message:

Support using system libjsonparser.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure

    rb82ba4a rda0202a  
    4848
    4949events=glib
     50external_json_parser=auto
    5051ssl=auto
    5152
     
    155156--ssl=...       SSL library to use (gnutls, nss, openssl, auto)
    156157                                                        $ssl
     158--external_json_parser=0/1/auto Use External JSON parser $external_json_parser
    157159
    158160
     
    404406fi
    405407echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
     408
     409if [ "$external_json_parser" = "auto" ]; then
     410        if pkg-config --exists json-parser; then
     411                external_json_parser=1
     412        else
     413                external_json_parser=0
     414        fi
     415fi
     416echo "EXTERNAL_JSON_PARSER=$external_json_parser" >> Makefile.settings
     417if [ "$external_json_parser" = "1" ]; then
     418    echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings
     419    echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings
     420    echo "LDFLAGS_TESTS+=$(pkg-config --libs json-parser)" >> Makefile.settings
     421fi
     422
    406423
    407424detect_gnutls()
     
    9951012
    9961013echo '  Using python: '$PYTHON
     1014
     1015if [ "$external_json_parser" = "1" ]; then
     1016    echo '  Using system JSON parser.'
     1017else
     1018    echo '  Using bundled JSON parser.'
     1019fi
     1020
    9971021echo '  Using event handler: '$events
    9981022echo '  Using SSL library: '$ssl
  • lib/Makefile

    rb82ba4a rda0202a  
    1313
    1414# [SH] Program variables
    15 objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o
     15objects = arc.o base64.o canohost.o $(EVENT_HANDLER) ftutil.o http_client.o ini.o json_util.o md5.o misc.o oauth.o oauth2.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o ns_parse.o
     16
     17ifneq ($(EXTERNAL_JSON_PARSER),1)
     18objects += json.o
     19endif
    1620
    1721LFLAGS += -r
  • tests/Makefile

    rb82ba4a rda0202a  
    33_SRCDIR_ := $(_SRCDIR_)tests/
    44endif
     5
     6LFLAGS += $(LDFLAGS_TESTS)
    57
    68CFLAGS += $(shell pkg-config --cflags check)
Note: See TracChangeset for help on using the changeset viewer.