|
| 1 | +From 701768e53edb892ed402681a34b0494ac67f1712 Mon Sep 17 00:00:00 2001 |
| 2 | +From: taotieren < [email protected]> |
| 3 | +Date: Fri, 9 Dec 2022 18:18:46 +0800 |
| 4 | +Subject: [PATCH] Compile using system libraries |
| 5 | + |
| 6 | +--- |
| 7 | + configure.ac | 18 +++++++----------- |
| 8 | + 1 file changed, 7 insertions(+), 11 deletions(-) |
| 9 | + |
| 10 | +diff --git a/configure.ac b/configure.ac |
| 11 | +index 337d427..499bfb0 100644 |
| 12 | +--- a/configure.ac |
| 13 | ++++ b/configure.ac |
| 14 | +@@ -72,17 +72,13 @@ AC_ARG_WITH([static-libplist], |
| 15 | + [AS_HELP_STRING(["--with-static-libplist[=/path/to/static/libplist"]], |
| 16 | + [link against a static libplist])], |
| 17 | + [with_static_libplist=$withval], |
| 18 | +- [with_static_libplist=yes]) |
| 19 | +-if test "x$with_static_libplist" != "xno"; then |
| 20 | +- if test "x$with_static_libplist" = "xyes"; then |
| 21 | +- STATIC_LIBPLIST="`pkg-config --libs-only-L libplist-2.0 |sed 's/^..//; s/[ ]*$/\/libplist-2.0.a/'`" |
| 22 | +- else |
| 23 | +- STATIC_LIBPLIST="$with_static_libplist" |
| 24 | +- fi |
| 25 | +- if ! test -f "$STATIC_LIBPLIST"; then |
| 26 | +- AC_MSG_ERROR([The file ${STATIC_LIBPLIST} passed to --with-static-libplist does not exist]) |
| 27 | +- fi |
| 28 | +- AC_SUBST(libplist_LIBS, [$STATIC_LIBPLIST]) |
| 29 | ++ [with_static_libplist=no]) |
| 30 | ++if test "x$with_static_libplist" = xno; then |
| 31 | ++ PKG_CHECK_MODULES(libplist, libplist-2.0 >= 2.2.0) |
| 32 | ++else |
| 33 | ++ # Use the static libplist from the specified path |
| 34 | ++ AC_SUBST(libplist_CFLAGS, "-I${with_static_libplist}/include") |
| 35 | ++ AC_SUBST(libplist_LIBS, "${with_static_libplist}/lib/libplist.a") |
| 36 | + fi |
| 37 | + |
| 38 | + AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-g -Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter") |
| 39 | +-- |
| 40 | +2.38.1 |
| 41 | + |
0 commit comments