From c2d7965c093a66068b3dac4f552ef6fdc8e388f5 Mon Sep 17 00:00:00 2001 From: Bruce Allen Date: Fri, 26 Nov 2004 17:45:13 +0000 Subject: [PATCH] - Fixed autoconf/automake build process so that it works correctly under Mac OSX. Also make dist now works (make distcheck still broken). Karl, since you were the last person to fix up this mess, how about taking a look?? svn path=/trunk/boinc/; revision=4665 --- Makefile.am | 22 +++++------ api/Makefile.am | 10 ++++- checkin_notes | 39 ++++++++++++++++++- client/Makefile.am | 16 +++++--- clientgui/Makefile.am | 8 ++++ configure.ac | 69 ++++++++++++++++++++++++++------ db/Makefile.am | 2 +- m4/.cvsignore | 1 + m4/Makefile.am | 6 +++ m4/acx_pthread.m4 | 15 +++++-- m4/ax_check_gl.m4 | 82 +++++++++++++++++++++++++++++++++++++++ m4/ax_check_glu.m4 | 58 +++++++++++++++++++++++++++ m4/ax_check_glut.m4 | 65 +++++++++++++++++++++++++++++++ m4/ax_lang_compiler_ms.m4 | 14 +++++++ m4/kc_mysql.m4 | 5 ++- m4/sah_header_stdcxx.m4 | 3 +- test/Makefile.am | 24 +++++++++--- test/boinc_db.inc | 42 -------------------- zip/Makefile.am | 8 ++-- zip/unzip/.cvsignore | 2 + zip/unzip/Makefile.am | 14 +++++++ zip/zip/.cvsignore | 1 + zip/zip/Makefile.am | 9 +++++ 23 files changed, 426 insertions(+), 89 deletions(-) create mode 100644 m4/.cvsignore create mode 100644 m4/Makefile.am create mode 100644 m4/ax_check_gl.m4 create mode 100644 m4/ax_check_glu.m4 create mode 100644 m4/ax_check_glut.m4 create mode 100644 m4/ax_lang_compiler_ms.m4 delete mode 100644 test/boinc_db.inc create mode 100644 zip/unzip/.cvsignore create mode 100644 zip/unzip/Makefile.am create mode 100644 zip/zip/.cvsignore create mode 100644 zip/zip/Makefile.am diff --git a/Makefile.am b/Makefile.am index a53566107b..17f0f2ddfe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = foreign -API_SUBDIRS = api lib boincglut apps zip +API_SUBDIRS = api lib apps zip if ENABLE_SERVER SERVER_SUBDIRS = db tools test py sched @@ -16,7 +16,7 @@ if BUILD_CLIENTGUI CLIENTGUI_SUBDIRS = clientgui endif -SUBDIRS = RSAEuro $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) $(CLIENTGUI_SUBDIRS) $(API_SUBDIRS) +SUBDIRS = m4 RSAEuro $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) $(CLIENTGUI_SUBDIRS) $(API_SUBDIRS) # Putting a directory name recursively copies the entire contents - the # dist-hook below gets rid of CVS directories. @@ -25,20 +25,20 @@ EXTRA_DIST = \ win_build \ doc \ stripchart \ - INSTALL + INSTALL -py: - [ "$(srcdir)" != . ] && rm -f $@ && $(LN_S) $(srcdir)/$@ $@ - -UNIX2DOS=unix2dos -UNIX2DOSDIR = /disks/philmor/a/users/quarl/bin +# KARL -- please remove this!! BA +# +# UNIX2DOS=unix2dos +# UNIX2DOSDIR = /disks/philmor/a/users/quarl/bin # UNIX2DOS = /disks/philmor/a/users/quarl/bin/unix2dos dist-hook: - rm -rf `find $(distdir) -name .backup -prune -o -name '*~'` - PATH=$PATH:$UNIX2DOSDIR cd $(distdir)/win_build && $(UNIX2DOS) boinc.dsw *.dsp - cd $(distdir) && ./_autosetup + rm -rf `find $(distdir) -name .backup -prune -o -name '*~' -o -name CVS` +# PATH=$PATH:$UNIX2DOSDIR cd $(distdir)/win_build && $(UNIX2DOS) boinc.dsw *.dsp +# cd $(distdir) && ./_autosetup +# This is a hack! client-bin: cd client && make client-bin client-bin-gz diff --git a/api/Makefile.am b/api/Makefile.am index e9be933dd2..7260083f81 100644 --- a/api/Makefile.am +++ b/api/Makefile.am @@ -20,7 +20,15 @@ graphics_api_files = \ reduce.C \ gutil.C -lib_LIBRARIES = libboinc_api.a libboinc_graphics_api.a +if BUILD_GRAPHICS_API +graphics_libs = libboinc_graphics_api.a +else +graphics_libs = +endif + +lib_LIBRARIES = libboinc_api.a $(graphics_libs) + +EXTRA_LIBRARIES = libboinc_graphics_api.a libboinc_api_a_SOURCES = $(api_files) diff --git a/checkin_notes b/checkin_notes index d007570477..bc402d5f3a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -20244,8 +20244,45 @@ David 24 Nov 2004 Karl 2004-11-25 - For add_util, when cross_project_id is default or 0, generate a random - UUID. + UID. Py/Boinc/ tools.py (added make_uuid) add_util.py + +Bruce and Reinhard 2004-11-26 + + - Fixed autoconf/automake build process so that it works correctly + under Mac OSX. Also make dist now works (make distcheck still + broken). Karl, since you were the last + person to fix up this mess, how about taking a look?? + + Makefile.am + configure.ac + api/ + Makefile.am + client/ + Makefile.am + clientgui/ + Makefile.am + db/ + Makefile.am + m4/ + Makefile.am + acx_pthread.m4 + ax_check_gl.m4 + ax_check_glu.m4 + ax_check_glut.m4 + ax_lang_compiler_ms.m4 + kc_mysql.m4 + sah_header_stdcxx.m4 + test/ + Makefile.am + zip/ + Makefile.am + zip/unzip/ + Makefile.am + zip/zip/ + Makefile.am + test/ + boinc_db.inc [removed: this file is autogenerated] diff --git a/client/Makefile.am b/client/Makefile.am index 46ed90c14c..ba37d7e88a 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -6,6 +6,8 @@ include $(top_srcdir)/Makefile.incl # by default, "-static -static-libgcc" on linux. #STATIC_FLAGS=@STATIC_FLAGS@ +client-bin: @CLIENT_BIN_FILENAME@ + bin_PROGRAMS = boinc_client EXTRA_PROGRAMS = cpu_benchmark @@ -76,7 +78,7 @@ cpu_benchmark_SOURCES = whetstone.C dhrystone.C cpu_benchmark_CFLAGS = -O3 $(AM_CFLAGS) all-local: client-bin -client-bin: @CLIENT_BIN_FILENAME@ + win/win_config.h: $(top_srcdir)/config.h grep '#define.*BOINC.*VERSION' $^ > $@ @@ -91,11 +93,13 @@ version: win/win_config.h ## these source files need to be specified because no rule on unix uses them. EXTRA_DIST = \ - *.h \ - mac/*.h mac/*.cpp \ - win/*.h win/*.cpp win/*.rc \ - win/*.def win/res/*.* \ - translation/*/* + app.h dhrystone.h http.h proxy.h \ + client_msgs.h file_names.h log_flags.h scheduler_op.h \ + client_state.h file_xfer.h main.h ss_logic.h \ + client_types.h gui_rpc_server.h net_stats.h ssl_http.h \ + cpp.h gui_titles.h net_xfer.h ssl_net_xfer.h \ + cpu_benchmark.h hostinfo_network.h pers_file_xfer.h time_stats.h \ + mac win translation clean-local: rm -f @CLIENT_BIN_FILENAME@ diff --git a/clientgui/Makefile.am b/clientgui/Makefile.am index a7339e5b74..320a315ec3 100644 --- a/clientgui/Makefile.am +++ b/clientgui/Makefile.am @@ -34,6 +34,14 @@ boinc_gui_SOURCES = \ ../lib/parse.C \ ../lib/util.C +EXTRA_DIST = BOINCBaseView.h DlgAttachProject.h ValidateAccountKey.h ViewWork.h \ + BOINCGUIApp.h DlgConnection.h ValidateURL.h _wx_intellisense.h \ + BOINCListCtrl.h DlgOptions.h ViewMessages.h resource.h \ + BOINCTaskBar.h Events.h ViewProjects.h stdwx.h \ + BOINCTaskCtrl.h MainDocument.h ViewResources.h \ + DlgAbout.h MainFrame.h ViewTransfers.h \ + res msw locale + boinc_gui_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) $(CLIENTGUIFLAGS) boinc_gui_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS) $(CLIENTGUIFLAGS) boinc_gui_LDADD = $(PTHREAD_LIBS) $(WX_LIBS) $(CLIENTGUILIBS) diff --git a/configure.ac b/configure.ac index b0ef9c2066..2bbc81bfb9 100644 --- a/configure.ac +++ b/configure.ac @@ -43,9 +43,6 @@ fi echo "--- Configuring BOINC AC_PACKAGE_VERSION (${configured_to_build}) ---" -AM_CONDITIONAL(ENABLE_SERVER, [test "${enable_server}" = yes]) -AM_CONDITIONAL(ENABLE_CLIENT, [test "${enable_client}" = yes]) - AC_CANONICAL_SYSTEM dnl generate .tar.gz, .tar.bz2, .zip @@ -106,7 +103,19 @@ AC_PROG_RANLIB AC_PROG_LN_S if test "${enable_server}" = yes; then - AC_CHECK_MYSQL + AC_CHECK_MYSQL + if test "${no_mysql}" = yes; then + AC_MSG_WARN([ mysql not found. +====================================================================== +WARNING: trying to build BOINC-server, but MYSQL was not be found. +If you don't want to build the server you should use --disable-server. + +I am continuing now as if --disable-server had been specified. + +====================================================================== +]) + enable_server=no + fi fi dnl Checks for libraries. @@ -127,8 +136,35 @@ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" + +dnl ---------- decide wether to build the graphical boinc-api libs or not +dnl check for X11 +AC_PATH_X +AC_PATH_XTRA + dnl check for GL library -SAH_GRX_LIBS +AX_CHECK_GL +AX_CHECK_GLU +AX_CHECK_GLUT +if test "$no_gl" = yes -o "$no_glu" = yes -o "$no_glut" = yes ; then + have_glut=no + AC_MSG_WARN([ +================================================================================ +WARNING: openGL/GLUT not found. + +The GL, GLU and GLUT libraries are required in order to build the graphical parts +of the BOINC application API library. + +==> only building non-graphical parts of the BOINC API Library for now. + +================================================================================ + ]) +else + 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]) +fi +AM_CONDITIONAL(BUILD_GRAPHICS_API, [ test "$have_glut" = yes ]) +dnl -------------------------------------------------------------------------------- + AC_CHECK_LIB(socket, setservent) AC_CHECK_LIB(gen, strfind) AC_CHECK_LIB(gen, strfind, [ AC_DEFINE(HAVE_STRFIND, 1, [Have strfind]) ] ) @@ -152,7 +188,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_TYPE_SIGNAL AC_CHECK_HEADERS(arpa/inet.h dirent.h fcntl.h malloc.h netdb.h netinet/in.h netinet/tcp.h signal.h strings.h sys/file.h sys/ipc.h sys/mount.h sys/param.h sys/resource.h sys/select.h sys/shm.h sys/socket.h sys/stat.h sys/statvfs.h sys/statfs.h sys/swap.h sys/sysctl.h sys/systeminfo.h sys/time.h sys/types.h sys/utsname.h sys/vmmeter.h sys/wait.h unistd.h utmp.h errno.h procfs.h) -SAH_GRX_INCLUDES + AC_LANG_PUSH(C++) SAH_HEADER_STDCXX SAH_CHECK_NAMESPACES @@ -272,7 +308,9 @@ AM_CONDITIONAL(OS_LINUX, [echo $host_os | grep '^linux' > /dev/null]) dnl In case anyone wants to try building the windows code using mingw! AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null]) - +dnl tell automake about whether to build client and/or server +AM_CONDITIONAL(ENABLE_SERVER, [test "${enable_server}" = yes]) +AM_CONDITIONAL(ENABLE_CLIENT, [test "${enable_client}" = yes]) dnl by default, create static binaries on linux. dnl [if [ "$target_os" = "linux-gnu" ]; then @@ -281,13 +319,17 @@ dnl fi dnl echo "checking static flags... ${STATIC_FLAGS:-(none)}"] dnl AC_SUBST(STATIC_FLAGS) + +# If you still want to build boincglut, include these into the file list below +# boincglut/include/Makefile +# boincglut/lib/glut/Makefile +# boincglut/lib/Makefile +# boincglut/Makefile + + AC_CONFIG_FILES([ api/Makefile apps/Makefile - boincglut/include/Makefile - boincglut/lib/glut/Makefile - boincglut/lib/Makefile - boincglut/Makefile clientgui/Makefile client/Makefile client/win/boinc_path_config.py:py/Boinc/boinc_path_config.py.in @@ -309,9 +351,12 @@ AC_CONFIG_FILES([ tools/boinc_path_config.py:py/Boinc/boinc_path_config.py.in tools/Makefile zip/Makefile + zip/zip/Makefile + zip/unzip/Makefile + m4/Makefile ]) -dnl AC_CONFIG_HEADERS([config.h]) +dnl AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADERS([config.h]) AC_OUTPUT diff --git a/db/Makefile.am b/db/Makefile.am index 17f3863de1..f2a254012f 100644 --- a/db/Makefile.am +++ b/db/Makefile.am @@ -1,3 +1,3 @@ ## $Id$ -EXTRA_DIST = *.sql *.h init_db +EXTRA_DIST = constraints.sql schema.sql boinc_db.h db_base.h mysql.h init_db diff --git a/m4/.cvsignore b/m4/.cvsignore new file mode 100644 index 0000000000..70845e08eb --- /dev/null +++ b/m4/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/m4/Makefile.am b/m4/Makefile.am new file mode 100644 index 0000000000..ba92148833 --- /dev/null +++ b/m4/Makefile.am @@ -0,0 +1,6 @@ +## -*- mode: make; tab-width: 4 -*- +## $Id$ + +EXTRA_DIST = ax_check_gl.m4 ax_lang_compiler_ms.m4 sah_header_stdcxx.m4 \ +Makefile.am ax_check_glu.m4 kc_mysql.m4 sah_namespace.m4 \ +acx_pthread.m4 ax_check_glut.m4 sah_grx.m4 wxWidgets.m4 diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4 index d318ab01d9..bedf51c32a 100644 --- a/m4/acx_pthread.m4 +++ b/m4/acx_pthread.m4 @@ -37,9 +37,10 @@ fi # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all. +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: @@ -58,6 +59,7 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) @@ -87,6 +89,13 @@ for flag in $acx_pthread_flags; do PTHREAD_CFLAGS="$flag" ;; + pthread-config) + AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" @@ -157,7 +166,7 @@ if test "x$acx_pthread_ok" = xyes; then AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) diff --git a/m4/ax_check_gl.m4 b/m4/ax_check_gl.m4 new file mode 100644 index 0000000000..47ea4e0d2d --- /dev/null +++ b/m4/ax_check_gl.m4 @@ -0,0 +1,82 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_check_gl.html +dnl +AC_DEFUN([AX_CHECK_GL], +[AC_REQUIRE([AC_PATH_X])dnl +AC_REQUIRE([ACX_PTHREAD])dnl + +# +# There isn't a reliable way to know we should use the Apple OpenGL framework +# without a configure option. A Mac OS X user may have installed an +# alternative GL implementation (e.g., Mesa), which may or may not depend on X. +# +AC_ARG_WITH([apple-opengl-framework], + [AC_HELP_STRING([--with-apple-opengl-framework], + [use Apple OpenGL framework (Mac OS X only)])]) +if test "X$with_apple_opengl_framework" = "Xyes"; then + AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1], + [Use the Apple OpenGL framework.]) + GL_LIBS="-framework OpenGL" +else + AC_LANG_PUSH(C) + + AX_LANG_COMPILER_MS + if test X$ax_compiler_ms = Xno; then + GL_CFLAGS="${PTHREAD_CFLAGS}" + GL_LIBS="${PTHREAD_LIBS} -lm" + fi + + # + # Use x_includes and x_libraries if they have been set (presumably by + # AC_PATH_X). + # + if test "X$no_x" != "Xyes"; then + if test -n "$x_includes"; then + GL_CFLAGS="-I${x_includes} ${GL_CFLAGS}" + fi + if test -n "$x_libraries"; then + GL_LIBS="-L${x_libraries} -lX11 ${GL_LIBS}" + fi + fi + + AC_CHECK_HEADERS([windows.h]) + + AC_CACHE_CHECK([for OpenGL library], [ax_cv_check_gl_libgl], + [ax_cv_check_gl_libgl="no" + ax_save_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" + ax_save_LIBS="${LIBS}" + LIBS="" + ax_check_libs="-lopengl32 -lGL" + for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` + else + ax_try_lib="${ax_lib}" + fi + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# include ]], + [[glBegin(0)]])], + [ax_cv_check_gl_libgl="${ax_try_lib}"; break]) + done + LIBS=${ax_save_LIBS} + CPPFLAGS=${ax_save_CPPFLAGS}]) + + if test "X${ax_cv_check_gl_libgl}" = "Xno"; then + no_gl="yes" + GL_CFLAGS="" + GL_LIBS="" + else + GL_LIBS="${ax_cv_check_gl_libgl} ${GL_LIBS}" + fi + AC_LANG_POP(C) +fi + +AC_SUBST([GL_CFLAGS]) +AC_SUBST([GL_LIBS]) +])dnl diff --git a/m4/ax_check_glu.m4 b/m4/ax_check_glu.m4 new file mode 100644 index 0000000000..d1c22fa3ce --- /dev/null +++ b/m4/ax_check_glu.m4 @@ -0,0 +1,58 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_check_glu.html +dnl +AC_DEFUN([AX_CHECK_GLU], +[AC_REQUIRE([AX_CHECK_GL])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +GLU_CFLAGS="${GL_CFLAGS}" +if test "X${with_apple_opengl_framework}" != "Xyes"; then + AC_CACHE_CHECK([for OpenGL Utility library], [ax_cv_check_glu_libglu], + [ax_cv_check_glu_libglu="no" + ax_save_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${GL_CFLAGS} ${CPPFLAGS}" + ax_save_LIBS="${LIBS}" + LIBS="" + ax_check_libs="-lglu32 -lGLU" + for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` + else + ax_try_lib="${ax_lib}" + fi + LIBS="${ax_try_lib} ${GL_LIBS} ${ax_save_LIBS}" + # + # libGLU typically links with libstdc++ on POSIX platforms. However, + # setting the language to C++ means that test program source is named + # "conftest.cc"; and Microsoft cl doesn't know what to do with such a + # file. + # + AC_LANG_PUSH([C++]) + if test X$ax_compiler_ms = Xyes; then + AC_LANG_PUSH([C]) + fi + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# include ]], + [[gluBeginCurve(0)]])], + [ax_cv_check_glu_libglu="${ax_try_lib}"; break]) + if test X$ax_compiler_ms = Xyes; then + AC_LANG_POP([C]) + fi + AC_LANG_POP([C++]) + done + LIBS=${ax_save_LIBS} + CPPFLAGS=${ax_save_CPPFLAGS}]) + if test "X${ax_cv_check_glu_libglu}" = "Xno"; then + no_glu="yes" + GLU_CFLAGS="" + GLU_LIBS="" + else + GLU_LIBS="${ax_cv_check_glu_libglu} ${GL_LIBS}" + fi +fi +AC_SUBST([GLU_CFLAGS]) +AC_SUBST([GLU_LIBS]) +]) diff --git a/m4/ax_check_glut.m4 b/m4/ax_check_glut.m4 new file mode 100644 index 0000000000..ed2f8a18fc --- /dev/null +++ b/m4/ax_check_glut.m4 @@ -0,0 +1,65 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_check_glut.html +dnl +AC_DEFUN([AX_CHECK_GLUT], +[AC_REQUIRE([AX_CHECK_GLU])dnl +AC_REQUIRE([AC_PATH_XTRA])dnl + +if test "X$with_apple_opengl_framework" = "Xyes"; then + GLUT_CFLAGS="${GLU_CFLAGS}" + GLUT_LIBS="-framework GLUT -lobjc ${GL_LIBS}" +else + GLUT_CFLAGS=${GLU_CFLAGS} + GLUT_LIBS=${GLU_LIBS} + + # + # If X is present, assume GLUT depends on it. + # + if test "X${no_x}" != "Xyes"; then + GLUT_LIBS="${X_PRE_LIBS} -lXmu -lXi ${X_EXTRA_LIBS} ${GLUT_LIBS}" + fi + + AC_LANG_PUSH(C) + + ax_save_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${GLUT_CFLAGS} ${CPPFLAGS}" + + AC_CACHE_CHECK([for GLUT library], [ax_cv_check_glut_libglut], + [ax_cv_check_glut_libglut="no" + ax_save_LIBS="${LIBS}" + LIBS="" + ax_check_libs="-lglut32 -lglut" + for ax_lib in ${ax_check_libs}; do + if test X$ax_compiler_ms = Xyes; then + ax_try_lib=`echo $ax_lib | sed -e 's/^-l//' -e 's/$/.lib/'` + else + ax_try_lib="${ax_lib}" + fi + LIBS="${ax_try_lib} ${GLUT_LIBS} ${ax_save_LIBS}" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H && defined(_WIN32) +# include +# endif +# include ]], + [[glutMainLoop()]])], + [ax_cv_check_glut_libglut="${ax_try_lib}"; break]) + + done + LIBS=${ax_save_LIBS} + ]) + CPPFLAGS="${ax_save_CPPFLAGS}" + AC_LANG_POP(C) + + if test "X${ax_cv_check_glut_libglut}" = "Xno"; then + no_glut="yes" + GLUT_CFLAGS="" + GLUT_LIBS="" + else + GLUT_LIBS="${ax_cv_check_glut_libglut} ${GLUT_LIBS}" + fi +fi + +AC_SUBST([GLUT_CFLAGS]) +AC_SUBST([GLUT_LIBS]) +])dnl diff --git a/m4/ax_lang_compiler_ms.m4 b/m4/ax_lang_compiler_ms.m4 new file mode 100644 index 0000000000..d0c73dcc59 --- /dev/null +++ b/m4/ax_lang_compiler_ms.m4 @@ -0,0 +1,14 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ax_lang_compiler_ms.html +dnl +AC_DEFUN([AX_LANG_COMPILER_MS], +[AC_CACHE_CHECK([whether we are using the Microsoft _AC_LANG compiler], + [ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms], +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef _MSC_VER + choke me +#endif +]])], + [ax_compiler_ms=yes], + [ax_compiler_ms=no]) +ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms +])]) diff --git a/m4/kc_mysql.m4 b/m4/kc_mysql.m4 index f191f081a9..0f78ef78b3 100644 --- a/m4/kc_mysql.m4 +++ b/m4/kc_mysql.m4 @@ -8,8 +8,10 @@ if test -z "$MYSQL_CONFIG"; then AC_PATH_PROG(MYSQL_CONFIG,mysql_config,,[$PATH:/usr/local/mysql/bin]) fi +# THIS SMALL CHANGE TO THE STANDARD .M4 FILE SIMPLY SETS A VARIABLE IF +# MYSQL IS NOT TEHRE. if test -z "$MYSQL_CONFIG"; then - AC_MSG_ERROR([mysql_config executable not found. To build only the client, specify --disable-server]) + no_mysql=yes else AC_MSG_CHECKING(mysql libraries) MYSQL_LIBS=`${MYSQL_CONFIG} --libs` @@ -17,6 +19,7 @@ else AC_MSG_CHECKING(mysql includes) MYSQL_CFLAGS=`${MYSQL_CONFIG} --cflags` AC_MSG_RESULT($MYSQL_CFLAGS) + no_mysql=no fi AC_SUBST(MYSQL_LIBS) AC_SUBST(MYSQL_CFLAGS) diff --git a/m4/sah_header_stdcxx.m4 b/m4/sah_header_stdcxx.m4 index e1279af223..25cea4d165 100644 --- a/m4/sah_header_stdcxx.m4 +++ b/m4/sah_header_stdcxx.m4 @@ -9,8 +9,9 @@ AC_DEFUN([SAH_HEADER_STDCXX],[ save_inc="$ac_includes_default" ac_includes_default="$ac_includes_default #define CONFIG_TEST -#include \"lib/std_fixes.h\" +#include \"lib/std_fixes.h\" " + sah_stdcxx_headers="algorithm bitset cassert cctype cerrno cfloat climits clocale cmath complex csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime deque fstream functional iomanip ios iosfwd iostream istream iterator limits list locale map memory numeric ostream queue set sstream stack stdexcept streambuf string utility valarray vector" AC_LANG_PUSH(C++) AC_CHECK_HEADERS([$sah_stdcxx_headers]) diff --git a/test/Makefile.am b/test/Makefile.am index d485826dee..7278b7b1e1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -16,11 +16,25 @@ TESTS = test_sanity.py \ # TODO: phase out php stuff -EXTRA_DIST = \ - *.xml *wu *result *output *input \ - test*.py cgiserver.py fake_php.py testproxy \ - db_def_to_php *.php version.inc.in boinc_db.inc \ - test*.inc init.inc boinc_db.inc +EXTRA_DIST = log_flags.xml \ + 1sec_wu concat_wu uc_exit_wu uc_multiple_download_wu uc_sig_wu uc_wu ucs_wu \ + 1sec_result abort_result concat_result uc_multiple_uploads_result uc_result \ + input small_input \ + boinc_path_config.py cgiserver.py fake_php.py test_1sec.py test_abort.py test_backend.py test_concat.py \ + test_exit.py test_masterurl_failure.py test_rsc.py test_sanity.py test_sched_moved.py test_signal.py test_uc.py testbase.py \ + testproxy db_def_to_php db_def_to_py \ + gen_keys.php test_limit.php test_suite.php \ + make_project.php test_loop.php test_time.php \ + make_project_ap.php test_masterurl_failure.php test_uc.php \ + make_project_sah.php test_mdownload_backoff.php test_uc_slow.php \ + test_1sec.php test_pers.php test_uc_win.php \ + test_abort.php test_prefs.php test_upload_backoff.php \ + test_api.php test_rsc.php test_upload_resume.php \ + test_backend.php test_sanity.php test_water.php \ + test_concat.php test_sched_failure.php \ + test_download_backoff.php test_sticky.php \ + boinc_db.inc init.inc test.inc test_uc.inc version.inc + $(TESTS): $(top_srcdir)/py/Boinc/version.py $(top_srcdir)/py/Boinc/boinc_db.py diff --git a/test/boinc_db.inc b/test/boinc_db.inc deleted file mode 100644 index 99270ae974..0000000000 --- a/test/boinc_db.inc +++ /dev/null @@ -1,42 +0,0 @@ - diff --git a/zip/Makefile.am b/zip/Makefile.am index bc630a5b32..2f62508902 100644 --- a/zip/Makefile.am +++ b/zip/Makefile.am @@ -2,11 +2,9 @@ ## note: -D flags taken from a zip config build under Linux -AM_CPPFLAGS = -pthread \ - -I./zip \ - -I./unzip \ - -I../lib \ - -DUNIX +SUBDIRS = zip unzip + +AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/zip -I$(top_srcdir)/zip/zip -I$(top_srcdir)/zip/unzip -DUNIX ##noinst_PROGRAMS = test lib_LIBRARIES = libboinc_zip.a diff --git a/zip/unzip/.cvsignore b/zip/unzip/.cvsignore new file mode 100644 index 0000000000..f5eaa1a859 --- /dev/null +++ b/zip/unzip/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in + diff --git a/zip/unzip/Makefile.am b/zip/unzip/Makefile.am new file mode 100644 index 0000000000..78714b16cd --- /dev/null +++ b/zip/unzip/Makefile.am @@ -0,0 +1,14 @@ +## $Id$ + +EXTRA_DIST = BUGS WHERE envargs.c inflate.c ttyio.h unzvers.h \ +CVS/ api.c explode.c inflate.h unix/ win32/ \ +Contents apihelp.c extract.c list.c unreduce.c zip.h \ +History.550 consts.h file_id.diz macos/ unshrink.c zipgrep.txt \ +INSTALL crc32.c fileio.c match.c unzip.c zipinfo.c \ +LICENSE crc_i386.S funzip.c process.c unzip.h zipinfo.txt \ +Makefile.am crctab.c funzip.txt tables.h unzip.txt \ +crypt.c gbloffs.c timezone.c unzipsfx.txt \ +README crypt.h globals.c timezone.h unzipstb.c \ +ToDo ebcdic.h globals.h ttyio.c unzpriv.h + + diff --git a/zip/zip/.cvsignore b/zip/zip/.cvsignore new file mode 100644 index 0000000000..70845e08eb --- /dev/null +++ b/zip/zip/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/zip/zip/Makefile.am b/zip/zip/Makefile.am new file mode 100644 index 0000000000..9653432adf --- /dev/null +++ b/zip/zip/Makefile.am @@ -0,0 +1,9 @@ +## $Id$ + +EXTRA_DIST = deflate.c tailor.h z_api.h z_crypt.h z_ttyio.h ziperr.h zipup.c \ +ebcdic.h trees.c z_crc32.c z_fileio.c zip.c zipfile.c \ +mktime.c util.c z_crctab.c z_globals.c zip.h zipnote.c \ +revision.h z_api.c z_crypt.c z_ttyio.c zipcloak.c zipsplit.c \ +BUGS CHANGES README macos TODO match.S win32 \ +INSTALL WHATSNEW LICENSE WHERE MANUAL crc_i386.S +