@@ -7,10 +7,14 @@ CXXFLAGS="" OBJC="@OBJC@" OBJCFLAGS="@GNU_RUNTIME@ -fexceptions -fobjc-exceptions" OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString" OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @BLOCKS_FLAGS@ @NO_WARN_UNUSED@" +LIB_CFLAGS="@LIB_CFLAGS@" +LIB_LDFLAGS="@LIB_LDFLAGS@" +LIB_PREFIX="@LIB_PREFIX@" +LIB_SUFFIX="@LIB_SUFFIX@" LDFLAGS="" LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@" LDFLAGS_RPATH="@LDFLAGS_RPATH@" LIBS="-L${libdir} -lobjfw @LIBS@" VERSION="0.4-dev" @@ -27,10 +31,14 @@ --objcflags Outputs the required OBJCFLAGS --ldflags Outputs the required LDFLAGS --reexport Outputs LDFLAGS to reexport ObjFW --rpath Outputs LDFLAGS for using rpath --libs Outputs the required LIBS + --lib-cflags Outputs CFLAGS for building a library" + --lib-ldflags Outputs LDFLAGS for building a library" + --lib-prefix Outputs the prefix for libraries" + --lib-suffix Outputs the suffix for libraries" --version Outputs the installed version __EOF__ exit 0 } @@ -60,10 +68,46 @@ printf "%s" "$OBJCFLAGS" ;; --libs) printf "%s" "$LIBS" ;; + --lib-cflags) + if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then + echo "LIB_MAJOR and LIB_MINOR need to be set!" \ + 1>&2 + exit 1 + fi + + printf "%s" "$LIB_CFLAGS" + ;; + --lib-ldflags) + if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then + echo "LIB_MAJOR and LIB_MINOR need to be set!" \ + 1>&2 + exit 1 + fi + + printf "%s" "$LIB_LDFLAGS" + ;; + --lib-prefix) + if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then + echo "LIB_MAJOR and LIB_MINOR need to be set!" \ + 1>&2 + exit 1 + fi + + printf "%s" "$LIB_PREFIX" + ;; + --lib-suffix) + if test x"$LIB_MAJOR" = x"" -o x"$LIB_MINOR" = x""; then + echo "LIB_MAJOR and LIB_MINOR need to be set!" \ + 1>&2 + exit 1 + fi + + printf "%s" "$LIB_SUFFIX" + ;; --ldflags) printf "%s" "$LDFLAGS" ;; --reexport) printf "%s" "$LDFLAGS_REEXPORT"