mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-09 10:05:49 +01:00
Fix path substitutions
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>
This commit is contained in:
committed by
Carlos R. Mafra
parent
f6080ffd56
commit
060ba6a9cd
@@ -16,7 +16,7 @@ LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@
|
||||
libWUtil_la_LIBADD = @LIBBSD@
|
||||
|
||||
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
|
||||
EXTRA_DIST = BUGS make-rgb Examples Extras Tests get-wings-flags.in get-wutil-flags.in
|
||||
|
||||
|
||||
# wbutton.c
|
||||
@@ -85,7 +85,33 @@ AM_CFLAGS =
|
||||
INCLUDES = -I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
||||
|
||||
DISTCLEANFILES = WINGs.pc
|
||||
DISTCLEANFILES = WINGs.pc get-wings-flags get-wutil-flags
|
||||
|
||||
WINGs.pc: Makefile
|
||||
@echo "Generating $@"
|
||||
@echo 'Name: WINGs' > $@
|
||||
@echo 'Description: Small widget set with the NeXTStep(TM) look and feel' >> $@
|
||||
@echo 'Version: $(VERSION)' >> $@
|
||||
@echo 'Requires: wrlib' >> $@
|
||||
@echo 'Libs: $(lib_search_path) -lWINGs $(XFTLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
||||
@echo 'Cflags: $(inc_search_path)' >> $@
|
||||
|
||||
get-wings-flags: get-wings-flags.in Makefile
|
||||
@echo "Generating $@"
|
||||
@$(SED) -e 's#$${inc_search_path}#$(inc_search_path)#;' \
|
||||
-e 's#$${lib_search_path}#$(lib_search_path)#;' \
|
||||
-e 's#$${GFXLIBS}#$(GFXLIBS)#;' \
|
||||
-e 's#$${XFTLIBS}#$(XFTLIBS)#;' \
|
||||
-e 's#$${INTLIBS}#$(INTLIBS)#;' \
|
||||
-e 's#$${XLIBS}#$(XLIBS)#;' < $< > $@
|
||||
@chmod 755 $@
|
||||
|
||||
get-wutil-flags: get-wutil-flags.in Makefile
|
||||
@echo "Generating $@"
|
||||
@$(SED) -e 's#$${includedir}#$(includedir)#;' \
|
||||
-e 's#$${libdir}#$(libdir)#;' \
|
||||
-e 's#$${INTLIBS}#$(INTLIBS)#;' < $< > $@
|
||||
@chmod 755 $@
|
||||
|
||||
install-exec-local:
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
31
WINGs/get-wings-flags.in
Normal file
31
WINGs/get-wings-flags.in
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
31
WINGs/get-wutil-flags.in
Normal file
31
WINGs/get-wutil-flags.in
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
WCFLAGS="-I${includedir}"
|
||||
WLFLAGS="-L${libdir}"
|
||||
WLIBS="-lWUtil ${INTLIBS}"
|
||||
|
||||
usage="Usage: get-wutil-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
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifndef WINGS_CONFIG_H_
|
||||
#define WINGS_CONFIG_H_
|
||||
|
||||
#include "../src/config.h"
|
||||
#include "../config.h"
|
||||
|
||||
#if defined(HAVE_LIBINTL_H) && defined(I18N)
|
||||
# include <libintl.h>
|
||||
|
||||
Reference in New Issue
Block a user