xref: /freebsd/contrib/ldns/packaging/ldns-config.in (revision af23369a6deaaeb612ab266eb88b8bb8d560c322)
1#!/bin/sh
2
3prefix="@prefix@"
4exec_prefix="@exec_prefix@"
5VERSION="@PACKAGE_VERSION@"
6CFLAGS="@CFLAGS@"
7CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@ @PYTHON_CPPFLAGS@"
8LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@"
9LIBS="@LIBS@ @LIBSSL_LIBS@"
10LIBDIR="@libdir@"
11INCLUDEDIR="@includedir@"
12LIBVERSION="@VERSION_INFO@"
13
14for arg in $@
15do
16    if [ $arg = "--cflags" ]
17    then
18        echo "-I${INCLUDEDIR}"
19    fi
20    if [ $arg = "--libs" ]
21    then
22        echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
23    fi
24    if [ $arg = "-h" ] || [ $arg = "--help" ]
25    then
26        echo "Usage: $0 [--cflags] [--libs] [--version]"
27    fi
28    if [ $arg = "--version" ]
29    then
30        echo "${VERSION}"
31    fi
32    if [ $arg = "--libversion" ]
33    then
34        echo "${LIBVERSION}"
35    fi
36done
37