aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-05 14:08:32 (GMT)
committerMathias Gumz <mathias.gumz@gmail.com>2015-01-05 14:08:32 (GMT)
commitf8d0bd4cb303caad68c121a77974a3a0daa0c40e (patch)
tree94f2e1482a054e2316d8e3b8a066dcb6bdfc1f29
parent0820bcb640e9030a99a4c47119df6b9305e632da (diff)
downloadfluxbox-f8d0bd4cb303caad68c121a77974a3a0daa0c40e.zip
fluxbox-f8d0bd4cb303caad68c121a77974a3a0daa0c40e.tar.bz2
Fix build-system: install data files (keys, apps, menu ...)
* Correctly build data files when operate outside of the $(srcdir) * Actually install data files * Use pkg-config to detect X11, works better on MacOSX. We used pkg-config already anyway, double checking for X11 does not yield better results. * Replace EXEEXT in some files while before installing them
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac26
-rw-r--r--data/Makemodule.am22
-rw-r--r--src/Makemodule.am10
-rw-r--r--util/Makemodule.am7
5 files changed, 38 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index 1b09b39..f208e73 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,6 +38,10 @@ PROGRAM_SUFFIX=@program_suffix@
38# Do not rely on configure.ac AC_CONFIG_FILES for install paths. The 38# Do not rely on configure.ac AC_CONFIG_FILES for install paths. The
39# paths should be expanded at make time rather than configure. 39# paths should be expanded at make time rather than configure.
40edit_cmd = sed \ 40edit_cmd = sed \
41 -e 's|@default_style[@]|$(DEFAULT_STYLE)|g' \
42 -e 's|@default_menu[@]|$(DEFAULT_MENU)|g' \
43 -e 's|@default_keysfile[@]|$(DEFAULT_KEYSFILE)|g' \
44 -e 's|@default_appsfile[@]|$(DEFAULT_APPSFILE)|g' \
41 -e 's|@bindir[@]|$(bindir)|g' \ 45 -e 's|@bindir[@]|$(bindir)|g' \
42 -e 's|@datadir[@]|$(datadir)|g' \ 46 -e 's|@datadir[@]|$(datadir)|g' \
43 -e 's|@exec_prefix[@]|$(exec_prefix)|g' \ 47 -e 's|@exec_prefix[@]|$(exec_prefix)|g' \
@@ -53,6 +57,7 @@ edit_cmd = sed \
53 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \ 57 -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \
54 -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \ 58 -e 's|@usrlib_execdir[@]|$(usrlib_execdir)|g' \
55 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \ 59 -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \
60 -e 's|@EXEEXT[@]|$(EXEEXT)|g' \
56 -e 's|@VERSION[@]|$(VERSION)|g' 61 -e 's|@VERSION[@]|$(VERSION)|g'
57 62
58PATHFILES = 63PATHFILES =
@@ -60,6 +65,7 @@ CLEANFILES += $(PATHFILES)
60EXTRA_DIST += $(PATHFILES:=.in) 65EXTRA_DIST += $(PATHFILES:=.in)
61 66
62$(PATHFILES): Makefile 67$(PATHFILES): Makefile
68 $(MKDIR_P) $(dir $@)
63 @ rm -f $@ $@.tmp 69 @ rm -f $@ $@.tmp
64 $(AM_V_GEN) srcdir=''; \ 70 $(AM_V_GEN) srcdir=''; \
65 test -f ./$@.in || srcdir=$(srcdir)/; \ 71 test -f ./$@.in || srcdir=$(srcdir)/; \
diff --git a/configure.ac b/configure.ac
index 33217ad..d6d5612 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,14 +194,24 @@ dnl Check for networking libraries
194AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"]) 194AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"])
195AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) 195AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"])
196 196
197dnl Check for X headers and libraries 197#dnl Check for X headers and libraries
198AC_PATH_X 198#AC_PATH_X
199AC_PATH_XTRA 199#AC_PATH_XTRA
200AS_IF([test x$no_x = "xyes"], [ 200#AS_IF([test x$no_x = "xyes"], [
201# AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.])
202#])
203
204dnl Check for X11
205PKG_CHECK_MODULES([X11], [ x11 ],
206 [AC_DEFINE([HAVE_X11], [1], [Define if x11 is available]) have_x11=yes],
207 [have_x11=no])
208AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.]))
209AS_IF([test x$have_x11 = "xno"], [
201 AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.]) 210 AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.])
202]) 211])
203 212
204LIBS="$X_LIBS $LIBS" 213CXXFLAGS="$X11_CFLAGS $CXXFLAGS"
214LIBS="$X11_LIBS $LIBS"
205 215
206dnl Check for xpg4 216dnl Check for xpg4
207AC_CHECK_LIB([xpg4], [setlocale], [LIBS="-lxpg4 $LIBS"]) 217AC_CHECK_LIB([xpg4], [setlocale], [LIBS="-lxpg4 $LIBS"])
@@ -371,12 +381,6 @@ AS_IF([test "x$enable_imlib2" != "xno"], [
371]) 381])
372AM_CONDITIONAL([IMLIB2], [test "$have_imlib2" = "yes"]) 382AM_CONDITIONAL([IMLIB2], [test "$have_imlib2" = "yes"])
373 383
374dnl Check for X11
375PKG_CHECK_MODULES([X11], [ x11 ],
376 [AC_DEFINE([HAVE_X11], [1], [Define if x11 is available]) have_x11=yes],
377 [have_x11=no])
378AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.]))
379
380dnl Check for X fonts 384dnl Check for X fonts
381have_xft=no 385have_xft=no
382AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support])) 386AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support]))
diff --git a/data/Makemodule.am b/data/Makemodule.am
index 437c54d..a1c15e4 100644
--- a/data/Makemodule.am
+++ b/data/Makemodule.am
@@ -28,30 +28,32 @@ include data/styles/bora_black/Makemodule.am
28include data/styles/arch/pixmaps/Makemodule.am 28include data/styles/arch/pixmaps/Makemodule.am
29include data/styles/arch/Makemodule.am 29include data/styles/arch/Makemodule.am
30 30
31install-pkgdataDATA: 31pkgdata_FILES = data/init data/keys data/apps data/overlay data/menu
32
33install-data-local: $(pkgdata_FILES)
32 @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)" 34 @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)"
33 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU)) 35 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU))
34 $(INSTALL_DATA) ./menu $(DESTDIR)$(DEFAULT_MENU) 36 $(INSTALL_DATA) ./data/menu $(DESTDIR)$(DEFAULT_MENU)
35 @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)" 37 @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)"
36 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS)) 38 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS))
37 $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS) 39 $(INSTALL_DATA) $(srcdir)/data/keys $(DESTDIR)$(DEFAULT_KEYS)
38 @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)" 40 @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)"
39 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS)) 41 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS))
40 $(INSTALL_DATA) ./apps $(DESTDIR)$(DEFAULT_APPS) 42 $(INSTALL_DATA) ./data/apps $(DESTDIR)$(DEFAULT_APPS)
41 @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)" 43 @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)"
42 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY)) 44 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY))
43 $(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY) 45 $(INSTALL_DATA) $(srcdir)/data/overlay $(DESTDIR)$(DEFAULT_OVERLAY)
44 @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)" 46 @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)"
45 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT)) 47 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT))
46 $(INSTALL_DATA) ./init $(DESTDIR)$(DEFAULT_INIT) 48 $(INSTALL_DATA) ./data/init $(DESTDIR)$(DEFAULT_INIT)
47 @echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)" 49 @echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)"
48 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU)) 50 $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU))
49 $(INSTALL_DATA) $(srcdir)/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU) 51 $(INSTALL_DATA) $(srcdir)/data/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU)
50 52
51menu: 53data/menu:
52 env MENUFILENAME=menu \ 54 env MENUFILENAME=$@ \
53 PREFIX="${prefix}" \ 55 PREFIX="${prefix}" \
54 MENUTITLE="Fluxbox-${VERSION}" \ 56 MENUTITLE="Fluxbox-${VERSION}" \
55 INSTALL=Yes \ 57 INSTALL=Yes \
56 PATH="${PATH}:../util:../util/fbrun" \ 58 PATH="${PATH}:../util:../util/fbrun" \
57 util/fluxbox-generate_menu 59 sh util/fluxbox-generate_menu
diff --git a/src/Makemodule.am b/src/Makemodule.am
index 2fd5891..3f1fa06 100644
--- a/src/Makemodule.am
+++ b/src/Makemodule.am
@@ -65,9 +65,9 @@ src/defaults.cc: force
65 echo ''; \ 65 echo ''; \
66 echo 'const char* gitrevision() {'; \ 66 echo 'const char* gitrevision() {'; \
67 if test -r $$GITDIR/HEAD; then \ 67 if test -r $$GITDIR/HEAD; then \
68 echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/HEAD | cut -f 2 -d ' ')`'";'; \ 68 echo ' return "'`cd $$GITDIR && git rev-parse HEAD`'";'; \
69 else \ 69 else \
70 echo ' return "this_is_tar_ball_build";'; \ 70 echo ' return "unknown";'; \
71 fi; \ 71 fi; \
72 echo '}' ) > $(top_builddir)/src/defaults_tmp.cc 72 echo '}' ) > $(top_builddir)/src/defaults_tmp.cc
73 @if ! cmp $(top_builddir)/src/defaults_tmp.cc $(top_builddir)/src/defaults.cc ; then cp $(top_builddir)/src/defaults_tmp.cc $(top_builddir)/src/defaults.cc; fi 73 @if ! cmp $(top_builddir)/src/defaults_tmp.cc $(top_builddir)/src/defaults.cc ; then cp $(top_builddir)/src/defaults_tmp.cc $(top_builddir)/src/defaults.cc; fi
@@ -151,11 +151,7 @@ fluxbox_LDADD = \
151 $(XFT_LIBS) \ 151 $(XFT_LIBS) \
152 $(XINERAMA_LIBS) \ 152 $(XINERAMA_LIBS) \
153 $(XPM_LIBS) \ 153 $(XPM_LIBS) \
154 $(XRENDER_LIBS) \ 154 $(XRENDER_LIBS)
155 $(X_EXTRA_LIBS) \
156 $(X_LIBS) \
157 $(X_PRE_LIBS) \
158 $(X11_LIBS)
159 155
160fluxbox_SOURCES = \ 156fluxbox_SOURCES = \
161 src/AlphaMenu.cc \ 157 src/AlphaMenu.cc \
diff --git a/util/Makemodule.am b/util/Makemodule.am
index b022f10..c985d0d 100644
--- a/util/Makemodule.am
+++ b/util/Makemodule.am
@@ -24,7 +24,6 @@ fbsetroot_LDADD = \
24 libFbTk.a \ 24 libFbTk.a \
25 $(FONTCONFIG_LIBS) \ 25 $(FONTCONFIG_LIBS) \
26 $(FRIBIDI_LIBS) \ 26 $(FRIBIDI_LIBS) \
27 $(X11_LIBS) \
28 $(XFT_LIBS) \ 27 $(XFT_LIBS) \
29 $(XRENDER_LIBS) 28 $(XRENDER_LIBS)
30 29
@@ -45,13 +44,11 @@ fluxbox_update_configs_CPPFLAGS = \
45 -I$(nls_incdir) 44 -I$(nls_incdir)
46fluxbox_update_configs_LDADD = \ 45fluxbox_update_configs_LDADD = \
47 libFbTk.a \ 46 libFbTk.a \
48 $(FRIBIDI_LIBS) \ 47 $(FRIBIDI_LIBS)
49 $(X11_LIBS)
50 48
51fluxbox_remote_SOURCES = \ 49fluxbox_remote_SOURCES = \
52 util/fluxbox-remote.cc 50 util/fluxbox-remote.cc
53fluxbox_remote_CPPFLAGS = \ 51fluxbox_remote_CPPFLAGS = \
54 $(AM_CPPFLAGS) \ 52 $(AM_CPPFLAGS) \
55 -I$(fbtk_incdir) 53 -I$(fbtk_incdir)
56fluxbox_remote_LDADD = \ 54
57 $(X11_LIBS)