mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Autoconf uses multiple levels of variables when defining paths. For
example, ${datadir} by default is ${datarootdir}, which by default is
${prefix}/share, which by default is /usr/local. Substituting from
./configure, as is done by AC_DEFINE or AC_DEFINE_UNQUOTED, does not
expand all these variables. This was causing some of our defines to have
garbage like "${prefix}/share/pixmaps" rather than the intended
"/usr/local/share/pixmaps".
The solution is to generate the files needing these paths from the
Makefile rather than from ./configure, because make does fully expand
all those levels.
Signed-off-by: Brad Jorsch <anomie@users.sourceforge.net>
32 lines
505 B
Bash
32 lines
505 B
Bash
#!/bin/sh
|
|
|
|
WCFLAGS="${inc_search_path}"
|
|
WLFLAGS="${lib_search_path}"
|
|
WLIBS="-lWINGs -lWUtil -lwraster ${GFXLIBS} ${XFTLIBS} ${XLIBS} -lm ${INTLIBS}"
|
|
|
|
usage="Usage: get-wings-flags [--cflags] [--ldflags] [--libs]"
|
|
|
|
if test $# -eq 0; then
|
|
echo "${usage}" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
while test $# -gt 0; do
|
|
case $1 in
|
|
--cflags)
|
|
echo $WCFLAGS
|
|
;;
|
|
--ldflags|--lflags)
|
|
echo $WLFLAGS
|
|
;;
|
|
--libs)
|
|
echo $WLIBS
|
|
;;
|
|
*)
|
|
echo "${usage}" 1>&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|