From 4dcd5a3a116a7e462429357e86c52516fcff403f Mon Sep 17 00:00:00 2001 From: Eric J Korpela Date: Thu, 1 Nov 2012 17:04:05 -0700 Subject: [PATCH] - Allow sysconfdir to be specified rather than hardcoded at '$prefix/etc' (submitted by Alexander Kruppa) - Fix for compiles on os without xlocale.h --- checkin_notes | 16 ++++++++++++++++ client/scripts/Makefile.am | 16 ++++++++-------- configure.ac | 20 +++++++++++++++++--- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/checkin_notes b/checkin_notes index 30cb827eef..4b06bef848 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6581,3 +6581,19 @@ David 1 Nov 2012 work_fetch.cpp client/ work_fetch.cpp + +Eric 1 Nov 2012 + - Found another missing file + + m4/ + ax_lang_compiler_ms.m4 + +Eric 1 Nov 2012 + - Allow sysconfdir to be specified rather than hardcoded at '$prefix/etc' + (submitted by Alexander Kruppa) + - Fix for compiles on os without xlocale.h + + configure.ac + client/ + scripts/ + Makefile.am diff --git a/client/scripts/Makefile.am b/client/scripts/Makefile.am index 144986d7c8..ae6d01c8bc 100644 --- a/client/scripts/Makefile.am +++ b/client/scripts/Makefile.am @@ -2,16 +2,16 @@ install-exec-hook: chmod +x boinc-client - $(INSTALL) -d $(DESTDIR)/etc/init.d - $(INSTALL) -b boinc-client $(DESTDIR)/etc/init.d/boinc-client + $(INSTALL) -d $(DESTDIR)$(sysconfdir)/init.d + $(INSTALL) -b $(srcdir)/boinc-client $(DESTDIR)$(sysconfdir)/init.d/boinc-client if [ -d /etc/sysconfig ] ; then \ - $(INSTALL) -d $(DESTDIR)/etc/sysconfig ; \ - $(INSTALL) boinc-client.conf $(DESTDIR)/etc/sysconfig/boinc-client ; \ + $(INSTALL) -d $(DESTDIR)$(sysconfdir)/sysconfig ; \ + $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/sysconfig/boinc-client ; \ elif [ -d /etc/default ] ; then \ - $(INSTALL) -d $(DESTDIR)/etc/default ; \ - $(INSTALL) boinc-client.conf $(DESTDIR)/etc/default/boinc-client ; \ + $(INSTALL) -d $(DESTDIR)$(sysconfdir)/default ; \ + $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/default/boinc-client ; \ else \ - $(INSTALL) -d $(DESTDIR)/etc ; \ - $(INSTALL) boinc-client.conf $(DESTDIR)/etc/boinc-client.conf ; \ + $(INSTALL) -d $(DESTDIR)$(sysconfdir) ; \ + $(INSTALL) $(srcdir)/boinc-client.conf $(DESTDIR)$(sysconfdir)/boinc-client.conf ; \ fi diff --git a/configure.ac b/configure.ac index f07fa4ea34..2b9d1c4371 100644 --- a/configure.ac +++ b/configure.ac @@ -478,6 +478,16 @@ if test "x${libdir}" = "xNONE" -o -z "${libdir}" ; then bindir="${exec_prefix}/lib" fi +dnl if --sysconfdir was not specified, default ${sysconfdir} to '/etc/'. +dnl this is done to preserve the behaviour of previous BOINC versions +dnl which always installed to /etc/ in client/scripts/. Now we install +dnl to ${sysconfdir}/. +dnl the default value for ${sysconfdir} set by automake is '${prefix}/etc', +dnl but we also test for an empty string +if test "${sysconfdir}" = '${prefix}/etc' -o "x${sysconfdir}" = "x"; then + sysconfdir=/etc +fi + AC_DEFINE_UNQUOTED(BOINC_PREFIX,"`eval echo ${prefix}`",[Directory tree where BOINC will be installed]) AC_DEFINE_UNQUOTED(BOINC_EXECPREFIX,"`eval echo ${bindir}`",[Directory where BOINC executables will be installed]) AC_DEFINE_UNQUOTED(BOINC_LIBDIR,"`eval echo ${libdir}`",[Directory where BOINC libraries will be installed]) @@ -527,7 +537,7 @@ else echo "DEBUG: GLUT_CFLAGS = $GLUT_CFLAGS" >&5 echo "DEBUG: GLUT_LIBS = $GLUT_LIBS" >&5 - AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h] gtk/gtk.h) + AC_CHECK_HEADERS([gl.h glu.h glut.h glaux.h GL/gl.h GL/glu.h GL/glut.h GL/glaux.h OpenGL/gl.h OpenGL/glu.h OpenGL/glut.h OpenGL/glaux.h GLUT/glut.h MesaGL/gl.h MesaGL/glu.h MesaGL/glut.h MesaGL/glaux.h libnotify/notify.h gtk/gtk.h xlocale.h]) AC_CHECK_LIB([jpeg], [jpeg_start_compress],[have_jpeg=1],[have_jpeg=0]) AC_CHECK_HEADER([jpeglib.h],[have_jpeg=1],[have_jpeg=0]) @@ -571,6 +581,10 @@ AH_TOP([ ]) AH_BOTTOM([ +#ifndef HAVE_XLOCALE_H +#define NO_PER_THREAD_LOCALE 1 +#endif + #ifndef HAVE_RES_INIT #define res_init() (0) #endif @@ -716,8 +730,8 @@ fi dnl ---------- XCB -------------------------------------------------------- if test "${enable_manager}" = yes; then - PKG_CHECK_MODULES(XCB,xcb,have_Xcb="yes",echo "WARNING: Xcb not found, x11_screensaver will not be built") - PKG_CHECK_MODULES(XCBATOM,xcb-atom,have_Xcbatom="yes",echo "WARNING: Xcb-atom not found, x11_screensaver will not be built") + PKG_CHECK_MODULES(XCB,xcb,have_Xcb="yes",[echo "WARNING: Xcb not found, x11_screensaver will not be built"]) + PKG_CHECK_MODULES(XCBATOM,xcb-atom,have_Xcbatom="yes",[echo "WARNING: Xcb-atom not found, x11_screensaver will not be built"]) fi AM_CONDITIONAL(BUILD_X11_SCREENSAVER, [ test "$have_Xcb" = yes -a "$have_Xcbatom" = yes ]) dnl -----------------------------------------------------------------------