build: Compatibility to pkg-config.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:17:17 +0000 (16:17 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 24 Oct 2018 07:17:17 +0000 (16:17 +0900)
* src/ntbtls-config.in: Support --variable and --modversion.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/ntbtls-config.in

index c29586c..f6eef3e 100644 (file)
@@ -91,7 +91,16 @@ while test $# -gt 0; do
        --exec-prefix)
            echo_exec_prefix=yes
            ;;
-       --version)
+       --variable=*)
+           case "${1#*=}" in
+               prefix) echo "$prefix" ;;
+               exec_prefix) echo "$exec_prefix" ;;
+               host) echo "$my_host" ;;
+               api_version) echo "$api_version" ;;
+           esac
+           exit 0
+           ;;
+       --modversion|--version)
            echo_version=yes
            ;;
         --api-version)