- INCS="@PKG_CFLAGS@"
- if [ "x@WITH_OVERWRITE@" = xno ]; then
- INCS="$INCS -I${includesubdir}"
- fi
- if [ "${includedir}" != /usr/include ]; then
- INCS="$INCS -I${includedir}"
- fi
- sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
- $INCS
-ENDECHO
+ OPTS=
+ for opt in @PKG_CFLAGS@
+ do
+ case "x$opt" in
+ x-[DIU]*)
+ OPTS="$OPTS $opt"
+ ;;
+ x-Wl,*)
+ OPTS="$OPTS $opt"
+ ;;
+ x-[OW]*)
+ ;;
+ *)
+ OPTS="$OPTS $opt"
+ ;;
+ esac
+ done
+ printf "%s\n" "$OPTS"
+ ;;
+ --cflags-only-I)
+ OPTS=
+ for opt in @PKG_CFLAGS@
+ do
+ case "x$opt" in
+ x-[DIU]*)
+ OPTS="$OPTS $opt"
+ ;;
+ *)
+ ;;
+ esac
+ done
+ printf "%s\n" "$OPTS"
+ ;;
+ --cflags-only-other)
+ OPTS=
+ for opt in @PKG_CFLAGS@
+ do
+ case "x$opt" in
+ x-[DIU]*)
+ ;;
+ x-Wl,*)
+ OPTS="$OPTS $opt"
+ ;;
+ x-[OW]*)
+ ;;
+ *)
+ OPTS="$OPTS $opt"
+ ;;
+ esac
+ done
+ printf "%s\n" "$OPTS"