Artifact 602bb6b3fd55ec100bdfb4f2273dafb4d202bd4f1552f46e90434caf28f26242:
- File
utils/objfw-config.in
— part of check-in
[a53998a0bf]
at
2010-10-19 19:46:21
on branch trunk
— Don't specify -fobjc-exceptions.
All compilers supported by ObjFW do this automatically, plus newer
revisions of Clang complain about -fobjc-exceptions being ignored by
the compiler. (user: js, size: 2839) [annotate] [blame] [check-ins using]
#!/bin/sh prefix="@prefix@" exec_prefix="@exec_prefix@" libdir="@libdir@" CFLAGS="" CPPFLAGS="-I@includedir@" CXXFLAGS="" OBJC="@OBJC@" OBJCFLAGS="@GNU_RUNTIME@ -fexceptions -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" show_help() { cat <<__EOF__ objfw-config: Available arguments are: --all Outputs all flags + libs --cflags Outputs the required CFLAGS --cppflags Outputs the required CPPFLAGS --cxxflags Outputs the required CXXFLAGS --objc Outputs the OBJC used to compile ObjFW --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 } test -z "$1" && show_help while test ! -z "$1"; do case "$1" in --all) printf "%s %s %s" "$CFLAGS" "$CPPFLAGS" "$CXXFLAGS" printf "%s %s" "$OBJCFLAGS" "$LDFLAGS" printf "%s %s" "$LDFLAGS_REEXPORT" "$LDFLAGS_RPATH" printf "%s" "$LIBS" ;; --cflags) printf "%s" "$CFLAGS" ;; --cppflags) printf "%s" "$CPPFLAGS" ;; --cxxflags) printf "%s" "$CXXFLAGS" ;; --objc) printf "%s" "$OBJC" ;; --objcflags) 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" ;; --rpath) printf "%s" "$LDFLAGS_RPATH" ;; --version) printf "%s" "$VERSION" ;; *) echo "Invalid option: $1" 1>&2 exit 1 ;; esac shift done echo