Skip to content

Commit

Permalink
Changes for deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Nov 8, 2015
1 parent c36beb5 commit 7dd4913
Show file tree
Hide file tree
Showing 16 changed files with 427 additions and 347 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Files to ignore by git
#
# Version: 20130922
# Version: 20141014

# Generic auto-generated build files
*~
*.a
*.la
*.lai
*.lineno
*.lo
*.Plo
*.Po
Expand All @@ -26,6 +27,7 @@ stamp-h1
/ABOUT-NLS
/aclocal.m4
/autom4te.cache/
/compile
/config.guess
/config.log
/config.rpath
Expand All @@ -37,6 +39,7 @@ stamp-h1
/libtool
/ltmain.sh
/missing
/test-driver
/ylwrap
/m4/codeset.m4
/m4/fcntl-o.m4
Expand Down Expand Up @@ -101,6 +104,8 @@ stamp-h1
/include/libvmdk/types.h
/libvmdk/libvmdk.rc
/libvmdk/libvmdk_definitions.h
/vmdktools/vmdkinfo
/vmdktools/vmdkmount
/pyvmdk/setup.py
/tests/input
/tests/tmp
Expand All @@ -117,6 +122,8 @@ stamp-h1
/libcnotify
/libcpath
/libcsplit
/libcstring
/libcsystem
/libcthreads
/libfcache
/libfdata
Expand Down
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ Tests:
- compressed (done)
- (compressed) with parent (done)

20141021
* changes for deployment

20140929
* removed README.macosx
* changes for project site move
Expand Down
72 changes: 51 additions & 21 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -1,63 +1,93 @@
#!/bin/sh
# Script to generate ./configure using the autotools
#
# Version: 20130509
# Version: 20141007

EXIT_SUCCESS=0;
EXIT_FAILURE=1;

ACLOCAL="/usr/bin/aclocal";
AUTOCONF="/usr/bin/autoconf";
AUTOHEADER="/usr/bin/autoheader";
AUTOMAKE="/usr/bin/automake";
AUTOPOINT="/usr/bin/autopoint";
AUTORECONF="/usr/bin/autoreconf";
LIBTOOLIZE="/usr/bin/libtoolize";
BINDIR="/usr/bin";

if [ -x "${AUTORECONF}" ];
if ! test -x "${BINDIR}/pkg-config";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
# Default location of MacPorts installed binaries.
BINDIR="/opt/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
# Default location of MSYS-MinGW installed binaries.
BINDIR="/mingw/bin";
fi

PKGCONFIG="${BINDIR}/pkg-config";

if ! test -x "${PKGCONFIG}";
then
echo "Unable to find: pkg-config";

exit ${EXIT_FAILURE};
fi

ACLOCAL="${BINDIR}/aclocal";
AUTOCONF="${BINDIR}/autoconf";
AUTOHEADER="${BINDIR}/autoheader";
AUTOMAKE="${BINDIR}/automake";
AUTOPOINT="${BINDIR}/autopoint";
AUTORECONF="${BINDIR}/autoreconf";
LIBTOOLIZE="${BINDIR}/libtoolize";

if test -x "${AUTORECONF}";
then
${AUTORECONF} --force --install
else
if [ ! -x "${ACLOCAL}" ];
if ! test -x "${ACLOCAL}";
then
echo "Unable to find: aclocal";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

if [ ! -x "${AUTOCONF}" ];
if ! test -x "${AUTOCONF}";
then
echo "Unable to find: autoconf";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

if [ ! -x "${AUTOHEADER}" ];
if ! test -x "${AUTOHEADER}";
then
echo "Unable to find: autoheader";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

if [ ! -x "${AUTOMAKE}" ];
if ! test -x "${AUTOMAKE}";
then
echo "Unable to find: automake";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

if [ ! -x "${AUTOPOINT}" ];
if ! test -x "${AUTOPOINT}";
then
echo "Unable to find: autopoint";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

if [ ! -x "${LIBTOOLIZE}" ];
if ! test -x "${LIBTOOLIZE}";
then
echo "Unable to find: libtoolize";

echo ${EXIT_FAILURE};
exit ${EXIT_FAILURE};
fi

${AUTOPOINT} --force
Expand Down
6 changes: 3 additions & 3 deletions common/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ extern "C" {
#define memory_allocate( size ) \
g_malloc( (gsize) size )

#elif defined( HAVE_MALLOC ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) )
#elif defined( HAVE_MALLOC ) || defined( WINAPI )
#define memory_allocate( size ) \
malloc( size )

Expand All @@ -67,7 +67,7 @@ extern "C" {
#define memory_reallocate( buffer, size ) \
g_realloc( (gpointer) buffer, (gsize) size )

#elif defined( HAVE_REALLOC ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) )
#elif defined( HAVE_REALLOC ) || defined( WINAPI )
#define memory_reallocate( buffer, size ) \
realloc( (void *) buffer, size )

Expand All @@ -86,7 +86,7 @@ extern "C" {
#define memory_free( buffer ) \
g_free( (gpointer) buffer )

#elif defined( HAVE_FREE ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) )
#elif defined( HAVE_FREE ) || defined( WINAPI )
#define memory_free( buffer ) \
free( (void *) buffer )

Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ AC_PREREQ( 2.59 )

AC_INIT(
[libvmdk],
[20140929],
[20141021],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
[include/libvmdk.h.in])

AM_INIT_AUTOMAKE([gnu 1.6])
AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])

AC_CONFIG_MACRO_DIR([m4])

Expand Down
4 changes: 2 additions & 2 deletions libvmdk/libvmdk_extent_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int libvmdk_extent_file_initialize(
NULL,
(int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libvmdk_extent_file_read_grain_group_element_data,
NULL,
LIBFDATA_FLAG_DATA_HANDLE_NON_MANAGED,
LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,
error ) != 1 )
{
libcerror_error_set(
Expand Down Expand Up @@ -2362,7 +2362,7 @@ int libvmdk_extent_file_read_grain_group_element_data(
NULL,
(int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libvmdk_grain_data_read_element_data,
NULL,
LIBFDATA_FLAG_DATA_HANDLE_NON_MANAGED,
LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,
error ) != 1 )
{
libcerror_error_set(
Expand Down
4 changes: 2 additions & 2 deletions libvmdk/libvmdk_extent_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ int libvmdk_extent_table_initialize_extents(
(ssize_t (*)(intptr_t *, intptr_t *, int, int, uint8_t *, size_t, uint32_t, uint8_t, libcerror_error_t **)) &libvmdk_extent_file_read_segment_data,
NULL,
(off64_t (*)(intptr_t *, intptr_t *, int, int, off64_t, libcerror_error_t **)) &libvmdk_extent_file_seek_segment_offset,
LIBFDATA_FLAG_DATA_HANDLE_NON_MANAGED,
LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,
error );

if( result != 1 )
Expand Down Expand Up @@ -1493,7 +1493,7 @@ int libvmdk_extent_table_initialize_extents(
NULL,
(int (*)(intptr_t *, intptr_t *, libfdata_list_element_t *, libfcache_cache_t *, int, off64_t, size64_t, uint32_t, uint8_t, libcerror_error_t **)) &libvmdk_extent_file_read_element_data,
NULL,
LIBFDATA_FLAG_DATA_HANDLE_NON_MANAGED,
LIBFDATA_DATA_HANDLE_FLAG_NON_MANAGED,
error );

if( result != 1 )
Expand Down
17 changes: 8 additions & 9 deletions m4/libcstring.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Functions for libcstring
dnl
dnl Version: 20131015
dnl Version: 20141014

dnl Function to detect if libcstring is available
dnl ac_libcstring_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand Down Expand Up @@ -52,8 +52,6 @@ AC_DEFUN([AX_LIBCSTRING_CHECK_LIB],
[ac_cv_libcstring_dummy=yes],
[ac_cv_libcstring=no])
dnl TODO add functions
ac_cv_libcstring_LIBADD="-lcstring"
])
])
Expand Down Expand Up @@ -236,11 +234,6 @@ AC_DEFUN([AX_LIBCSTRING_CHECK_LOCAL],
[1])
])
])
ac_cv_libcstring_CPPFLAGS="-I../libcstring";
ac_cv_libcstring_LIBADD="../libcstring/libcstring.la";
ac_cv_libcstring=local
])

dnl Function to detect how to enable libcstring
Expand All @@ -255,10 +248,16 @@ AC_DEFUN([AX_LIBCSTRING_CHECK_ENABLE],
dnl Check for a shared library version
AX_LIBCSTRING_CHECK_LIB
dnl Always check the dependencies
AX_LIBCSTRING_CHECK_LOCAL
dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libcstring" != xyes],
[AX_LIBCSTRING_CHECK_LOCAL
[ac_cv_libcstring_CPPFLAGS="-I../libcstring";
ac_cv_libcstring_LIBADD="../libcstring/libcstring.la";
ac_cv_libcstring=local
AC_DEFINE(
[HAVE_LOCAL_LIBCSTRING],
Expand Down
36 changes: 27 additions & 9 deletions m4/libcsystem.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Functions for libcsystem
dnl
dnl Version: 20130412
dnl Version: 20141018

dnl Function to detect if libcsystem is available
dnl ac_libcsystem_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -24,7 +24,7 @@ AC_DEFUN([AX_LIBCSYSTEM_CHECK_LIB],
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libcsystem],
[libcsystem >= 20120425],
[libcsystem >= 20141018],
[ac_cv_libcsystem=yes],
[ac_cv_libcsystem=no])
])
Expand All @@ -48,7 +48,24 @@ AC_DEFUN([AX_LIBCSYSTEM_CHECK_LIB],
[ac_cv_libcsystem_dummy=yes],
[ac_cv_libcsystem=no])
dnl TODO add functions
dnl Support functions
AC_CHECK_LIB(
csystem,
libcsystem_initialize,
[ac_cv_libcsystem_dummy=yes],
[ac_cv_libcsystem=no])
dnl Signal functions
AC_CHECK_LIB(
csystem,
libcsystem_signal_attach,
[ac_cv_libcsystem_dummy=yes],
[ac_cv_libcsystem=no])
AC_CHECK_LIB(
csystem,
libcsystem_signal_detach,
[ac_cv_libcsystem_dummy=yes],
[ac_cv_libcsystem=no])
ac_cv_libcsystem_LIBADD="-lcsystem"
])
Expand Down Expand Up @@ -161,11 +178,6 @@ AC_DEFUN([AX_LIBCSYSTEM_CHECK_LOCAL],
dnl Check for internationalization functions in libcsystem/libcsystem_support.c
AC_CHECK_FUNCS([bindtextdomain textdomain])
ac_cv_libcsystem_CPPFLAGS="-I../libcsystem";
ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la";
ac_cv_libcsystem=local
])

dnl Function to detect how to enable libcsystem
Expand All @@ -180,10 +192,16 @@ AC_DEFUN([AX_LIBCSYSTEM_CHECK_ENABLE],
dnl Check for a shared library version
AX_LIBCSYSTEM_CHECK_LIB
dnl Always check the dependencies
AX_LIBCSYSTEM_CHECK_LOCAL
dnl Check if the dependencies for the local library version
AS_IF(
[test "x$ac_cv_libcsystem" != xyes],
[AX_LIBCSYSTEM_CHECK_LOCAL
[ac_cv_libcsystem_CPPFLAGS="-I../libcsystem";
ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la";
ac_cv_libcsystem=local
AC_DEFINE(
[HAVE_LOCAL_LIBCSYSTEM],
Expand Down
4 changes: 2 additions & 2 deletions m4/libfdata.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Functions for libfdata
dnl
dnl Version: 20140601
dnl Version: 20140915

dnl Function to detect if libfdata is available
dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
Expand All @@ -24,7 +24,7 @@ AC_DEFUN([AX_LIBFDATA_CHECK_LIB],
[test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
[PKG_CHECK_MODULES(
[libfdata],
[libfdata >= 20140601],
[libfdata >= 20140915],
[ac_cv_libfdata=yes],
[ac_cv_libfdata=no])
])
Expand Down
Loading

0 comments on commit 7dd4913

Please sign in to comment.