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