mirror of https://github.com/BOINC/boinc.git
BOINCZIP: Create a separate autoconf/automake setup for libboinczip so that it will build on *nix based systems again.
This commit is contained in:
parent
8df684206b
commit
4d2d0df9e7
|
@ -2,12 +2,12 @@
|
|||
|
||||
## note: -D flags taken from a zip config build under Linux
|
||||
|
||||
include ../Makefile.incl
|
||||
include Makefile.incl
|
||||
|
||||
SUBDIRS = zip unzip
|
||||
SUBDIRS = zip unzip
|
||||
|
||||
AM_CFLAGS += -I$(top_srcdir)/zip -I$(top_srcdir) -I$(top_srcdir)/zip/zip -I$(top_srcdir)/zip/unzip -I$(top_srcdir)/lib -DUNIX -DDLL -DUSE_ZIPMAIN -DNO_OFF_T -DNO_CRYPT -DNO_LCHOWN -DNO_LCHMOD -DIZ_PWLEN=80 -Dinflate=inflate_boinc -Ddeflate=deflate_boinc -Dget_crc_table=get_crc_table_boinc -Dlongest_match=longest_match_boinc -Dinflate_codes=inflate_codes_boinc -Dcrc32=crc32_boinc
|
||||
AM_CXXFLAGS += -I$(top_srcdir)/zip -I$(top_srcdir) -I$(top_srcdir)/zip/zip -I$(top_srcdir)/zip/unzip -I$(top_srcdir)/lib -DUNIX -DDLL -DUSE_ZIPMAIN -DNO_OFF_T -DNO_CRYPT -DNO_LCHOWN -DNO_LCHMOD -DIZ_PWLEN=80 -Dinflate=inflate_boinc -Ddeflate=deflate_boinc -Dget_crc_table=get_crc_table_boinc -Dlongest_match=longest_match_boinc -Dinflate_codes=inflate_codes_boinc -Dcrc32=crc32_boinc
|
||||
AM_CFLAGS += -I$(top_srcdir) -I$(top_srcdir)/zip -I$(top_srcdir)/unzip -I$(top_srcdir)/../lib -DUNIX -DDLL -DUSE_ZIPMAIN -DNO_OFF_T -DNO_CRYPT -DNO_LCHOWN -DNO_LCHMOD -DIZ_PWLEN=80 -Dinflate=inflate_boinc -Ddeflate=deflate_boinc -Dget_crc_table=get_crc_table_boinc -Dlongest_match=longest_match_boinc -Dinflate_codes=inflate_codes_boinc -Dcrc32=crc32_boinc
|
||||
AM_CXXFLAGS += -I$(top_srcdir) -I$(top_srcdir)/zip -I$(top_srcdir)/unzip -I$(top_srcdir)/../lib -DUNIX -DDLL -DUSE_ZIPMAIN -DNO_OFF_T -DNO_CRYPT -DNO_LCHOWN -DNO_LCHMOD -DIZ_PWLEN=80 -Dinflate=inflate_boinc -Ddeflate=deflate_boinc -Dget_crc_table=get_crc_table_boinc -Dlongest_match=longest_match_boinc -Dinflate_codes=inflate_codes_boinc -Dcrc32=crc32_boinc
|
||||
|
||||
if INSTALL_HEADERS
|
||||
pkginclude_HEADERS = boinc_zip.h
|
||||
|
@ -42,8 +42,6 @@ boinc_zip.cpp \
|
|||
./zip/zipup.c \
|
||||
./zip/unix/z_unix.c
|
||||
|
||||
if ENABLE_LIBRARIES
|
||||
|
||||
lib_LTLIBRARIES = libboinc_zip.la
|
||||
libboinc_zip_la_SOURCES = $(libboinc_zip_sources)
|
||||
libboinc_zip_la_LDFLAGS = -L$(libdir) -rpath $(libdir) -version-number $(LIBBOINC_VERSION)
|
||||
|
@ -58,15 +56,11 @@ LIBBOINC_ZIP_STATIC=libboinc_zip.${LIBEXT}
|
|||
endif
|
||||
|
||||
|
||||
if BUILD_STATIC_LIBS
|
||||
all_local = $(LIBBOINC_ZIP_STATIC)
|
||||
|
||||
endif
|
||||
|
||||
all-local: $(all_local)
|
||||
|
||||
$(LIBBOINC_ZIP_STATIC): libboinc_zip.la
|
||||
rm -f $(LIBBOINC_ZIP_STATIC)
|
||||
$(LN) .libs/$(LIBBOINC_ZIP_STATIC) .
|
||||
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
## -*-Makefile -*-
|
||||
## $Id$
|
||||
|
||||
AM_CFLAGS = -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -Wcast-align
|
||||
AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
AM_LDFLAGS =
|
||||
|
||||
# dependencies to make sure libs gets compiled before
|
||||
# programs linking to them:
|
||||
|
||||
LIBBOINC = $(top_builddir)/../lib/libboinc.la
|
||||
$(LIBBOINC):
|
||||
cd $(top_builddir)/../lib; ${MAKE} libboinc.la
|
||||
LIBAPI = $(top_builddir)/../api/libboinc_api.la
|
||||
$(LIBAPI):
|
||||
cd $(top_builddir)/../api; ${MAKE} libboinc_api.la
|
||||
|
||||
APPLIBS = $(LIBAPI) $(LIBBOINC)
|
|
@ -0,0 +1,146 @@
|
|||
#!/bin/sh
|
||||
|
||||
## $Id$
|
||||
|
||||
## ---------- some portability checks/adjustments [stolen from configure] ----------
|
||||
## 'echo -n' is not portable..
|
||||
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
|
||||
*c*,-n*) ECHO_N= ECHO_C='
|
||||
' ECHO_T=' ' ;;
|
||||
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
|
||||
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
|
||||
esac
|
||||
##----------
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Check that given command $1 has version >= $2.$3
|
||||
## return 0 if ok, 1 too old or not found (-> shell conventions).
|
||||
## ----------------------------------------------------------------------
|
||||
check_version()
|
||||
{
|
||||
dir=`pwd`
|
||||
cd /tmp
|
||||
foundit=
|
||||
## get current version of $1
|
||||
desired=`echo $2 | awk -F. '{print $1*100+$2}'`
|
||||
echo $ECHO_N "Checking version of '$1' >= $desired... $ECHO_C"
|
||||
name=$1
|
||||
fullpath=`type $name | awk '{ print $(NF) }'`;
|
||||
if [ -x "$fullpath" ]; then
|
||||
foundit=yes;
|
||||
fi
|
||||
|
||||
if [ "$foundit" != yes ]; then
|
||||
echo "Didn't find application";
|
||||
version=0
|
||||
success=no
|
||||
else
|
||||
cmdline="$fullpath --version";
|
||||
if version=`($cmdline 2>/dev/null)` 2>/dev/null; then
|
||||
echo >/dev/null
|
||||
else
|
||||
version="0";
|
||||
fi
|
||||
if [ -n "${version}" ]; then
|
||||
version=`echo $version | awk '{ for (i=1;i<=NF;i++) { split($i,j,"."); m=j[1]*100+j[2] ; if ((m*1)>0) { print m ; break; } } }'`
|
||||
if [ -z "$version" ]; then version=0; fi
|
||||
success=`echo "$version" "$desired" | awk '{ if ($1 >= $2) { print "yes";} else {print "no";}} '`
|
||||
else
|
||||
version=0
|
||||
success=no
|
||||
fi
|
||||
fi
|
||||
cd $dir
|
||||
|
||||
if [ $success = "yes" ] ; then
|
||||
echo "succeeded. ($version)"
|
||||
return 0;
|
||||
else
|
||||
echo "failed. ($version)"
|
||||
return 1;
|
||||
fi
|
||||
} ## check_version()
|
||||
|
||||
|
||||
## --------------------------------------------------------------------------------
|
||||
## 'MAIN' starts here
|
||||
## --------------------------------------------------------------------------------
|
||||
echo "Bootstrapping configure script and makefiles:"
|
||||
|
||||
## ---------- first check santity of the installed versions of the build-system
|
||||
## in case there's GNU drop-in tools available, set these
|
||||
|
||||
## some sorry systems don't have proper GNU-make...
|
||||
if check_version make 3.79; then
|
||||
echo >/dev/null
|
||||
else
|
||||
if check_version gmake 3.79; then
|
||||
have_gmake=yes;
|
||||
else
|
||||
echo "Couldn't find a new-enough version of GNU 'make', please install one!";
|
||||
echo "If you have a newer version, set the environment variable 'MAKE' to its path";
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
## FreeBSD's m4 seems to be broken? Download a fresh one
|
||||
if check_version m4 1.4; then
|
||||
echo >/dev/null
|
||||
else
|
||||
## solaris m4 works fine
|
||||
if test -f /usr/ccs/bin/m4
|
||||
then
|
||||
echo >/dev/null
|
||||
elif check_version gm4 1.4; then
|
||||
have_gm4=yes;
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'm4', please install one!";
|
||||
echo "If you have a newer version, set the environment variable 'M4' to its path";
|
||||
exit 1;
|
||||
fi
|
||||
# build_lsc_aux "m4-1.4.1"
|
||||
fi
|
||||
|
||||
if check_version pkg-config 0.15; then
|
||||
echo >/dev/null
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'pkg-config', please install one!";
|
||||
exit 1;
|
||||
# build_lsc_aux "pkgconfig-0.15.0"
|
||||
fi
|
||||
|
||||
if check_version autoreconf 2.58; then
|
||||
echo >/dev/null
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'autoreconf', please install one!";
|
||||
exit 1;
|
||||
# build_lsc_aux "autoconf-2.59"
|
||||
fi
|
||||
if check_version automake 1.8; then
|
||||
echo >/dev/null
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'automake', please install one!";
|
||||
echo "If you have a newer version, set the environment variable 'AUTOMAKE' and 'ACLOCAL' to its path";
|
||||
exit 1;
|
||||
# build_lsc_aux "automake-1.8.5"
|
||||
fi
|
||||
if check_version libtoolize 1.5; then
|
||||
echo >/dev/null
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'libtoolize', please install one!";
|
||||
echo "If you have a newer version, set the environment variable 'LIBTOOLIZE' to its path";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
## ---------- now run autoreconf
|
||||
cmdline="autoreconf -i";
|
||||
echo "$cmdline"
|
||||
if eval $cmdline; then
|
||||
echo "Done, now run ./configure"
|
||||
echo " ./configure -C to enable caching"
|
||||
exit 0
|
||||
else
|
||||
echo "Something failed .... please check error-message and re-run when fixed."
|
||||
echo "exiting..."
|
||||
exit 1
|
||||
fi
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,43 @@
|
|||
dnl -*- autoconf -*-
|
||||
|
||||
dnl $Id$
|
||||
|
||||
dnl not sure exactly what the minimum version is (but 2.13 wont work)
|
||||
AC_PREREQ(2.58)
|
||||
AC_INIT(BOINCZIP, 1.0.0)
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
dnl generate .tar.gz, .tar.bz2, .zip
|
||||
dnl AM_INIT_AUTOMAKE(dist-bzip2 dist-zip)
|
||||
AM_INIT_AUTOMAKE(dist-zip)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
AC_CONFIG_SRCDIR(boinc_zip.cpp)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CPP
|
||||
AC_PROG_MAKE_SET
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
dnl Heres another way to set up host-specific stuff
|
||||
AM_CONDITIONAL(OS_DARWIN, [echo $host_os | grep '^darwin' > /dev/null])
|
||||
if echo $host_os | grep '^darwin' >/dev/null ; then
|
||||
if test `uname -r | sed 's/\.//g'` -lt 800 ; then
|
||||
AC_DEFINE_UNQUOTED(DARWIN_10_3, [1],[Define to 1 if compiling under OS X 10.3 or earlier])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(OS_LINUX, [echo $host_os | grep '^linux' > /dev/null])
|
||||
AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null])
|
||||
AM_CONDITIONAL(OS_OS2, [echo $host_os | grep '^os2' > /dev/null])
|
||||
AM_CONDITIONAL(OS_ARM_LINUX, [echo $host_alias | grep '^arm-linux' > /dev/null])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_OUTPUT
|
Loading…
Reference in New Issue