@@ -655,6 +655,8 @@ DNSTAP_SOCKET_TESTBIN
655
655
DNSTAP_SOCKET_PATH
656
656
opt_dnstap_socket_path
657
657
ENABLE_DNSTAP
658
+ PROTOBUFC_LIBS
659
+ PROTOBUFC_CFLAGS
658
660
PROTOC_C
659
661
UBSYMS
660
662
EXTRALINK
@@ -926,7 +928,9 @@ SYSTEMD_CFLAGS
926
928
SYSTEMD_LIBS
927
929
SYSTEMD_DAEMON_CFLAGS
928
930
SYSTEMD_DAEMON_LIBS
929
- PYTHON_VERSION'
931
+ PYTHON_VERSION
932
+ PROTOBUFC_CFLAGS
933
+ PROTOBUFC_LIBS'
930
934
931
935
932
936
# Initialize some variables set by options.
@@ -1718,6 +1722,10 @@ Some influential environment variables:
1718
1722
The installed Python version to use, for example '2.3'. This
1719
1723
string will be appended to the Python interpreter canonical
1720
1724
name.
1725
+ PROTOBUFC_CFLAGS
1726
+ C compiler flags for PROTOBUFC, overriding pkg-config
1727
+ PROTOBUFC_LIBS
1728
+ linker flags for PROTOBUFC, overriding pkg-config
1721
1729
1722
1730
Use these variables to override the choices made by `configure' or to help
1723
1731
it to find libraries and programs with nonstandard names/locations.
@@ -21392,15 +21400,86 @@ if test "${with_protobuf_c+set}" = set; then :
21392
21400
21393
21401
else
21394
21402
21395
- # workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
21396
- if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
21397
- CFLAGS="$CFLAGS -I/usr/include/google"
21398
- else
21399
- if test -f /usr/local/include/google/protobuf-c/protobuf-c.h; then
21400
- CFLAGS="$CFLAGS -I/usr/local/include/google"
21401
- LDFLAGS="$LDFLAGS -L/usr/local/lib"
21402
- fi
21403
- fi
21403
+
21404
+
21405
+ pkg_failed=no
21406
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROTOBUFC" >&5
21407
+ $as_echo_n "checking for PROTOBUFC... " >&6; }
21408
+
21409
+ if test -n "$PROTOBUFC_CFLAGS"; then
21410
+ pkg_cv_PROTOBUFC_CFLAGS="$PROTOBUFC_CFLAGS"
21411
+ elif test -n "$PKG_CONFIG"; then
21412
+ if test -n "$PKG_CONFIG" && \
21413
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
21414
+ ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
21415
+ ac_status=$?
21416
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21417
+ test $ac_status = 0; }; then
21418
+ pkg_cv_PROTOBUFC_CFLAGS=`$PKG_CONFIG --cflags "libprotobuf-c" 2>/dev/null`
21419
+ test "x$?" != "x0" && pkg_failed=yes
21420
+ else
21421
+ pkg_failed=yes
21422
+ fi
21423
+ else
21424
+ pkg_failed=untried
21425
+ fi
21426
+ if test -n "$PROTOBUFC_LIBS"; then
21427
+ pkg_cv_PROTOBUFC_LIBS="$PROTOBUFC_LIBS"
21428
+ elif test -n "$PKG_CONFIG"; then
21429
+ if test -n "$PKG_CONFIG" && \
21430
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libprotobuf-c\""; } >&5
21431
+ ($PKG_CONFIG --exists --print-errors "libprotobuf-c") 2>&5
21432
+ ac_status=$?
21433
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21434
+ test $ac_status = 0; }; then
21435
+ pkg_cv_PROTOBUFC_LIBS=`$PKG_CONFIG --libs "libprotobuf-c" 2>/dev/null`
21436
+ test "x$?" != "x0" && pkg_failed=yes
21437
+ else
21438
+ pkg_failed=yes
21439
+ fi
21440
+ else
21441
+ pkg_failed=untried
21442
+ fi
21443
+
21444
+
21445
+
21446
+ if test $pkg_failed = yes; then
21447
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448
+ $as_echo "no" >&6; }
21449
+
21450
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
21451
+ _pkg_short_errors_supported=yes
21452
+ else
21453
+ _pkg_short_errors_supported=no
21454
+ fi
21455
+ if test $_pkg_short_errors_supported = yes; then
21456
+ PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libprotobuf-c" 2>&1`
21457
+ else
21458
+ PROTOBUFC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libprotobuf-c" 2>&1`
21459
+ fi
21460
+ # Put the nasty error message in config.log where it belongs
21461
+ echo "$PROTOBUFC_PKG_ERRORS" >&5
21462
+
21463
+
21464
+ as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
21465
+
21466
+ elif test $pkg_failed = untried; then
21467
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21468
+ $as_echo "no" >&6; }
21469
+
21470
+ as_fn_error $? "The protobuf-c package was not found with pkg-config. Please install protobuf-c!" "$LINENO" 5
21471
+
21472
+ else
21473
+ PROTOBUFC_CFLAGS=$pkg_cv_PROTOBUFC_CFLAGS
21474
+ PROTOBUFC_LIBS=$pkg_cv_PROTOBUFC_LIBS
21475
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21476
+ $as_echo "yes" >&6; }
21477
+
21478
+ CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
21479
+ LIBS="$LIBS $PROTOBUFC_LIBS"
21480
+
21481
+ fi
21482
+
21404
21483
21405
21484
fi
21406
21485
0 commit comments