From de885feb0656fcce8f4a27d737e8507e57f4ab88 Mon Sep 17 00:00:00 2001 From: "Sergey A. Osokin" Date: Fri, 7 Jul 2023 09:54:23 -0400 Subject: Update third-party components for Unit's Java module. --- auto/modules/java | 6 +++--- auto/modules/java_jar.sha512 | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'auto') diff --git a/auto/modules/java b/auto/modules/java index d87f93c5..7c39eb37 100644 --- a/auto/modules/java +++ b/auto/modules/java @@ -238,7 +238,7 @@ cat << END > $NXT_JAVA_JARS static const char *nxt_java_system_jars[] = { END -NXT_TOMCAT_VERSION=9.0.70 +NXT_TOMCAT_VERSION=9.0.75 NXT_JAR_VERSION=$NXT_TOMCAT_VERSION @@ -284,7 +284,7 @@ static const char *nxt_java_unit_jars[] = { "$NXT_UNIT_JAR", END -NXT_JAR_VERSION=9.4.49.v20220914 +NXT_JAR_VERSION=9.4.51.v20230217 NXT_JAR_NAMESPACE=org/eclipse/jetty/ NXT_JAR_NAME=jetty-util @@ -297,7 +297,7 @@ NXT_JAR_NAME=jetty-http . auto/modules/java_get_jar NXT_JAR_NAME=classgraph -NXT_JAR_VERSION=4.8.151 +NXT_JAR_VERSION=4.8.158 NXT_JAR_NAMESPACE=io/github/classgraph/ . auto/modules/java_get_jar diff --git a/auto/modules/java_jar.sha512 b/auto/modules/java_jar.sha512 index d3e9016c..da08f786 100644 --- a/auto/modules/java_jar.sha512 +++ b/auto/modules/java_jar.sha512 @@ -1,14 +1,14 @@ -4b47eabc83f3f672a7e91af6ae97bbdbc6f01ed7149540cb06b0f530f45a95d025cc7807a6640982d23d2da50bd973ad788a4c8fdfa025da7cf93c560abbe61e classgraph-4.8.151.jar +00dc1aedae7cb6600b4b27ac7ec0234981a23a8c6f03dc1881304b7d999d94f0fdaa51e0008288740d9890b34f41462e8ed82c76f36a18bd45eabbb8084ec8d4 classgraph-4.8.158.jar ab441acf5551a7dc81c353eaccb3b3df9e89a48987294d19e39acdb83a5b640fcdff7414cee29f5b96eaa8826647f1d5323e185018fe33a64c402d69c73c9158 ecj-3.26.0.jar -82c6985f0d7c76459bf0638fdc24f3692a11804a95845b1a45203dfcc1205ab7bf67934f6babf7eb2f2b87d637a8fcbd87eae297e4403511bf73f359b1957e09 jetty-http-9.4.49.v20220914.jar -2f199729ad9b46fda968b4bfafd657971fc9d90371852f8ad7afdae6d5752d2b84648734eabb6ffbf084800253d1da97d4bb9ad60f799ee6ae38a80c2d881fc4 jetty-server-9.4.49.v20220914.jar -e207d93ef5bc98ad2b1a43393231bdacfb3ab642b6197a8b72d819f8ad30357c4daa0a76a0459340563fcdee0fdfc111e719a2db5be778d6b1e10f1ccbe77fc9 jetty-util-9.4.49.v20220914.jar -a2cd93ccaa58191475df9aa40a11c8b3f14f77e78b6b2dc9e5fbebf07297e318d60c5cc5aca37e61bd748456b01491a0e6702b9e4d3ec3ef43d9b1a93f9b733e tomcat-api-9.0.70.jar -4b2b33f6bdcb3fbff6de7da6f7558e4a21335c5c08dbc2adba1be90ddcaa4be1ba053d9021a4891edef975759a562b46a58da6c5acc2209ae8b942e4058b7022 tomcat-el-api-9.0.70.jar -7ee837f218220022bf2543e4b3191c0a948c7f8bbd4f2e7202cc29196e5f4a8264aee027bc3521b79775b1ab0b3f8a4bef8982be9c0b2c5f95b77f36d5e5930f tomcat-jasper-9.0.70.jar -f92cdddd3aae8d1b0b861afc67344fc6544c413d78e2e810f804632e68a3667b2b1929ac4995b582af03774ad024632e820143cd53273e06a796484ce2f0a73e tomcat-jasper-el-9.0.70.jar -5ec6985740e7a5873f56430b1f0fd6e55a625fac8f5618d846072117f5ed8ccc69665fd6ebde40381099cf42ab9525f5da3cd16dd0b50a267734bfdf7f2e168d tomcat-jsp-api-9.0.70.jar -33cf08f10bad572c9e7085b3ba8e91b38a293f8838a39483b01d07d9c1b9d0e67492343e0523da24af47782ec4a5d639db49679d951ccbe1da9d1309346cc693 tomcat-juli-9.0.70.jar -0c8ee46dc49828720cd431e4e6bcb2a9d7409b3bae3d3427640b159985a27de22181151c8fa15a1f44f607730977c4ae2512c63a19c070b92e38438ad0ba8138 tomcat-servlet-api-9.0.70.jar -e882c47acdb9e5612a0810503cb8900570b68aec5dd33dd6439884b15723a67cbf982c9cf546e7cd6d67b731df3d64ec5347500ab8a987d7cb1e11a74f819325 tomcat-util-9.0.70.jar -0a562e8a40e406966ae2be5587dcad0ceae3143b03ef9b9f7dd77c6a2db522c31ed82b9c38b4464f9f80c1d8ca418ce6a09f9fecb3e0209a962da01e2f9bd626 tomcat-util-scan-9.0.70.jar +606d0446a948c7a349cba5415d079bd054e43a8a09727c8300865f38678c5101642ecafa777d5f979bde1bd520543a4cf83348fcd9a444e6681cf773eb3c5824 jetty-http-9.4.51.v20230217.jar +e9d3f7104214a16435d077eb53d943130b3a85bf9e8a48b9e40a7ad063ca3cca69324e03f21202e66fc5fd864c3cb09cd1857eff8d682c69398b4d75c1a430c6 jetty-server-9.4.51.v20230217.jar +12725e106000d6ef672c474e467d7c976c3913b2d39a92e7304cc30d0e0d1f92575227d2c2201b97ca50f39cba81ac8b79bccb2b32b63d758ac4e192173c3f62 jetty-util-9.4.51.v20230217.jar +b802b595d796285653c3c1b3d870295767afc6d4f857d439d579b7261dc8d015c948cd900e93ebc0ad706d1c74600645d3a18caef4f040a7085ff0e9f6cb4e44 tomcat-api-9.0.75.jar +90cc3c2847782b6854bc0549e7bdfda2e92feac726285718aa4083baef597e472e7f3712257790107fa9306263f645fcc17344a8209415d10a75f4f4cfa30b04 tomcat-el-api-9.0.75.jar +c23a0db30c5d77a518c7cd0afebe6c59600b45e03651409788acb91fa652752960f6e21ac15a233b433dbe290028d00ac72c4cd2856880f4d4ba9ef227692d7a tomcat-jasper-9.0.75.jar +06fb8c0d49945437900be1cc8fd8d8123a7bf6599e7755aa6c7963a65d46aea444661de532ce0e6c0573ecd12def2d5d1e7942ecace9c7c3a39e232373f3fd6b tomcat-jasper-el-9.0.75.jar +7dbaacd7f0490c8f0062eb12cd244acc9c51ee72d1c60ad841ac61905cd46b5d477b01c97019ba6e93a6b27de3e3438c620fb156cec3d6ece36f37918a6ee5bd tomcat-jsp-api-9.0.75.jar +05c15c5c6877b39aed4457e5ea7992819c28dc148a2442a149a8d5ee294a62042eebd2f3846acdd70b08d531d95cdcc8cfcd7b64fb8b046aa5639e7901505131 tomcat-juli-9.0.75.jar +92a44f8970746976a63351d45f84c7963127bd21db0af834a7d38dcfb3c29450398cb4b466636dfb3d8e764093c612eb2938af22ac2098171bac201ad6bcc320 tomcat-servlet-api-9.0.75.jar +6794c0d6d5780ca09fdbaf801c1475f227b799c809a46195c0fd1f9792303fb6d0aa6e49ac049337863bdb512c390334470210294364b7af25d86355f7fd0605 tomcat-util-9.0.75.jar +e97c90c857a5c814518f3da10d8c09c900417421d81ad500ad338ac10c6b7dc8338b486d2338f5cebea6fa33c9803fd2c06cf35c44b1b5b720331943f2e22de3 tomcat-util-scan-9.0.75.jar -- cgit From 497f08d15fc040b3484562cf95dbe242a85fe0df Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 11 Jul 2023 13:02:43 -0700 Subject: NJS: explicitely require 0.8.0 or later versions in configure. --- auto/njs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'auto') diff --git a/auto/njs b/auto/njs index c0c43f19..c54a27c7 100644 --- a/auto/njs +++ b/auto/njs @@ -25,6 +25,10 @@ nxt_feature_incs="$NXT_NJS_CFLAGS $NXT_NJS_AUX_CFLAGS" nxt_feature_libs="$NXT_NJS_LIBS $NXT_NJS_AUX_LIBS" nxt_feature_test="#include + #if NJS_VERSION_NUMBER < 0x000800 + # error NJS < 0.8.0 is not supported. + #endif + int main(void) { njs_vm_t *vm; njs_vm_opt_t opts; @@ -40,7 +44,7 @@ nxt_feature_test="#include if [ $nxt_found = no ]; then $echo - $echo $0: error: no NJS library found. + $echo $0: error: no NJS library \>= 0.8.0 found. $echo exit 1; fi -- cgit From a28bef097cd63da3bbb375ef0283e65be41a88ff Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Wed, 9 Aug 2023 14:37:16 +0800 Subject: HTTP: controlling response headers support. --- auto/sources | 1 + 1 file changed, 1 insertion(+) (limited to 'auto') diff --git a/auto/sources b/auto/sources index f4a7170a..6ee4d87b 100644 --- a/auto/sources +++ b/auto/sources @@ -93,6 +93,7 @@ NXT_LIB_SRCS=" \ src/nxt_http_route.c \ src/nxt_http_route_addr.c \ src/nxt_http_rewrite.c \ + src/nxt_http_set_headers.c \ src/nxt_http_return.c \ src/nxt_http_static.c \ src/nxt_http_proxy.c \ -- cgit From 2b4a7eedd0804f49ebbe53cfb046015fff6053e3 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Tue, 8 Aug 2023 23:24:07 +0100 Subject: Wasm: Wire the Wasm language module up to the build system. This allows to configure the Wasm module, e.g ./configure wasm --include-path=/path/to/wasmtime-v11.0.0-x86_64-linux-c-api/include --lib-path=/path/to/wasmtime-v11.0.0-x86_64-linux-c-api/lib --rpath --rpath as above says to set the rpath to the value of --lib-path. You can alternatively specify a directory to use as the rpath. Or simply omit the option to not have an rpath set. This is mostly useful for during development where you may not have the Wasmtime stuff installed to system directories or you want to test with newer/different versions. See ./configure wasm --help for a full list of options. Reviewed-by: Alejandro Colomar Signed-off-by: Andrew Clayton --- auto/help | 3 + auto/modules/conf | 4 ++ auto/modules/wasm | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 214 insertions(+) create mode 100644 auto/modules/wasm (limited to 'auto') diff --git a/auto/help b/auto/help index f2307e9c..f3c42661 100644 --- a/auto/help +++ b/auto/help @@ -75,4 +75,7 @@ cat << END java OPTIONS configure Java module run "./configure java --help" to see available options + wasm OPTIONS configure WebAssembly module + run "./configure wasm --help" to see available options + END diff --git a/auto/modules/conf b/auto/modules/conf index 7e004703..31be751f 100644 --- a/auto/modules/conf +++ b/auto/modules/conf @@ -33,6 +33,10 @@ case "$nxt_module" in . auto/modules/java ;; + wasm) + . auto/modules/wasm + ;; + *) echo echo $0: error: invalid module \"$nxt_module\". diff --git a/auto/modules/wasm b/auto/modules/wasm new file mode 100644 index 00000000..1f388de6 --- /dev/null +++ b/auto/modules/wasm @@ -0,0 +1,207 @@ +# Copyright (C) Andrew Clayton +# Copyright (C) F5, Inc. + + +NXT_WASM_RUNTIME=wasmtime + +shift + +for nxt_option; do + + case "$nxt_option" in + -*=*) value=`echo "$nxt_option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) value="" ;; + esac + + case "$nxt_option" in + + --runtime=*) NXT_WASM_RUNTIME="$value" ;; + --module=*) NXT_WASM_MODULE="$value" ;; + --include-path=*) NXT_WASM_INCLUDE_PATH="$value" ;; + --lib-path=*) NXT_WASM_LIB_PATH="$value" ;; + --rpath*) NXT_WASM_RPATH="$value" ;; + + --help) + cat << END + + --runtime=RUNTIME set the WASM runtime to use (default: wasmtime) + --module=NAME set Unit WASM module name (default: wasm) + --include-path=DIRECTORY set directory path to wasmtime includes + --lib-path=DIRECTORY set directory path to libwasmtime.so library + --rpath[=DIRECTORY] set the rpath (default: --lib-path) + +END + exit 0 + ;; + + *) + echo + echo $0: error: invalid wasm option \"$nxt_option\" + echo + exit 1 + ;; + esac + +done + + +if [ ! -f $NXT_AUTOCONF_DATA ]; then + echo + echo Please run common $0 before configuring module \"$nxt_module\". + echo + exit 1 +fi + +. $NXT_AUTOCONF_DATA + +NXT_WASM=wasm +NXT_WASM_MODULE=${NXT_WASM_MODULE=${NXT_WASM##*/}} + +NXT_WASM_INCLUDE_PATH=${NXT_WASM_INCLUDE_PATH=} +NXT_WASM_LIB_PATH=${NXT_WASM_LIB_PATH=} +NXT_WASM_LDFLAGS= +if [ "$NXT_WASM_RUNTIME" = "wasmtime" ]; then + NXT_WASM_LDFLAGS=-lwasmtime +fi +NXT_WASM_ADDITIONAL_FLAGS="-fno-strict-aliasing \ + -Wno-missing-field-initializers \ + -DNXT_HAVE_WASM_$(echo ${NXT_WASM_RUNTIME} | tr 'a-z' 'A-Z') \ +" + +# Set the RPATH/RUNPATH. +# +# We temporarily disable warning on unbound variables here as +# NXT_WASM_RPATH may be legitimately unset, in which case we +# don't set a RPATH. +# +# If NXT_WASM_RPATH is set but null then we set a RPATH of the +# value of $NXT_WASM_LIB (--lib-path) otherwise use the value +# provided. +set +u +if [ "${NXT_WASM_RPATH+set}" = set ]; then + if [ "$NXT_WASM_RPATH" = "" ]; then + NXT_WASM_RPATH=$NXT_WASM_LIB_PATH + fi + + NXT_WASM_LDFLAGS="-Wl,-rpath,$NXT_WASM_RPATH $NXT_WASM_LDFLAGS" +fi +set -u + +$echo "configuring WASM module" +$echo "configuring WASM module ..." >> $NXT_AUTOCONF_ERR + +nxt_found=no + +if [ "$NXT_WASM_RUNTIME" = "wasmtime" ]; then + nxt_feature="wasmtime" + nxt_feature_name="" + nxt_feature_run=no + nxt_feature_incs="-I${NXT_WASM_INCLUDE_PATH}" + nxt_feature_libs="-L${NXT_WASM_LIB_PATH} $NXT_WASM_LDFLAGS" + nxt_feature_test=" + #include + #include + #include + + int main(void) { + wasm_config_t *c; + + c = wasm_config_new(); + wasm_config_delete(c); + + return 0; + }" + + . auto/feature +fi + +if [ $nxt_found = no ]; then + $echo + $echo $0: error: no $NXT_WASM_RUNTIME found. + $echo + exit 1; +fi + + +if grep ^$NXT_WASM_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then + $echo + $echo $0: error: duplicate \"$NXT_WASM_MODULE\" module configured. + $echo + exit 1; +fi + + +$echo " + WASM module: ${NXT_WASM_MODULE}.unit.so" + +. auto/cc/deps + +$echo >> $NXT_MAKEFILE + +NXT_WASM_MODULE_SRCS=" \ + src/wasm/nxt_wasm.c \ +" + +if [ "$NXT_WASM_RUNTIME" = "wasmtime" ]; then + NXT_WASM_MODULE_SRCS="$NXT_WASM_MODULE_SRCS src/wasm/nxt_rt_wasmtime.c" +fi + + +# The wasm module object files. + +nxt_objs=$NXT_BUILD_DIR/src/nxt_unit.o + +for nxt_src in $NXT_WASM_MODULE_SRCS; do + + nxt_obj=${nxt_src%.c}-$NXT_WASM_MODULE.o + nxt_dep=${nxt_src%.c}-$NXT_WASM_MODULE.dep + nxt_dep_flags=`nxt_gen_dep_flags` + nxt_dep_post=`nxt_gen_dep_post` + nxt_objs="$nxt_objs $NXT_BUILD_DIR/$nxt_obj" + + cat << END >> $NXT_MAKEFILE + +$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H + mkdir -p $NXT_BUILD_DIR/src/wasm + \$(CC) -c \$(CFLAGS) $NXT_WASM_ADDITIONAL_FLAGS \$(NXT_INCS) \\ + -I$NXT_WASM_INCLUDE_PATH \\ + $nxt_dep_flags \\ + -o $NXT_BUILD_DIR/$nxt_obj $nxt_src + $nxt_dep_post + +-include $NXT_BUILD_DIR/$nxt_dep + +END + +done + + +cat << END >> $NXT_MAKEFILE + +.PHONY: ${NXT_WASM_MODULE} +.PHONY: ${NXT_WASM_MODULE}-install +.PHONY: ${NXT_WASM_MODULE}-uninstall + +all: ${NXT_WASM_MODULE} + +${NXT_WASM_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_WASM_MODULE}.unit.so + +$NXT_BUILD_DIR/lib/unit/modules/${NXT_WASM_MODULE}.unit.so: $nxt_objs + \$(NXT_MODULE_LINK) -o \$@ \\ + $nxt_objs -L${NXT_WASM_LIB_PATH} ${NXT_WASM_LDFLAGS} $NXT_LD_OPT + + +install: ${NXT_WASM_MODULE}-install + +${NXT_WASM_MODULE}-install: ${NXT_WASM_MODULE} install-check + install -d \$(DESTDIR)$NXT_MODULESDIR + install -p $NXT_BUILD_DIR/lib/unit/modules/${NXT_WASM_MODULE}.unit.so \\ + \$(DESTDIR)$NXT_MODULESDIR/ + + +uninstall: ${NXT_WASM_MODULE}-uninstall + +${NXT_WASM_MODULE}-uninstall: + rm -f \$(DESTDIR)$NXT_MODULESDIR/${NXT_WASM_MODULE}.unit.so + @rmdir -p \$(DESTDIR)$NXT_MODULESDIR 2>/dev/null || true + +END -- cgit From ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 1 Aug 2023 10:16:17 -0700 Subject: Added unit pkg-config file. --- auto/help | 1 + auto/make | 35 ++++++++++++++++++++++++++++++++++- auto/options | 2 ++ auto/summary | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) (limited to 'auto') diff --git a/auto/help b/auto/help index f3c42661..b6d9919f 100644 --- a/auto/help +++ b/auto/help @@ -20,6 +20,7 @@ cat << END --modulesdir=DIR default: "\$libdir/unit/modules" --datarootdir=DIR default: "\$prefix/share" --mandir=DIR default: "\$datarootdir/man" + --pkgconfigdir=DIR default: "\$datarootdir/pkgconfig" --localstatedir=DIR default: "\$prefix/var" --statedir=DIR default: "\$localstatedir/lib/unit" --runstatedir=DIR default: "\$localstatedir/run/unit" diff --git a/auto/make b/auto/make index ecf31826..abfd41ad 100644 --- a/auto/make +++ b/auto/make @@ -94,7 +94,9 @@ $NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS) $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS) $NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS) -$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) +$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) \\ + $NXT_BUILD_DIR/share/pkgconfig/unit.pc \\ + $NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc $NXT_STATIC_LINK \$@ \$(NXT_LIB_UNIT_OBJS) END @@ -397,6 +399,10 @@ libunit-install: $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC || install -d \$(DESTDIR)$NXT_LIBDIR install -p -m u=rw,go=r $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC \ \$(DESTDIR)$NXT_LIBDIR/ + test -d \$(DESTDIR)$NXT_PKGCONFIGDIR \ + || install -d \$(DESTDIR)$NXT_PKGCONFIGDIR + install -p -m u=rw,go=r $NXT_BUILD_DIR/share/pkgconfig/unit.pc \ + \$(DESTDIR)$NXT_PKGCONFIGDIR/ test -d \$(DESTDIR)$NXT_INCLUDEDIR \ || install -d \$(DESTDIR)$NXT_INCLUDEDIR install -p -m u=rw,go=r src/nxt_unit.h \ @@ -414,6 +420,8 @@ libunit-install: $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC libunit-uninstall: rm -f \$(DESTDIR)$NXT_LIBDIR/$NXT_LIB_UNIT_STATIC @rmdir -p \$(DESTDIR)$NXT_LIBDIR 2>/dev/null || true + rm -f \$(DESTDIR)$NXT_PKGCONFIGDIR/unit.pc + @rmdir -p \$(DESTDIR)$NXT_PKGCONFIGDIR 2>/dev/null || true rm -f \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit.h \ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_field.h \ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_request.h \ @@ -428,6 +436,31 @@ libunit-uninstall: END +# pkg-config files + +cat << END >> $NXT_MAKEFILE + +$NXT_BUILD_DIR/share/pkgconfig/unit.pc: src/unit.pc.in + sed -e "s|@PREFIX@|$NXT_PREFIX|" \\ + -e "s|@LIBDIR@|$NXT_LIBDIR|" \\ + -e "s|@CFLAGS@|-I$NXT_INCLUDEDIR|" \\ + -e "s|@VERSION@|\$(NXT_VERSION)|" \\ + -e "s|@EXTRA_LIBS@|$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS|" \\ + -e "s|@CONFARGS@|$(echo $NXT_CONFIGURE_OPTIONS | sed -e 's| -pie||' -e 's| --njs||')|" \\ + -e "s|@MODULESDIR@|$NXT_MODULESDIR|" \\ + < src/unit.pc.in > \$@ + +$NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc: src/unit.pc.in + sed -e "s|@PREFIX@|$(pwd)/$NXT_BUILD_DIR|" \\ + -e "s|@LIBDIR@|$(pwd)/$NXT_BUILD_DIR/lib|" \\ + -e "s|@CFLAGS@|-I$(pwd)/src -I$(pwd)$NXT_BUILD_DIR/include|" \\ + -e "s|@VERSION@|\$(NXT_VERSION)|" \\ + -e "s|@EXTRA_LIBS@|$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS|" \\ + -e "s|@CONFARGS@|$(echo $NXT_CONFIGURE_OPTIONS | sed -e 's| -pie||' -e 's| --njs||')|" \\ + < src/unit.pc.in > \$@ + +END + # Makefile. # *.dSYM is MacOSX Clang debug information. diff --git a/auto/options b/auto/options index 5487be7f..0550c699 100644 --- a/auto/options +++ b/auto/options @@ -73,6 +73,7 @@ do ;; --datarootdir=*) NXT_DATAROOTDIR="$value" ;; --mandir=*) NXT_MANDIR="$value" ;; + --pkgconfigdir=*) NXT_PKGCONFIGDIR="$value" ;; --localstatedir=*) NXT_LOCALSTATEDIR="$value" ;; --statedir=*) NXT_STATEDIR="$value" ;; --state=*) @@ -158,6 +159,7 @@ NXT_MODULESDIR="${NXT_MODULESDIR-"$NXT_LIBDIR/unit/modules"}" NXT_DATAROOTDIR="${NXT_DATAROOTDIR-"$NXT_PREFIX/share"}" NXT_MANDIR="${NXT_MANDIR-"$NXT_DATAROOTDIR/man"}" +NXT_PKGCONFIGDIR="${NXT_PKGCONFIGDIR-"$NXT_DATAROOTDIR/pkgconfig"}" NXT_LOCALSTATEDIR="${NXT_LOCALSTATEDIR-"$NXT_PREFIX/var"}" NXT_STATEDIR="${NXT_STATEDIR-"$NXT_LOCALSTATEDIR/lib/unit"}" diff --git a/auto/summary b/auto/summary index fabe3b10..3aa41669 100644 --- a/auto/summary +++ b/auto/summary @@ -11,6 +11,7 @@ Unit configuration summary: sbin directory: ............ "$NXT_SBINDIR" lib directory: ............. "$NXT_LIBDIR" include directory: ......... "$NXT_INCLUDEDIR" + pkgconfig directory: ....... "$NXT_PKGCONFIGDIR" man pages directory: ....... "$NXT_MANDIR" modules directory: ......... "$NXT_MODULESDIR" state directory: ........... "$NXT_STATEDIR" -- cgit