Commit 4e60ef30 authored by Eric J. Korpela's avatar Eric J. Korpela


- STILL WORK TO BE DONE TO GET locale STUFF INSTALLED PROPERLY!!!
- Update to libtool 1.5.24
- build environment:  Major automake changes that I've been warning about
  for some time.
- Now uses libtool to build libraries.
- Builds separate boinc_fcgi and sched_fcgi libraries for use with 
  FCGI server components.
- New macro "BOINC_CHECK_LIB_WITH" that executes a "AC_CHECK_LIB" on
  a library only if --with-libname[=DIR] is specified on the configure
  command line.  This is to allow inclusion of libraries when the 
  ssl, gtk, wxWidgets, or other configuration is incorrect for static
  libraries.
- Added a lot of "--with-*" for some libraries that might be required for
  static builds.
- The sea directory has been moved to packages/generic.  Changes to sea
  and the associated scripts might be required to better make use of the
  staging mechanism and shared libraries.
- Fixed includes of boinc_fcgi.h in many files.
- Fixed places where FCGI_FILE needs to be used implicitly.
- Fixed missing define of _SC_PAGESIZE on hosts that define only
  _SC_PAGE_SIZE.
- Moved build of boinc_cmd (and source file) from lib to client



svn path=/trunk/boinc/; revision=16904
parent d93eb6da
...@@ -3,10 +3,14 @@ ...@@ -3,10 +3,14 @@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
include Makefile.incl
## make sure rebuilding uses the right aclocal-switches ## make sure rebuilding uses the right aclocal-switches
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
API_SUBDIRS = api lib zip if ENABLE_LIBRARIES
API_SUBDIRS = api lib zip
endif
if ENABLE_SERVER if ENABLE_SERVER
SERVER_SUBDIRS = db test py sched apps tools samples/example_app SERVER_SUBDIRS = db test py sched apps tools samples/example_app
...@@ -16,8 +20,8 @@ if ENABLE_CLIENT ...@@ -16,8 +20,8 @@ if ENABLE_CLIENT
CLIENT_SUBDIRS = client client/scripts CLIENT_SUBDIRS = client client/scripts
endif endif
if BUILD_CLIENTGUI if ENABLE_MANAGER
CLIENTGUI_SUBDIRS = clientgui clientgui/res locale CLIENTGUI_SUBDIRS = clientgui clientgui/res locale
endif endif
# ORDER MATTERS below. One must build dependencies FIRST, then things # ORDER MATTERS below. One must build dependencies FIRST, then things
...@@ -33,9 +37,11 @@ EXTRA_DIST = \ ...@@ -33,9 +37,11 @@ EXTRA_DIST = \
stripchart \ stripchart \
INSTALL INSTALL
if INSTALL_HEADERS
pkginclude_HEADERS = \ pkginclude_HEADERS = \
config.h \ config.h \
version.h version.h
endif
# Add a stage target for staging a distribution # Add a stage target for staging a distribution
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
# Note: MYSQL_CFLAGS and MYSQL_LIBS set by configure from mysql_config # Note: MYSQL_CFLAGS and MYSQL_LIBS set by configure from mysql_config
# ignore any LIBS set by configure
LIBS=
LIBBOINC_VERSION = @LIBBOINC_VERSION@
MYSQL_LIBS = @MYSQL_LIBS@ MYSQL_LIBS = @MYSQL_LIBS@
MYSQL_CFLAGS = @MYSQL_CFLAGS@ MYSQL_CFLAGS = @MYSQL_CFLAGS@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
...@@ -10,6 +15,8 @@ PTHREAD_LIBS = @PTHREAD_LIBS@ ...@@ -10,6 +15,8 @@ PTHREAD_LIBS = @PTHREAD_LIBS@
RSA_LIBS = -lcrypto RSA_LIBS = -lcrypto
AM_LIBTOOLFLAGS =
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I$(top_srcdir)/lib \ -I$(top_srcdir)/lib \
-I$(top_srcdir)/api \ -I$(top_srcdir)/api \
...@@ -17,19 +24,36 @@ AM_CPPFLAGS = \ ...@@ -17,19 +24,36 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/client \ -I$(top_srcdir)/client \
-I$(top_srcdir)/tools \ -I$(top_srcdir)/tools \
-I$(top_srcdir)/sched \ -I$(top_srcdir)/sched \
-I$(top_srcdir)/lib/mac -I$(top_srcdir)/lib/mac \
$(PTHREAD_CFLAGS)
AM_CFLAGS =
AM_CXXFLAGS =
AM_LDFLAGS =
# dependencies to make sure libs gets compiled before # dependencies to make sure libs gets compiled before
# programs linking to them: # programs linking to them:
LIBSCHED = $(top_builddir)/sched/libsched.a LIBSCHED = $(top_builddir)/sched/libsched.la
$(LIBSCHED): $(LIBSCHED):
cd $(top_builddir)/sched; ${MAKE} libsched.a cd $(top_builddir)/sched; ${MAKE} libsched.la
LIBSCHED_FCGI = $(top_builddir)/sched/libsched_fcgi.la
LIBBOINC = $(top_builddir)/lib/libboinc.a $(LIBSCHED_FCGI):
cd $(top_builddir)/sched; ${MAKE} libsched_fcgi.la
LIBBOINC = $(top_builddir)/lib/libboinc.la
$(LIBBOINC): $(LIBBOINC):
cd $(top_builddir)/lib; ${MAKE} libboinc.a cd $(top_builddir)/lib; ${MAKE} libboinc.la
LIBBOINC_FCGI = $(top_builddir)/lib/libboinc_fcgi.la
LIBAPI = = $(top_builddir)/api/libboinc_api.a $(LIBBOINC_FCGI):
cd $(top_builddir)/lib; ${MAKE} libboinc_fcgi.la
LIBAPI = $(top_builddir)/api/libboinc_api.la
$(LIBAPI): $(LIBAPI):
cd $(top_builddir)/api; ${MAKE} libboinc_api.a cd $(top_builddir)/api; ${MAKE} libboinc_api.la
SERVERLIBS = $(LIBSCHED) $(LIBBOINC) $(MYSQL_LIBS) $(PTHREAD_LIBS) $(RSA_LIBS)
SERVERLIBS_FCGI = $(LIBSCHED_FCGI) $(LIBBOINC_FCGI) -lfcgi $(MYSQL_LIBS) $(PTHREAD_LIBS) $(RSA_LIBS)
APPLIBS = $(LIBAPI) $(LIBBOINC)
...@@ -3,23 +3,22 @@ ...@@ -3,23 +3,22 @@
include $(top_srcdir)/Makefile.incl include $(top_srcdir)/Makefile.incl
AM_CFLAGS = @GLUT_CFLAGS@ if ENABLE_LIBRARIES
AM_LDFLAGS = @GLUT_LIBS@
# stuff linked into both main app and graphics app # stuff linked into both main app and graphics app
api_files= \ api_files= \
boinc_api.cpp \ boinc_api.cpp \
reduce_main.cpp \ reduce_main.cpp \
graphics2_util.cpp graphics2_util.cpp
# stuff linked into graphics app # stuff linked into graphics app
graphics2_files = \ graphics2_files = \
gutil.cpp \ gutil.cpp \
gutil_text.cpp \ gutil_text.cpp \
reduce_lib.cpp \ reduce_lib.cpp \
texfont.cpp \ texfont.cpp \
texture.cpp \ texture.cpp \
txf_util.cpp \ txf_util.cpp \
graphics2.cpp \ graphics2.cpp \
graphics2_unix.cpp graphics2_unix.cpp
...@@ -31,30 +30,53 @@ endif ...@@ -31,30 +30,53 @@ endif
EXTRA_DIST = *.h EXTRA_DIST = *.h
if BUILD_GRAPHICS_API if BUILD_GRAPHICS_API
graphics_libs = \ AM_CFLAGS += @GLUT_CFLAGS@
libboinc_graphics2.a
else
graphics_libs =
endif endif
lib_LIBRARIES = libboinc_api.a $(graphics_libs) lib_LTLIBRARIES = libboinc_api.la
libboinc_api_la_SOURCES = $(api_files)
libboinc_api_a_SOURCES = $(api_files) libboinc_api_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
if BUILD_GRAPHICS_API
libboinc_graphics2_a_SOURCES = $(graphics2_files) lib_LTLIBRARIES += libboinc_graphics2.la
libboinc_graphics2_a_CPPFLAGS = -I$(top_srcdir)/lib libboinc_graphics2_la_SOURCES = $(graphics2_files)
libboinc_graphics2_la_CPPFLAGS = -I$(top_srcdir)/lib
libboinc_graphics2_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
endif #BUILD_GRAPHICS_API
if INSTALL_HEADERS
## install only headers that are meant for exporting the API !! ## install only headers that are meant for exporting the API !!
pkginclude_HEADERS = \ pkginclude_HEADERS = \
boinc_api.h \ boinc_api.h \
graphics2.h \ graphics2.h \
gutil.h gutil.h
endif ## INSTALL_HEADERS
if BUILD_STATIC_LIBS
all_local = libboinc_api.a
if BUILD_GRAPHICS_API
all_local += libboinc_graphics2.a
endif
endif
all-local: $(all_local)
libboinc_api.a: libboinc_api.la
rm -f libboinc_api.a
ln .libs/libboinc_api.a
libboinc_graphics2.a: libboinc_graphics2.la
rm -f libboinc_graphics2.a
ln .libs/libboinc_graphics2.a
endif ## ENABLE_LIBRARIES
.PHONY: .PHONY:
EXTRA_PROGRAMS = api_app api_test EXTRA_PROGRAMS = api_app api_test
api_app_SOURCES = api_app.cpp boinc_api.cpp ../lib/parse.cpp api_app_SOURCES = api_app.cpp ../lib/parse.cpp
api_test_SOURCES = boinc_api.cpp api_test.cpp ../lib/parse.cpp api_app_LDADD = $(LIBAPI)
api_test_SOURCES = api_test.cpp ../lib/parse.cpp
api_test_LDADD = $(LIBAPI)
...@@ -5,9 +5,17 @@ include $(top_srcdir)/Makefile.incl ...@@ -5,9 +5,17 @@ include $(top_srcdir)/Makefile.incl
bin_PROGRAMS = upper_case concat 1sec bin_PROGRAMS = upper_case concat 1sec
LDADD = $(top_builddir)/api/libboinc_api.a $(LIBBOINC) $(PTHREAD_LIBS) upper_case_SOURCES = upper_case.cpp
AM_CXXFLAGS = $(MYSQL_CFLAGS) upper_case_CXXFLAGS = $(PTHREAD_CFLAGS)
upper_case_LDFLAGS = -static-libtool-libs
upper_case_LDADD = $(APPLIBS)
upper_case_SOURCES = upper_case.cpp concat_SOURCES = concat.cpp
concat_SOURCES = concat.cpp concat_CXXFLAGS = $(PTHREAD_CFLAGS)
1sec_SOURCES = 1sec.cpp concat_LDFLAGS = -static-libtool-libs
concat_LDADD = $(APPLIBS)
1sec_SOURCES = 1sec.cpp
1sec_CFLAGS = $(PTHREAD_CFLAGS)
1sec_LDFLAGS = -static-libtool-libs
1sec_LDADD = $(APPLIBS)
...@@ -280,3 +280,82 @@ David 13 Jan 2009 ...@@ -280,3 +280,82 @@ David 13 Jan 2009
lib/ lib/
gui_rpc_client_ops.cpp gui_rpc_client_ops.cpp
gui_rpc_client.h gui_rpc_client.h
Eric 13 Jan 2009
- STILL WORK TO BE DONE TO GET locale STUFF INSTALLED PROPERLY!!!
- Update to libtool 1.5.24
- build environment: Major automake changes that I've been warning about
for some time.
- Now uses libtool to build libraries.
- Builds separate boinc_fcgi and sched_fcgi libraries for use with
FCGI server components.
- New macro "BOINC_CHECK_LIB_WITH" that executes a "AC_CHECK_LIB" on
a library only if --with-libname[=DIR] is specified on the configure
command line. This is to allow inclusion of libraries when the
ssl, gtk, wxWidgets, or other configuration is incorrect for static
libraries.
- Added a lot of "--with-*" for some libraries that might be required for
static builds.
- The sea directory has been moved to packages/generic. Changes to sea
and the associated scripts might be required to better make use of the
staging mechanism and shared libraries.
- Fixed includes of boinc_fcgi.h in many files.
- Fixed places where FCGI_FILE needs to be used implicitly.
- Fixed missing define of _SC_PAGESIZE on hosts that define only
_SC_PAGE_SIZE.
- Moved build of boinc_cmd (and source file) from lib to client
ltmain.sh
config.guess
config.sub
Makefile.incl
m4/
sah_check_lib.m4
check_ssl.m4
boinc_gtk.m4 (new)
boinc_check_lib_with.m4 (new)
libcurl.m4
boinc_wxwidgets.m4
sea/ (moved to packages/generic/sea)
packages/ (new)
generic/ (new)
sea/ (new)
Makefile.am
client/
Makefile.am
hostinfo_unix.cpp
sched/
edf_sim.cpp
sched_shmem.h
sched_msgs.h
sched_msgs.cpp
sched_send.cpp
handle_resuest.cpp
file_upload_handler.cpp
main.cpp
sched_assign.cpp
Makefile.am
lib/
boinc_cmd.cpp (moved to client)
diagnostics.cpp
prefs.cpp
msg_log.h
cert_sig.cpp
Makefile.am
zip/
Makefile.am
samples/
example_app/
Makefile
api/
Makefile.am
clientgui/
Makefile.am
tools/
backend_lib.cpp
Makefile.am
doc/
manpages/
Makefile.am
...@@ -3,19 +3,23 @@ ...@@ -3,19 +3,23 @@
include $(top_srcdir)/Makefile.incl include $(top_srcdir)/Makefile.incl
# (for a while we used "-static -static-libgcc" on linux, but this is obsolete if ENABLE_CLIENT_RELEASE
# now) AM_LDFLAGS += -static-libtool-libs
#STATIC_FLAGS=@STATIC_FLAGS@ endif
client-bin: @CLIENT_BIN_FILENAME@
LIBS += @CLIENTLIBS@ LIBS += $(CLIENTLIBS)
if OS_DARWIN if OS_DARWIN
LIBS += -framework IOKit -framework Foundation -framework ScreenSaver -framework Cocoa LIBS += -framework IOKit -framework Foundation -framework ScreenSaver -framework Cocoa
endif endif
bin_PROGRAMS = boinc_client switcher bin_PROGRAMS = boinc_client switcher boinccmd
boinccmd_SOURCES = boinc_cmd.cpp
boinccmd_DEPENDENCIES = $(LIBBOINC)
boinccmd_CPPFLAGS = $(AM_CPPFLAGS)
boinccmd_LDFLAGS = $(AM_LDFLAGS) -L../lib
boinccmd_LDADD = $(LIBBOINC) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
boinc_client_SOURCES = \ boinc_client_SOURCES = \
acct_mgr.cpp \ acct_mgr.cpp \
...@@ -54,32 +58,34 @@ boinc_client_SOURCES = \ ...@@ -54,32 +58,34 @@ boinc_client_SOURCES = \
main.cpp \ main.cpp \
net_stats.cpp \ net_stats.cpp \
pers_file_xfer.cpp \ pers_file_xfer.cpp \
rr_sim.cpp \ rr_sim.cpp \
sandbox.cpp \ sandbox.cpp \
scheduler_op.cpp \ scheduler_op.cpp \
time_stats.cpp \ time_stats.cpp \
whetstone.cpp \ whetstone.cpp \
work_fetch.cpp work_fetch.cpp
boinc_client_DEPENDENCIES = boinc_client_DEPENDENCIES = $(LIBBOINC)
boinc_client_CPPFLAGS = -O3 -fomit-frame-pointer -fforce-addr -ffast-math $(AM_CPPFLAGS) boinc_client_CPPFLAGS = $(AM_CPPFLAGS)
boinc_client_LDFLAGS = -static-libgcc boinc_client_LDFLAGS = $(AM_LDFLAGS) -L../lib
boinc_client_LDADD = $(LIBBOINC) $(PTHREAD_LIBS) boinc_client_LDADD = $(LIBBOINC) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
boinc_clientdir = $(bindir) boinc_clientdir = $(bindir)
boinc_client_DATA = ../curl/ca-bundle.crt
switcher_SOURCES = switcher.cpp switcher_SOURCES = switcher.cpp
all-local: client-bin ## since we are using libtool we need some magic to get boinc and boinc_client
## to both be installed properly. The next two rules do that...
all-local: boinc
# make a hard link to the client name. boinc: boinc_client
@CLIENT_BIN_FILENAME@: boinc_client rm -f boinc .libs/boinc
rm -f $@ ln boinc_client boinc
rm -f $@.unmodified if test -f .libs/boinc_client ; then ln .libs/boinc_client .libs/boinc ; fi
cp $? $@.unmodified
@LN@ $? $@ install-exec-hook:
@STRIP@ $@ rm -f $(DESTDIR)$(exec_prefix)/bin/boinc
ln $(DESTDIR)$(exec_prefix)/bin/boinc_client $(DESTDIR)$(exec_prefix)/bin/boinc
## these source files need to be specified because no rule uses them. ## these source files need to be specified because no rule uses them.
...@@ -87,7 +93,3 @@ EXTRA_DIST = *.h \ ...@@ -87,7 +93,3 @@ EXTRA_DIST = *.h \
mac \ mac \
translation \ translation \
win win
clean-local:
rm -f @CLIENT_BIN_FILENAME@
rm -f @CLIENT_BIN_FILENAME@.unmodified
...@@ -140,6 +140,11 @@ NXEventHandle gEventHandle = NULL; ...@@ -140,6 +140,11 @@ NXEventHandle gEventHandle = NULL;
#include <machine/cpuconf.h> #include <machine/cpuconf.h>
#endif #endif
// Some OS define _SC_PAGE_SIZE instead of _SC_PAGESIZE
#if defined(_SC_PAGE_SIZE) && !defined(_SC_PAGESIZE)
#define _SC_PAGESIZE _SC_PAGE_SIZE
#endif
// The following is intended to be true both on Linux // The following is intended to be true both on Linux
// and Debian GNU/kFreeBSD (see trac #521) // and Debian GNU/kFreeBSD (see trac #521)
// //
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
include $(top_srcdir)/Makefile.incl include $(top_srcdir)/Makefile.incl
LIBS += @CLIENTLIBS@ if ENABLE_CLIENT_RELEASE
AM_LDFLAGS += -static-libtool-libs
endif
if OS_DARWIN if OS_DARWIN
LIBS += -framework IOKit -framework Foundation -framework ScreenSaver -framework Cocoa -framework Security LIBS += -framework IOKit -framework Foundation -framework ScreenSaver -framework Cocoa -framework Security
...@@ -15,17 +16,17 @@ if OS_DARWIN ...@@ -15,17 +16,17 @@ if OS_DARWIN
mac/Mac_GUI.cpp\ mac/Mac_GUI.cpp\
mac/browser_safari.mm mac/browser_safari.mm
mac_headers = mac/*.h mac_headers = mac/*.h
else else
mac_headers = mac_headers =
mac_sources = mac_sources =
endif endif
bin_PROGRAMS = boinc_gui bin_PROGRAMS = boincmgr
# keep the following alphabetic # keep the following alphabetic
boinc_gui_SOURCES = \ boincmgr_SOURCES = \
AccountInfoPage.cpp \ AccountInfoPage.cpp \
AccountManagerInfoPage.cpp \ AccountManagerInfoPage.cpp \
AccountManagerProcessingPage.cpp \ AccountManagerProcessingPage.cpp \
...@@ -105,28 +106,13 @@ EXTRA_DIST = *.h \ ...@@ -105,28 +106,13 @@ EXTRA_DIST = *.h \
../lib/error_numbers.h \ ../lib/error_numbers.h \
locale $(mac_headers) locale $(mac_headers)
boinc_gui_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(CLIENTGUIFLAGS) boincmgr_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(CLIENTGUIFLAGS)
boinc_gui_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(CLIENTGUIFLAGS) boincmgr_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(CLIENTGUIFLAGS)
boinc_gui_LDADD = $(LIBBOINC) $(CLIENTGUILIBS) boincmgr_LDADD = $(LIBBOINC) $(CLIENTGUILIBS) $(BOINC_EXTRA_LIBS) $(CLIENTLIBS)
all-local: client_gui-bin
client_gui-bin: @CLIENT_GUI_BIN_FILENAME@
win_config.h: $(top_srcdir)/config.h win_config.h: $(top_srcdir)/config.h
grep '#define.*BOINC.*VERSION' $^ > $@ grep '#define.*BOINC.*VERSION' $^ > $@
version: win_config.h version: win_config.h
# make a hard link to the client name.
@CLIENT_GUI_BIN_FILENAME@: boinc_gui
rm -f $@
rm -f $@.unmodified
cp $? $@.unmodified
@LN@ $? $@
@STRIP@ $@
clean-local:
rm -f @CLIENT_GUI_BIN_FILENAME@
rm -f @CLIENT_GUI_BIN_FILENAME@.unmodified
.PHONY: version .PHONY: version
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -8,7 +8,7 @@ if ENABLE_CLIENT ...@@ -8,7 +8,7 @@ if ENABLE_CLIENT
CLIENT_MANS = boinc.1 boinccmd.1 CLIENT_MANS = boinc.1 boinccmd.1
endif endif
if BUILD_CLIENTGUI if ENABLE_MANAGER
CLIENTGUI_MANS = boincmgr.1 CLIENTGUI_MANS = boincmgr.1
endif endif
...@@ -18,7 +18,9 @@ endif ...@@ -18,7 +18,9 @@ endif
man_MANS = $(CLIENT_MANS) $(CLIENTGUI_MANS) $(SERVER_MANS) man_MANS = $(CLIENT_MANS) $(CLIENTGUI_MANS) $(SERVER_MANS)
%.1: %.xml SUFFIXES = .xml .1
.xml.1:
$(DOCBOOK2X_MAN) $< $(DOCBOOK2X_MAN) $<
all-local: $(man_MANS) all-local: $(man_MANS)
......
...@@ -3,60 +3,24 @@ ...@@ -3,60 +3,24 @@
include $(top_srcdir)/Makefile.incl include $(top_srcdir)/Makefile.incl
#if HAVE_NSL bin_PROGRAMS =
nslprogs=boinc_cmd$(EXEEXT)
#endif
bin_PROGRAMS = crypt_prog$(EXEEXT) $(nslprogs) # Stuff needed for server builds goes here.
if ENABLE_SERVER
EXTRA_PROGRAMS = md5_test$(EXEEXT) shmem_test$(EXEEXT) msg_test$(EXEEXT) bin_PROGRAMS += crypt_prog
all-local: client-bin endif
# end of "if ENABLE_SERVER"
client-bin: @CLIENT_CMD_BIN_FILENAME@
boinc_cmd_SOURCES = \
boinc_cmd.cpp \
gui_rpc_client.h
boinc_cmd_LDADD = $(lib_LIBRARIES) $(PTHREAD_LIBS)
# make a hard link to the client name.
@CLIENT_CMD_BIN_FILENAME@: boinc_cmd$(EXEEXT)
rm -f $@
rm -f $@.unmodified
cp $? $@.unmodified
@LN@ $? $@
@STRIP@ $@
lib_LIBRARIES = libboinc.a if ENABLE_LIBRARIES
EXTRA_DIST = *.h *.cpp