mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
remove autoconf scripts, update build docs
This commit is contained in:
parent
852887d38d
commit
44aef545ab
@ -6,11 +6,11 @@ compiler:
|
||||
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq autopoint libfuse-dev libboost-serialization-dev
|
||||
- sudo apt-get install -qq cmake libfuse-dev libboost-serialization-dev
|
||||
librlog-dev
|
||||
|
||||
script:
|
||||
- autoreconf -if
|
||||
- ./configure
|
||||
- sh devmode
|
||||
- cd build
|
||||
- make
|
||||
- ./encfs/test
|
||||
- ./checkops
|
||||
|
12
INSTALL.md
12
INSTALL.md
@ -8,13 +8,13 @@ in the wiki.
|
||||
Compiling EncFS
|
||||
===============
|
||||
|
||||
EncFS uses the GNU autoconf / automake toolchain to create makefiles.
|
||||
Also, the configure script is automatically generated using autoreconf.
|
||||
EncFS uses the CMake toolchain to create makefiles.
|
||||
|
||||
Compiling EncFS is a three-step process:
|
||||
Steps to build EncFS:
|
||||
|
||||
autoreconf -if
|
||||
./configure
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
Optional, but strongly recommended, is running the test suite
|
||||
@ -40,7 +40,7 @@ Dependencies
|
||||
|
||||
EncFS depends on a number of libraries:
|
||||
|
||||
openssl fuse boost-serialization gettext libtool libintl
|
||||
openssl fuse boost-serialization gettext libintl librlog
|
||||
|
||||
Compiling on Debian and Ubuntu
|
||||
==============================
|
||||
|
@ -1,2 +0,0 @@
|
||||
KDE_OPTIONS = qtonly
|
||||
|
@ -1,5 +0,0 @@
|
||||
default: all
|
||||
|
||||
all:
|
||||
autoreconf -if
|
||||
|
224
configure.ac
224
configure.ac
@ -1,224 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([encfs], [1.8.2])
|
||||
AC_CONFIG_SRCDIR([encfs/encfs.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AM_CONDITIONAL([DARWIN],
|
||||
[case $host_os in darwin*) true;; *) false;; esac])
|
||||
|
||||
dnl without this order in this file, automake will be confused!
|
||||
dnl
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl If the string "PKG_CHECK_MODULES" appears in the output,
|
||||
dnl the macro was not substituted, probably because pkg-config is
|
||||
dnl not installed. Catch that right here instead of creating a
|
||||
dnl broken configure script.
|
||||
m4_pattern_forbid([PKG_CHECK_MODULES])
|
||||
|
||||
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||||
unset CDPATH
|
||||
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_PROG_CXX
|
||||
|
||||
dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
|
||||
dnl
|
||||
unset CDPATH
|
||||
dnl make /usr/local the default for the installation
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION([0.18])
|
||||
|
||||
dnl create only shared libtool-libraries
|
||||
dnl These can be overridden by command line arguments
|
||||
AC_ENABLE_SHARED(yes)
|
||||
AC_ENABLE_STATIC(no)
|
||||
|
||||
AM_CONDITIONAL( BUILD_STATIC, test "x$enable_static" = "xyes" )
|
||||
dnl only build either static or shared, not both..
|
||||
if test "x$enable_static" = "xyes"; then
|
||||
enable_shared=no
|
||||
AC_DEFINE(BUILD_STATIC, [1], [Building static library])
|
||||
fi
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AX_PTHREAD
|
||||
|
||||
AX_BOOST_BASE([1.34])
|
||||
AX_BOOST_SERIALIZATION
|
||||
|
||||
dnl Need to include any user specified flags in the tests below, as they might
|
||||
dnl specify required include directories..
|
||||
FUSE_FLAGS="-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26"
|
||||
CPPFLAGS="$CPPFLAGS $USER_INCLUDES $FUSE_FLAGS -D__STDC_FORMAT_MACROS"
|
||||
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $USER_INCLUDES"
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS $USER_LDFLAGS $FUSE_LIBS"
|
||||
|
||||
AX_CXX_COMPILE_STDCXX_11
|
||||
|
||||
dnl Look for fuse headers.
|
||||
AX_EXT_HAVE_HEADER(fuse.h, /usr/include/fuse /usr/local/include/fuse \
|
||||
/opt/include/fuse /opt/local/include/fuse \
|
||||
/usr/include/osxfuse /usr/local/include/osxfuse \
|
||||
/opt/local/include/osxfuse)
|
||||
|
||||
dnl Ensure the necessary paths are added to LDPATH
|
||||
AX_EXT_HAVE_LIB(/usr/lib /usr/local/lib /opt/lib /opt/local/lib, fuse,
|
||||
fuse_mount, [])
|
||||
AX_EXT_HAVE_LIB(/usr/lib /usr/local/lib /opt/lib /opt/local/lib, osxfuse,
|
||||
fuse_mount, [])
|
||||
|
||||
if test "$GXX" = "yes"; then
|
||||
CXXFLAGS="-W -Wall -Wpointer-arith -Wwrite-strings $CXXFLAGS"
|
||||
dnl CXXFLAGS="$CXXFLAGS -Wformat=2 -Wconversion"
|
||||
fi
|
||||
|
||||
if test -z "${DARWIN_TRUE}"; then
|
||||
dnl Prefer OSXFuse, but fall back to libfuse.
|
||||
AC_CHECK_LIB(osxfuse, fuse_new, [FUSE_LIBS="$FUSE_LIBS -losxfuse"],
|
||||
AC_CHECK_LIB(fuse, fuse_new, [FUSE_LIBS="$FUSE_LIBS -lfuse"],
|
||||
AC_MSG_ERROR([Unable to find libfuse or libosxfuse.])))
|
||||
else
|
||||
AC_CHECK_LIB(fuse, fuse_new, [FUSE_LIBS="$FUSE_LIBS -lfuse"],
|
||||
AC_MSG_ERROR([Unable to find libfuse.]))
|
||||
fi
|
||||
|
||||
# check for a supported FUSE_MAJOR_VERSION.
|
||||
AC_MSG_CHECKING([For supported FUSE API version])
|
||||
AC_RUN_IFELSE([
|
||||
AC_LANG_PROGRAM([[#include "fuse.h"]],
|
||||
[[
|
||||
if (FUSE_MAJOR_VERSION < 2) return -1;
|
||||
if (FUSE_MAJOR_VERSION > 2) return 0;
|
||||
return FUSE_MINOR_VERSION >= 5 ? 0 : -1;
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([Encfs 1.3 requires FUSE 2.5 or newer.])
|
||||
]
|
||||
)
|
||||
|
||||
dnl fuse_operations.setxattr was added 2004-03-31
|
||||
dnl only enable it if setxattr function is found..
|
||||
AC_CHECK_HEADERS([attr/xattr.h sys/xattr.h])
|
||||
|
||||
dnl xattr functions take additional arguments on some systems (eg Darwin).
|
||||
AC_CACHE_CHECK([whether xattr interface takes additional options],
|
||||
smb_attr_cv_xattr_add_opt, [
|
||||
old_LIBS=$LIBS
|
||||
LIBS="$LIBS $ACL_LIBS"
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#if HAVE_SYS_XATTR_H
|
||||
#include <sys/xattr.h>
|
||||
#elif HAVE_ATTR_XATTR_H
|
||||
#include <attr/xattr.h>
|
||||
#endif
|
||||
],[
|
||||
getxattr(0, 0, 0, 0, 0, 0);
|
||||
],
|
||||
[smb_attr_cv_xattr_add_opt=yes],
|
||||
[smb_attr_cv_xattr_add_opt=no;LIBS=$old_LIBS])
|
||||
])
|
||||
if test x"$smb_attr_cv_xattr_add_opt" = x"yes"; then
|
||||
AC_DEFINE(XATTR_ADD_OPT, 1, [xattr functions have additional options])
|
||||
fi
|
||||
|
||||
dnl Check for valgrind headers..
|
||||
AC_ARG_ENABLE(valgrind,
|
||||
AC_HELP_STRING([--enable-valgrind],
|
||||
[build with valgrind support.]),
|
||||
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h])
|
||||
)
|
||||
|
||||
# allow user option of not using ssl..
|
||||
AC_ARG_ENABLE(openssl,
|
||||
AC_HELP_STRING([--disable-openssl],
|
||||
[disables openssl library usage.]),
|
||||
with_openssl=$enableval, with_openssl="yes" )
|
||||
|
||||
# try checking for openssl using
|
||||
if test "x$with_openssl" = "xyes"; then
|
||||
# look for openssl using pkg-config first..
|
||||
PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7,
|
||||
with_openssl="yes", with_openssl="old-test")
|
||||
|
||||
# If that fails, try checking via old methods - which isn't as robust when
|
||||
# it comes to extra include paths, etc..
|
||||
if test "x$with_openssl" = "xold-test"; then
|
||||
AC_CHECK_HEADER(openssl/ssl.h,
|
||||
AC_CHECK_LIB(ssl,SSL_new,
|
||||
[with_openssl="yes"]))
|
||||
OPENSSL_LIBS="-lssl"
|
||||
fi
|
||||
|
||||
# if we have openssl, then examine available interfaces.
|
||||
if test "x$with_openssl" = "xyes"; then
|
||||
AC_DEFINE(HAVE_SSL, [1], [Linking with OpenSSL])
|
||||
|
||||
# add in the libs just for the test..
|
||||
oldflags=$CXXFLAGS
|
||||
oldlibs=$LIBS
|
||||
CXXFLAGS="$CXXFLAGS $OPENSSL_CFLAGS"
|
||||
LIBS="$LIBS $OPENSSL_LIBS"
|
||||
AC_CHECK_FUNCS(EVP_aes_128_cbc EVP_aes_192_cbc EVP_aes_256_cbc,
|
||||
AC_DEFINE(HAVE_EVP_AES, [1], [Have EVP AES interfaces]))
|
||||
AC_CHECK_FUNCS(EVP_bf_cbc,
|
||||
AC_DEFINE(HAVE_EVP_BF, [1], [Have EVP Blowfish interfaces]))
|
||||
AC_CHECK_FUNCS(EVP_CIPHER_CTX_set_padding,
|
||||
with_opensslevp=yes,
|
||||
AC_MSG_WARN([New SSL cipher code only enabled for OpenSSL 0.9.7 or later]))
|
||||
AC_CHECK_FUNCS(HMAC_Init_ex,
|
||||
AC_DEFINE(HAVE_HMAC_INIT_EX, [1], [Have HMAC_Init_ex function]))
|
||||
|
||||
CXXFLAGS="$oldflags"
|
||||
LIBS="$oldlibs"
|
||||
|
||||
AC_SUBST(HAVE_EVP_AES)
|
||||
AC_SUBST(HAVE_EVP_BF)
|
||||
AC_SUBST(HAVE_HMAC_INIT_EX)
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL( BUILD_OPENSSL, test "x$with_openssl" = "xyes" )
|
||||
AM_CONDITIONAL( BUILD_SSLCIPHER, test "x$with_opensslevp" = "xyes" )
|
||||
AC_SUBST(HAVE_SSL)
|
||||
|
||||
if test "x$with_openssl" != "xyes"; then
|
||||
AC_MSG_ERROR( [Encfs requires OpenSSL])
|
||||
fi
|
||||
|
||||
# check for RLOG
|
||||
PKG_CHECK_MODULES(RLOG, librlog >= 1.3, with_rlog="yes", with_rlog="test")
|
||||
|
||||
# manual check for rlog, unless environment variable already set
|
||||
if test "$with_rlog" = "test" && test "x$RLOG_LIBS" = "x"; then
|
||||
AC_MSG_WARN([Checking for librlog the hard way])
|
||||
AC_CHECK_LIB(rlog, RLogVersion, [RLOG_LIBS="-lrlog"],
|
||||
[AC_MSG_ERROR([EncFS depends on librlog])])
|
||||
fi
|
||||
|
||||
# look for pod2man program for building man pages
|
||||
AC_PATH_PROG(POD2MAN, pod2man, [no])
|
||||
AC_PATH_PROG(POD2HTML, pod2html, [no])
|
||||
AM_CONDITIONAL( BUILD_MAN, test "x$POD2MAN" != "xno" )
|
||||
AM_CONDITIONAL( BUILD_MANHTML, test "x$POD2HTML" != "xno" )
|
||||
AM_CONDITIONAL( BUILD_NLS, test "x$USE_NLS" != "xno" )
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile] \
|
||||
[encfs/Makefile] \
|
||||
[encfs.spec] \
|
||||
[makedist2.sh] \
|
||||
[m4/Makefile] \
|
||||
[po/Makefile.in] \
|
||||
[po/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
207
encfs.spec.in
207
encfs.spec.in
@ -1,207 +0,0 @@
|
||||
Name: encfs
|
||||
Summary: Encrypted pass-thru filesystem for Linux
|
||||
Version: @VERSION@
|
||||
Release: @RELEASE@
|
||||
License: GPL
|
||||
Group: System/Filesystems
|
||||
Source: %{name}-%{version}-%{release}.tgz
|
||||
BuildRoot: %{_tmppath}/build-root-%{name}
|
||||
Packager: Valient Gough <vgough at pobox dot com>
|
||||
#Distribution: Suse 9.1
|
||||
Prefix: /usr
|
||||
Url: http://pobox.com/~vgough/encfs
|
||||
Provides: encfs
|
||||
Provides: encfsctl
|
||||
Provides: libencfs.1
|
||||
|
||||
Requires: rlog >= 1.3
|
||||
Requires: openssl
|
||||
Requires: fuse >= 2.2
|
||||
|
||||
%description
|
||||
EncFS implements an encrypted filesystem in userspace using FUSE. FUSE
|
||||
provides a Linux kernel module which allows virtual filesystems to be written
|
||||
in userspace. EncFS encrypts all data and filenames in the filesystem and
|
||||
passes access through to the underlying filesystem. Similar to CFS except that
|
||||
it does not use NFS.
|
||||
|
||||
%changelog
|
||||
* Fri Nov 11 2005 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.2.5
|
||||
- Fix race condition when using newer versions of GCC. Fixes problem reported
|
||||
by Chris at x.nu.
|
||||
- add encfssh script, thanks to David Rosenstrauch
|
||||
* Fri Aug 26 2005 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.2.4
|
||||
- fix segfault if small invalid filenames were encountered in the encrypted
|
||||
directory, reported by paulgfx.
|
||||
- try and detect if user tries to mount the filesystem over the top of the
|
||||
encrypted directory, problem reported by paulgfx.
|
||||
- environment variable ENCFS5_CONFIG can be used to override the location of
|
||||
the .encfs5 configuration file.
|
||||
- add encfsctl 'export' command, patch from Janne Hellsten
|
||||
|
||||
* Tue Apr 19 2005 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.2.1
|
||||
- add --public mount option
|
||||
- add --stdinpass option to read password from stdin for scripting
|
||||
- import latest rosetta translation updates
|
||||
|
||||
* Thu Feb 10 2005 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.2.0
|
||||
- Fix bug with MAC headers and files > 2GB, reported by Damian Frank
|
||||
- Fix bug with external password interface which could result in problems
|
||||
communicating with external password program. Found by Olivier Dournaux.
|
||||
- Switch to FUSE 2.2 API -- support for FUSE 1.x has been dropped.
|
||||
- Add support for inode numbering pass-thru (when used 'use_ino' option to
|
||||
fuse). This allows encoded filesystem to use the same inode numbers as the
|
||||
underlying filesystem.
|
||||
|
||||
* Wed Jan 12 2005 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.11
|
||||
- add internationalization support. Thanks to lots of contributors, there are
|
||||
translations for serveral languages.
|
||||
- added workaround for libfuse mount failure with FUSE 1.4
|
||||
- fix compile failure with FUSE 1.4
|
||||
|
||||
* Mon Nov 8 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.10
|
||||
- fix problems with recursive rename
|
||||
- fix incorrect error codes from xattr functions
|
||||
|
||||
* Tue Aug 15 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.9
|
||||
- fix another rename bug (affected filesystems with 'paranoia' configuration)
|
||||
|
||||
* Mon Aug 14 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.8
|
||||
- Improve MAC block header processing.
|
||||
|
||||
* Sat Aug 12 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.7
|
||||
- fix bug in truncate() for unopened files.
|
||||
|
||||
* Mon Aug 9 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.6
|
||||
- fix header IV creation when truncate() used to create files.
|
||||
- add support for IV chaining to old 0.x filesystem support code (useful for
|
||||
systems with old OpenSSL, like RedHat 7.x).
|
||||
|
||||
* Tue Jul 22 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.5
|
||||
|
||||
* Sat Jul 10 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.4
|
||||
- add external password prompt support.
|
||||
|
||||
* Thu Jun 24 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.3
|
||||
|
||||
* Fri May 28 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.2
|
||||
- Fix bug affecting filesystems with small empty directories (like XFS)
|
||||
- Updates to recursive rename code to undo all changes on failure.
|
||||
- Fix OpenSSL dependency path inclusion in build.
|
||||
|
||||
* Wed May 19 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.1.1
|
||||
- Fix MAC header memory size allocation error.
|
||||
- Add file rename-while-open support needed for Evolution.
|
||||
|
||||
* Thu May 13 2004 Valient Gough <vgough@pobox.com>
|
||||
- Second release candidate for version 1.1
|
||||
- Add support for block mode filename encryption.
|
||||
- Add support for per-file initialization vectors.
|
||||
- Add support for directory IV chaining for per-directory initialization
|
||||
vectors.
|
||||
- Add support for per-block MAC headers for file contents.
|
||||
- Backward compatibility support dropped for filesystems created by version
|
||||
0.x. Maintains backward compatible support for versions 1.0.x.
|
||||
|
||||
* Sun Apr 4 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0.5
|
||||
- Allow truncate call to extend file (only shrinking was supported)
|
||||
|
||||
* Fri Mar 26 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0.4
|
||||
- Large speed improvement.
|
||||
- Add support for FUSE major version 2 API.
|
||||
|
||||
* Thu Mar 18 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0.3
|
||||
- Fix bugs in truncation and padding code.
|
||||
|
||||
* Sat Mar 13 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0.2
|
||||
- Use pkg-config to check for OpenSSL and RLog build settings
|
||||
- Add support for '--' argument to encfs to pass arbitrary options to FUSE /
|
||||
fusermount.
|
||||
- Add man pages.
|
||||
|
||||
* Tue Mar 2 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0.1
|
||||
- Fix problem with using OpenSSL's EVP_BytesToKey function with variable
|
||||
key length ciphers like Blowfish, as it would only generate 128 bit keys.
|
||||
- Some configure script changes to make it possible to use --with-extra-include
|
||||
configure option to pick up any necessary directories for OpenSSL.
|
||||
|
||||
* Fri Feb 27 2004 Valient Gough <vgough@pobox.com>
|
||||
- Release 1.0
|
||||
- Added some pre-defined configuration options at startup to make filesystem
|
||||
creation a bit more user friendly.
|
||||
|
||||
* Mon Feb 23 2004 Valient Gough <vgough@pobox.com>
|
||||
- Merge development branch to mainline. Source modularized to make it easier
|
||||
to support different algorithms.
|
||||
- Added encfsctl program which can show information about an encrypted
|
||||
directory and can change the user password used to store the volume key.
|
||||
- Added support for AES and BlowFish with user specified keys and block sizes
|
||||
(when building with OpenSSL >= 0.9.7).
|
||||
- Backward compatible with old format, but new filesystems store configuration
|
||||
information in a new format which is not readable by old encfs versions.
|
||||
|
||||
* Sat Feb 7 2004 Valient Gough <vgough@pobox.com>
|
||||
- Improved performance by fixing cache bug which caused cached data to not be
|
||||
used as often as it could have been. Random seek performance improved by
|
||||
600% according to Bonnie++ benchmark.
|
||||
- Fixed bugs preventing files larger then 2GB. Limit should now be around
|
||||
128GB (untested - I don't have that much drive space). > 2GB also requires
|
||||
recent version of FUSE module (from Feb 6 or later) and an underlying
|
||||
filesystem which supports large files.
|
||||
- Release 0.6
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir $RPM_BUILD_ROOT
|
||||
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
|
||||
./configure --enable-debug=no --prefix=%{prefix} --mandir=%{_mandir}
|
||||
make SED=/usr/bin/sed -j 2
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install-strip
|
||||
|
||||
cd $RPM_BUILD_ROOT
|
||||
|
||||
find . -type d -fprint $RPM_BUILD_DIR/file.list.%{name}.dirs
|
||||
find . -type f -fprint $RPM_BUILD_DIR/file.list.%{name}.files.tmp
|
||||
sed '/\/man\//s/$/.gz/g' $RPM_BUILD_DIR/file.list.%{name}.files.tmp > $RPM_BUILD_DIR/file.list.%{name}.files
|
||||
find . -type l -fprint $RPM_BUILD_DIR/file.list.%{name}.libs
|
||||
sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' $RPM_BUILD_DIR/file.list.%{name}.dirs > $RPM_BUILD_DIR/file.list.%{name}
|
||||
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.files >> $RPM_BUILD_DIR/file.list.%{name}
|
||||
sed 's,^\.,\%attr(-\,root\,root) ,' $RPM_BUILD_DIR/file.list.%{name}.libs >> $RPM_BUILD_DIR/file.list.%{name}
|
||||
|
||||
%clean
|
||||
case "$RPM_BUILD_ROOT" in build-root-*) rm -rf $RPM_BUILD_ROOT ;; esac
|
||||
rm -f $RPM_BUILD_DIR/file.list.%{name}
|
||||
rm -f $RPM_BUILD_DIR/file.list.%{name}.libs
|
||||
rm -f $RPM_BUILD_DIR/file.list.%{name}.files
|
||||
rm -f $RPM_BUILD_DIR/file.list.%{name}.files.tmp
|
||||
rm -f $RPM_BUILD_DIR/file.list.%{name}.dirs
|
||||
|
||||
%files -f ../file.list.%{name}
|
||||
|
||||
%defattr(-,root,root,0755)
|
@ -1,149 +0,0 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.common
|
||||
|
||||
ALL_INCLUDES = @RLOG_CFLAGS@ @OPENSSL_CFLAGS@ @BOOST_CPPFLAGS@
|
||||
ALL_LDFLAGS = @RLOG_LIBS@ @OPENSSL_LIBS@ @BOOST_LDFLAGS@
|
||||
ALL_LDFLAGS += @BOOST_SERIALIZATION_LIB@
|
||||
|
||||
AM_CXXFLAGS = -DRLOG_COMPONENT="encfs" $(ALL_INCLUDES) -I$(top_srcdir)
|
||||
|
||||
if BUILD_NLS
|
||||
# define a C macro LOCALEDIR indicating where catalogs will be installed
|
||||
#localedir = $(datadir)/locale
|
||||
|
||||
AM_CXXFLAGS += -DLOCALEDIR=\"$(localedir)\"
|
||||
ALL_LDFLAGS += @LIBINTL@
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libencfs.la
|
||||
bin_PROGRAMS = encfs encfsctl
|
||||
dist_bin_SCRIPTS = encfssh
|
||||
noinst_PROGRAMS = test makeKey
|
||||
|
||||
if BUILD_MANHTML
|
||||
all-local: encfs-man.html
|
||||
else
|
||||
all-local:
|
||||
endif
|
||||
|
||||
encfs_LDADD = libencfs.la $(ALL_LDFLAGS)
|
||||
encfsctl_LDADD = libencfs.la $(ALL_LDFLAGS)
|
||||
test_LDADD = libencfs.la $(ALL_LDFLAGS)
|
||||
makeKey_LDADD = libencfs.la $(ALL_LDFLAGS)
|
||||
|
||||
if BUILD_STATIC
|
||||
encfs_LDFLAGS = -all-static
|
||||
encfsctl_LDFLAGS = -all-static
|
||||
test_LDFLAGS = -all-static
|
||||
makeKey_LDFLAGS = -all-static
|
||||
endif
|
||||
|
||||
# CURRENT : REVISION : AGE
|
||||
# +1 : 0 : +1 => new interface that does not break old one
|
||||
# +1 : 0 : 0 => new interface that breaks old one
|
||||
# : : 0 => no new interfaces, but breaks old apps
|
||||
# : +1 : => internal changes, nothing breaks
|
||||
#
|
||||
libencfs_la_LDFLAGS = -version-info 6:2:0
|
||||
libencfs_la_LIBADD = @RLOG_LIBS@ \
|
||||
@OPENSSL_LIBS@ \
|
||||
@BOOST_SERIALIZATION_LIB@
|
||||
|
||||
EXTRASRC =
|
||||
if BUILD_OPENSSL
|
||||
if BUILD_SSLCIPHER
|
||||
EXTRASRC += SSL_Cipher.cpp
|
||||
endif
|
||||
endif
|
||||
|
||||
libencfs_la_SOURCES = \
|
||||
autosprintf.cpp \
|
||||
readpassphrase.cpp \
|
||||
base64.cpp \
|
||||
ConfigReader.cpp \
|
||||
ConfigVar.cpp \
|
||||
Context.cpp \
|
||||
Cipher.cpp \
|
||||
CipherKey.cpp \
|
||||
FileIO.cpp \
|
||||
RawFileIO.cpp \
|
||||
BlockFileIO.cpp \
|
||||
CipherFileIO.cpp \
|
||||
MACFileIO.cpp \
|
||||
NameIO.cpp \
|
||||
StreamNameIO.cpp \
|
||||
BlockNameIO.cpp \
|
||||
NullNameIO.cpp \
|
||||
Interface.cpp \
|
||||
MemoryPool.cpp \
|
||||
NullCipher.cpp \
|
||||
DirNode.cpp \
|
||||
FileNode.cpp \
|
||||
FileUtils.cpp \
|
||||
openssl.cpp \
|
||||
${EXTRASRC}
|
||||
|
||||
|
||||
encfs_SOURCES = \
|
||||
encfs.cpp \
|
||||
main.cpp
|
||||
|
||||
test_SOURCES = \
|
||||
test.cpp
|
||||
|
||||
makeKey_SOURCES = \
|
||||
makeKey.cpp
|
||||
|
||||
encfsctl_SOURCES = \
|
||||
encfsctl.cpp
|
||||
|
||||
noinst_HEADERS = \
|
||||
base64.h \
|
||||
boost-versioning.h \
|
||||
BlockFileIO.h \
|
||||
BlockNameIO.h \
|
||||
CipherFileIO.h \
|
||||
Cipher.h \
|
||||
CipherKey.h \
|
||||
ConfigReader.h \
|
||||
ConfigVar.h \
|
||||
Context.h \
|
||||
DirNode.h \
|
||||
encfs.h \
|
||||
FileIO.h \
|
||||
FileNode.h \
|
||||
FileUtils.h \
|
||||
FSConfig.h \
|
||||
Interface.h \
|
||||
i18n.h \
|
||||
MACFileIO.h \
|
||||
MemoryPool.h \
|
||||
Mutex.h \
|
||||
NameIO.h \
|
||||
NullCipher.h \
|
||||
NullNameIO.h \
|
||||
openssl.h \
|
||||
Range.h \
|
||||
RawFileIO.h \
|
||||
readpassphrase.h \
|
||||
shared_ptr.h \
|
||||
SSL_Cipher.h \
|
||||
StreamNameIO.h
|
||||
|
||||
man_MANS=encfs.1 encfsctl.1
|
||||
EXTRA_DIST = encfs.pod encfsctl.pod encfs.1 encfsctl.1 encfs-man.html
|
||||
|
||||
if BUILD_MAN
|
||||
SUFFIXES = .1 .pod
|
||||
# since we have POD2MAN, we can specify how to rebuild encfs.1 if necessary
|
||||
.pod.1:
|
||||
@POD2MAN@ --section=1 --release=@VERSION@ --center="Encrypted Filesystem" $< $@
|
||||
|
||||
CLEANFILES = encfs.1 encfsctl.1
|
||||
endif
|
||||
|
||||
if BUILD_MANHTML
|
||||
encfs-man.html: encfs.pod
|
||||
@POD2HTML@ encfs.pod > $@
|
||||
endif
|
||||
|
@ -1,4 +0,0 @@
|
||||
####### kdevelop will overwrite this part!!! (begin)##########
|
||||
|
||||
|
||||
####### kdevelop will overwrite this part!!! (end)############
|
@ -1,4 +0,0 @@
|
||||
####### kdevelop will overwrite this part!!! (begin)##########
|
||||
|
||||
|
||||
####### kdevelop will overwrite this part!!! (end)############
|
@ -1,10 +0,0 @@
|
||||
EXTRA_DIST = $(top_srcdir)/*.m4
|
||||
|
||||
#\
|
||||
# ax_pthread.m4 intl.m4 lib-ld.m4 ltsugar.m4 size_max.m4 \
|
||||
# codeset.m4 intldir.m4 lib-link.m4 ltversion.m4 stdint_h.m4 \
|
||||
# gettext.m4 intlmacosx.m4 lib-prefix.m4 lt~obsolete.m4 uintmax_t.m4 \
|
||||
# glibc2.m4 intmax.m4 libtool.m4 nls.m4 visibility.m4 \
|
||||
# glibc21.m4 inttypes-pri.m4 lock.m4 po.m4 wchar_t.m4 \
|
||||
# iconv.m4 inttypes_h.m4 longlong.m4 printf-posix.m4 wint_t.m4 \
|
||||
# intdiv0.m4 lcmessage.m4 ltoptions.m4 progtest.m4 xsize.m4
|
@ -1,266 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the
|
||||
# $BOOST_ROOT environment variable. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Peter Adolphs
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
AC_ARG_WITH([boost],
|
||||
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
|
||||
[use Boost library from a standard location (ARG=yes),
|
||||
from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name)
|
||||
fi
|
||||
],
|
||||
[ac_boost_lib_path=""]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
||||
succeeded=no
|
||||
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64|ppc64|s390x|sparc64|aarch64)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
|
||||
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
|
||||
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
])
|
@ -1,117 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_serialization.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SERIALIZATION
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Serialization library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SERIALIZATION_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SERIALIZATION
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 21
|
||||
|
||||
AC_DEFUN([AX_BOOST_SERIALIZATION],
|
||||
[
|
||||
AC_ARG_WITH([boost-serialization],
|
||||
AS_HELP_STRING([--with-boost-serialization@<:@=special-lib@:>@],
|
||||
[use the Serialization library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-serialization=boost_serialization-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_serialization_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_serialization_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_MSG_WARN(BOOST_CPPFLAGS $BOOST_CPPFLAGS)
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Serialization library is available,
|
||||
ax_cv_boost_serialization,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <fstream>
|
||||
@%:@include <boost/archive/text_oarchive.hpp>
|
||||
@%:@include <boost/archive/text_iarchive.hpp>
|
||||
]],
|
||||
[[std::ofstream ofs("filename");
|
||||
boost::archive::text_oarchive oa(ofs);
|
||||
return 0;
|
||||
]])],
|
||||
ax_cv_boost_serialization=yes, ax_cv_boost_serialization=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_serialization" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_SERIALIZATION,,[define if the Boost::Serialization library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_serialization_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_serialization*.so* $BOOSTLIBDIR/libboost_serialization*.dylib* $BOOSTLIBDIR/libboost_serialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_serialization.*\)\.so.*$;\1;' -e 's;^lib\(boost_serialization.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_serialization.*\)\.a*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
if test "x$link_serialization" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_serialization*.dll* $BOOSTLIBDIR/boost_serialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_serialization.*\)\.dll.*$;\1;' -e 's;^\(boost_serialization.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_serialization_lib boost_serialization-$ax_boost_user_serialization_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_serialization" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
@ -1,138 +0,0 @@
|
||||
============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++11
|
||||
# standard; if necessary, add switches to CXXFLAGS to enable support.
|
||||
#
|
||||
# The first argument, if specified, indicates whether you insist on an
|
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
|
||||
# -std=c++11). If neither is specified, you get whatever works, with
|
||||
# preference for an extended mode.
|
||||
#
|
||||
# The second argument, if specified 'mandatory' or if left unspecified,
|
||||
# indicates that baseline C++11 support is required and that the macro
|
||||
# should error out if no mode with that support is found. If specified
|
||||
# 'optional', then configuration proceeds regardless, after defining
|
||||
# HAVE_CXX11 if and only if a supporting mode is found.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
|
||||
# Copyright (c) 2014 Alexey Sokolov <sokolov@google.com>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 4
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[
|
||||
// Checks that standard libraries are available.
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
||||
bool testFn(std::function<bool(int)> op) {
|
||||
return op(42);
|
||||
}
|
||||
|
||||
bool lenCheck(const std::shared_ptr<std::string> &str, int len) {
|
||||
return str->size() > len;
|
||||
}
|
||||
|
||||
void check() {
|
||||
std::shared_ptr<std::string> str(new std::string("hello world"));
|
||||
|
||||
testFn(std::bind(lenCheck, str, _1));
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
|
||||
m4_if([$1], [], [],
|
||||
[$1], [ext], [],
|
||||
[$1], [noext], [],
|
||||
[m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
|
||||
[$2], [optional], [ax_cxx_compile_cxx11_required=false],
|
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])
|
||||
AC_LANG_PUSH([C++])dnl
|
||||
ac_success=no
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
|
||||
ax_cv_cxx_compile_cxx11,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[ax_cv_cxx_compile_cxx11=yes],
|
||||
[ax_cv_cxx_compile_cxx11=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx11 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$1], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++11 -std=gnu++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$1], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=c++11 -std=c++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
AC_LANG_POP([C++])
|
||||
if test x$ax_cxx_compile_cxx11_required = xtrue; then
|
||||
if test x$ac_success = xno; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
|
||||
fi
|
||||
else
|
||||
if test x$ac_success = xno; then
|
||||
HAVE_CXX11=0
|
||||
AC_MSG_NOTICE([No compiler with C++11 support was found])
|
||||
else
|
||||
HAVE_CXX11=1
|
||||
AC_DEFINE(HAVE_CXX11,1,
|
||||
[define if the compiler supports basic C++11 syntax])
|
||||
fi
|
||||
|
||||
AC_SUBST(HAVE_CXX11)
|
||||
fi
|
||||
])
|
@ -1,58 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_ext_check_header.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_EXT_CHECK_HEADER(<header>, <paths>).
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for <header> with -I<path> for each path in <paths> if need be.
|
||||
# The first sucecssful path is chosen (eg if you say
|
||||
# AX_EXT_CHECK_HEADER(foo.h, bar baz qux) and -Ibaz works then -Iqux will
|
||||
# not be tested.
|
||||
#
|
||||
# Any -I flags that locate a header are added to CFLAGS and CPPFLAGS. AS
|
||||
# with AC_CHECK_HEADERS it causes HAVE_<header>_H to be defined as 1.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AX_EXT_HAVE_HEADER(openssl/rsa.h, /usr/local/include /usr/local/ssl/include /usr/local/openssl/include)
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Duncan Simpson <dps@simpson.demon.co.uk>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 7
|
||||
|
||||
AC_DEFUN([AX_EXT_HAVE_HEADER],
|
||||
[AC_LANG_PUSH(C)
|
||||
AC_CHECK_HEADER($1, [$3 got="yes"], [$4 got="no"], $5)
|
||||
hdr=`echo $1 | $as_tr_sh`
|
||||
for dir in $2; do
|
||||
if test "x${got}" = "xno"; then
|
||||
ext_hashdr_cvdir=`echo $dir | $as_tr_sh`
|
||||
AC_CACHE_CHECK([for $1 library with -I$dir],
|
||||
[ext_cv${ext_hashdr_cvdir}_hashdr_${hdr}],
|
||||
[ext_have_hdr_save_cflags=${CFLAGS}
|
||||
CFLAGS="${CFLAGS} -I${dir}"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <$1>])],
|
||||
[got="yes"; eval "ext_cv${ext_hashdr_cvdir}_hashdr_${hdr}"="yes"],
|
||||
[got="no"; eval "ext_cv${ext_hashdr_cvdir}_hashdr_${hdr}"="no"])
|
||||
CFLAGS=$ext_have_hdr_save_cflags])
|
||||
if eval `echo 'test x${'ext_cv${ext_hashdr_cvdir}_hashdr_${hdr}'}' = "xyes"`; then
|
||||
CFLAGS="${CFLAGS} -I${dir}"
|
||||
CPPFLAGS="${CPPFLAGS} -I${dir}"
|
||||
got="yes";
|
||||
hdr=`echo $1 | $as_tr_cpp`
|
||||
AC_DEFINE_UNQUOTED(HAVE_${hdr}, 1,
|
||||
[Define this if you have the $1 header])
|
||||
fi; fi; done
|
||||
AC_LANG_POP])
|
@ -1,72 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_ext_have_lib.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_EXT_HAVE_LIB(<directories>, <library>, <function>, <extra libraries>)
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# AX_EXT_HAVE_LIB is identical to AC_SEARCH_LIBS with the exception that
|
||||
# will add -L<directory> when looking, and use a different variable for
|
||||
# each directory.
|
||||
#
|
||||
# Any required -L<directory> flags are added to LDFLAGS and located
|
||||
# libraies are added to LIBS
|
||||
#
|
||||
# Some libraries are unlinkable without other extra libraries, which can
|
||||
# be specified in the 4th argument. The mysql client library needs -lz,
|
||||
# for example.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AX_EXT_HAVE_LIB(/lib /usr/lib /usr/local/lib /usr/lib/mysql /usr/local/mysql/lib, mysqlclient, mysql_init, [-lz])
|
||||
#
|
||||
# which finds the mysql client library if succeds system when it tries
|
||||
# with -L/usr/lib/mysql then it adds -lmysqlclient to LIBS and
|
||||
# -L/usr/lib/mysql to LDFLAGS.
|
||||
#
|
||||
# The test itself is based on the autoconf 2.53 version of AC_SEARCH_LIBS.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Duncan Simpson <dps@simpson.demon.co.uk>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 9
|
||||
|
||||
AC_DEFUN([AX_EXT_HAVE_LIB],
|
||||
[
|
||||
new_ldflags=${LDFLAGS}
|
||||
new_libs=$LIBS
|
||||
AC_CHECK_LIB([$2], $3, new_libs="-l$2"; ext_lib_found="yes", ext_lib_found="no")
|
||||
for dir in $1
|
||||
do
|
||||
if test $ext_lib_found = no
|
||||
then
|
||||
ext_haslib_cvdir=`echo $dir | $as_tr_sh`
|
||||
AC_CACHE_CHECK([for $2 library with -L$dir], [ext_cv${ext_haslib_cvdir}_haslib_$2],
|
||||
[ext_func_search_save_LIBS=$LIBS
|
||||
ext_func_save_ldflags=${LDFLAGS}
|
||||
LIBS="-l$2 $4 ${ext_func_search_save_LIBS}"
|
||||
LDFLAGS="-L$dir ${ext_func_save_ldflags}"
|
||||
AC_TRY_LINK_FUNC([$3], [eval "ext_cv${ext_haslib_cvdir}_haslib_$2"="yes"],
|
||||
[eval "ext_cv${ext_haslib_cvdir}_haslib_$2"="no"])
|
||||
LIBS=$ext_func_search_save_LIBS
|
||||
LDFLAGS=$ext_func_save_ldflags
|
||||
])
|
||||
if eval `echo 'test x${'ext_cv${ext_haslib_cvdir}_haslib_$2'}' = "xyes"`; then
|
||||
new_libs="-l$2"
|
||||
new_ldflags="-L${dir} ${new_ldflags}"
|
||||
ext_lib_found="yes"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
LIBS="$new_libs ${LIBS}"
|
||||
LDFLAGS=$new_ldflags
|
||||
])
|
309
m4/ax_pthread.m4
309
m4/ax_pthread.m4
@ -1,309 +0,0 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro figures out how to build C programs using POSIX threads. It
|
||||
# sets the PTHREAD_LIBS output variable to the threads library and linker
|
||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
|
||||
# flags that are needed. (The user can also force certain compiler
|
||||
# flags/libs to be tested by setting these environment variables.)
|
||||
#
|
||||
# Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||
# multi-threaded programs (defaults to the value of CC otherwise). (This
|
||||
# is necessary on AIX to use the special cc_r compiler alias.)
|
||||
#
|
||||
# NOTE: You are assumed to not only compile your program with these flags,
|
||||
# but also link it with them as well. e.g. you should link with
|
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
|
||||
#
|
||||
# If you are only building threads programs, you may wish to use these
|
||||
# variables in your default LIBS, CFLAGS, and CC:
|
||||
#
|
||||
# LIBS="$PTHREAD_LIBS $LIBS"
|
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
# CC="$PTHREAD_CC"
|
||||
#
|
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
|
||||
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
|
||||
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
||||
#
|
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
|
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
|
||||
# PTHREAD_CFLAGS.
|
||||
#
|
||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
|
||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
|
||||
# is not found. If ACTION-IF-FOUND is not specified, the default action
|
||||
# will define HAVE_PTHREAD.
|
||||
#
|
||||
# Please let the authors know if this macro fails on any platform, or if
|
||||
# you have any other suggestions or comments. This macro was based on work
|
||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
|
||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
|
||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
|
||||
# grateful for the helpful feedback of numerous users.
|
||||
#
|
||||
# Updated for Autoconf 2.68 by Daniel Richard G.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 17
|
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
|
||||
AC_DEFUN([AX_PTHREAD], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_LANG_PUSH([C])
|
||||
ax_pthread_ok=no
|
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h
|
||||
# requires special compiler flags (e.g. on True64 or Sequent).
|
||||
# It gets checked for in the link test anyway.
|
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
||||
# etcetera environment variables, and if threads linking works using
|
||||
# them:
|
||||
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
||||
AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
|
||||
AC_MSG_RESULT($ax_pthread_ok)
|
||||
if test x"$ax_pthread_ok" = xno; then
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
# names; the ordering is very important because some systems
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# 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, and "pthread-config"
|
||||
# which is a program returning the flags for the Pth emulation library.
|
||||
|
||||
ax_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:
|
||||
|
||||
# pthreads: AIX (must check this before -lpthread)
|
||||
# none: in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
||||
# -pthreads: Solaris/gcc
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads too;
|
||||
# also defines -D_REENTRANT)
|
||||
# ... -mt is also the pthreads flag for HP/aCC
|
||||
# pthread: Linux, etcetera
|
||||
# --thread-safe: KAI C++
|
||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||
|
||||
case "${host_cpu}-${host_os}" in
|
||||
*solaris*)
|
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
||||
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
||||
# a function called by this macro, so we could check for that, but
|
||||
# who knows whether they'll stub that too in a future libc.) So,
|
||||
# we'll just look for -pthreads and -lpthread first:
|
||||
|
||||
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
|
||||
;;
|
||||
|
||||
*-darwin*)
|
||||
ax_pthread_flags="-pthread $ax_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x"$ax_pthread_ok" = xno; then
|
||||
for flag in $ax_pthread_flags; do
|
||||
|
||||
case $flag in
|
||||
none)
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
-*)
|
||||
AC_MSG_CHECKING([whether pthreads work with $flag])
|
||||
PTHREAD_CFLAGS="$flag"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
|
||||
if test x"$ax_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"
|
||||
;;
|
||||
esac
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
# need a special flag -Kthread to make this header compile.)
|
||||
# We check for pthread_join because it is in -lpthread on IRIX
|
||||
# while pthread_create is in libc. We check for pthread_attr_init
|
||||
# due to DEC craziness with -lpthreads. We check for
|
||||
# pthread_cleanup_push because it is one of the few pthread
|
||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||
# We try pthread_create on general principles.
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
|
||||
static void routine(void *a) { a = 0; }
|
||||
static void *start_routine(void *a) { return a; }],
|
||||
[pthread_t th; pthread_attr_t attr;
|
||||
pthread_create(&th, 0, start_routine, 0);
|
||||
pthread_join(th, 0);
|
||||
pthread_attr_init(&attr);
|
||||
pthread_cleanup_push(routine, 0);
|
||||
pthread_cleanup_pop(0) /* ; */])],
|
||||
[ax_pthread_ok=yes],
|
||||
[])
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AC_MSG_RESULT($ax_pthread_ok)
|
||||
if test "x$ax_pthread_ok" = xyes; then
|
||||
break;
|
||||
fi
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
done
|
||||
fi
|
||||
|
||||
# Various other checks:
|
||||
if test "x$ax_pthread_ok" = xyes; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||
AC_MSG_CHECKING([for joinable pthread attribute])
|
||||
attr_name=unknown
|
||||
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||
[int attr = $attr; return attr /* ; */])],
|
||||
[attr_name=$attr; break],
|
||||
[])
|
||||
done
|
||||
AC_MSG_RESULT($attr_name)
|
||||
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
||||
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
||||
flag=no
|
||||
case "${host_cpu}-${host_os}" in
|
||||
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
|
||||
*-osf* | *-hpux*) flag="-D_REENTRANT";;
|
||||
*solaris*)
|
||||
if test "$GCC" = "yes"; then
|
||||
flag="-D_REENTRANT"
|
||||
else
|
||||
flag="-mt -D_REENTRANT"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT(${flag})
|
||||
if test "x$flag" != xno; then
|
||||
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
|
||||
ax_cv_PTHREAD_PRIO_INHERIT, [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
|
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
|
||||
AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# More AIX lossage: must compile with xlc_r or cc_r
|
||||
if test x"$GCC" != xyes; then
|
||||
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
|
||||
else
|
||||
PTHREAD_CC=$CC
|
||||
fi
|
||||
else
|
||||
PTHREAD_CC="$CC"
|
||||
fi
|
||||
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
AC_SUBST(PTHREAD_CFLAGS)
|
||||
AC_SUBST(PTHREAD_CC)
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test x"$ax_pthread_ok" = xyes; then
|
||||
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
|
||||
:
|
||||
else
|
||||
ax_pthread_ok=no
|
||||
$2
|
||||
fi
|
||||
AC_LANG_POP
|
||||
])dnl AX_PTHREAD
|
12
makedist.sh
12
makedist.sh
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm m4/[c-z]*.m4
|
||||
|
||||
echo Creating autoconf scripts...
|
||||
sh ./reconfig.sh
|
||||
|
||||
echo Configuring...
|
||||
./configure
|
||||
|
||||
sh ./makedist2.sh
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# create distribution file
|
||||
make dist
|
||||
|
||||
# create tar archive and signature
|
||||
tarArchive=@PACKAGE@-@VERSION@.tgz
|
||||
mv @PACKAGE@-@VERSION@.tar.gz $tarArchive
|
||||
# let the user know why they're being asked for a passpharse
|
||||
echo "Signing tar archive - enter GPG password";
|
||||
gpg --detach-sign -a $tarArchive
|
||||
|
||||
# create rpms
|
||||
#cp $tarArchive /usr/src/packages/SOURCES
|
||||
#echo "Building signed RPM files - enter GPG password";
|
||||
#rpmbuild -ba --sign @PACKAGE@.spec
|
||||
|
||||
# move all distribution files to dist directory
|
||||
mkdir dist
|
||||
mv $tarArchive dist
|
||||
mv $tarArchive.asc dist
|
||||
#mv /usr/src/packages/SRPMS/@PACKAGE@-@VERSION@-@RELEASE@.src.rpm dist
|
||||
#mv /usr/src/packages/RPMS/i586/@PACKAGE@-@VERSION@-@RELEASE@.i586.rpm dist
|
||||
|
||||
# cleanup
|
||||
#rm /usr/src/packages/SOURCES/$tarArchive
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
autoreconf -i
|
||||
|
Loading…
Reference in New Issue
Block a user