[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[719] trunk
Brought to you by:
fredm
From: <fr...@us...> - 2012-12-06 11:56:03
|
Revision: 719 http://sourceforge.net/p/fuse-for-macosx/code/719 Author: fredm Date: 2012-12-06 11:55:57 +0000 (Thu, 06 Dec 2012) Log Message: ----------- Merge up to vendor revision 4779. Revision Links: -------------- http://sourceforge.net/p/fuse-for-macosx/code/4779 Modified Paths: -------------- trunk/FuseGenerator/generate.pl trunk/FuseGenerator/libspectrum.h trunk/FuseImporter/generate.pl trunk/FuseImporter/libspectrum.h trunk/fuse/fusepb/generate.pl trunk/fuse/fusepb/libspectrum.h trunk/libspectrum/generate.pl trunk/libspectrum/libspectrum/Makefile.am trunk/libspectrum/libspectrum/autogen.sh trunk/libspectrum/libspectrum/hacking/ChangeLog trunk/libspectrum/libspectrum/internals.h trunk/libspectrum/libspectrum/libspectrum.c trunk/libspectrum/libspectrum/libspectrum.h.in trunk/libspectrum/libspectrum/make-perl.c trunk/libspectrum/libspectrum/memory.c trunk/libspectrum/libspectrum/myglib/garray.c trunk/libspectrum/libspectrum/myglib/ghash.c trunk/libspectrum/libspectrum/myglib/gslist.c trunk/libspectrum/libspectrum/szx.c trunk/libspectrum/libspectrum/windres.rc trunk/libspectrum/libspectrum.h Added Paths: ----------- trunk/libspectrum/libspectrum/configure.ac trunk/libspectrum/libspectrum/m4/ Removed Paths: ------------- trunk/libspectrum/libspectrum/acinclude.m4 trunk/libspectrum/libspectrum/configure.in Property Changed: ---------------- trunk/libspectrum/libspectrum/ Modified: trunk/FuseGenerator/generate.pl =================================================================== --- trunk/FuseGenerator/generate.pl 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/FuseGenerator/generate.pl 2012-12-06 11:55:57 UTC (rev 719) @@ -47,7 +47,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -63,7 +67,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -84,7 +88,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -113,6 +117,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, Modified: trunk/FuseGenerator/libspectrum.h =================================================================== --- trunk/FuseGenerator/libspectrum.h 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/FuseGenerator/libspectrum.h 2012-12-06 11:55:57 UTC (rev 719) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4534 2011-08-11 12:59:47Z fredm $ + $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ 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 @@ -106,7 +106,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -122,7 +126,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -143,7 +147,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -172,6 +176,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, @@ -274,6 +283,7 @@ /* Initialisation */ WIN32_DLL libspectrum_error libspectrum_init( void ); +WIN32_DLL void libspectrum_end( void ); /* Version checking */ Modified: trunk/FuseImporter/generate.pl =================================================================== --- trunk/FuseImporter/generate.pl 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/FuseImporter/generate.pl 2012-12-06 11:55:57 UTC (rev 719) @@ -47,7 +47,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -63,7 +67,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -84,7 +88,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -113,6 +117,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, Modified: trunk/FuseImporter/libspectrum.h =================================================================== --- trunk/FuseImporter/libspectrum.h 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/FuseImporter/libspectrum.h 2012-12-06 11:55:57 UTC (rev 719) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4534 2011-08-11 12:59:47Z fredm $ + $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ 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 @@ -106,7 +106,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -122,7 +126,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -143,7 +147,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -172,6 +176,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, @@ -274,6 +283,7 @@ /* Initialisation */ WIN32_DLL libspectrum_error libspectrum_init( void ); +WIN32_DLL void libspectrum_end( void ); /* Version checking */ Modified: trunk/fuse/fusepb/generate.pl =================================================================== --- trunk/fuse/fusepb/generate.pl 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/fuse/fusepb/generate.pl 2012-12-06 11:55:57 UTC (rev 719) @@ -47,7 +47,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -63,7 +67,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -84,7 +88,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -113,6 +117,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, Modified: trunk/fuse/fusepb/libspectrum.h =================================================================== --- trunk/fuse/fusepb/libspectrum.h 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/fuse/fusepb/libspectrum.h 2012-12-06 11:55:57 UTC (rev 719) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4534 2011-08-11 12:59:47Z fredm $ + $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ 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 @@ -106,7 +106,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -122,7 +126,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -143,7 +147,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -172,6 +176,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, @@ -274,6 +283,7 @@ /* Initialisation */ WIN32_DLL libspectrum_error libspectrum_init( void ); +WIN32_DLL void libspectrum_end( void ); /* Version checking */ Modified: trunk/libspectrum/generate.pl =================================================================== --- trunk/libspectrum/generate.pl 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/generate.pl 2012-12-06 11:55:57 UTC (rev 719) @@ -47,7 +47,11 @@ typedef gint (*GCompareFunc) (gconstpointer a, gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFreeFunc) (gpointer data); + + WIN32_DLL GSList *g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func); @@ -63,7 +67,7 @@ gpointer data); WIN32_DLL GSList *g_slist_remove (GSList *list, - gpointer data); + gconstpointer data); WIN32_DLL GSList *g_slist_last (GSList *list); @@ -84,7 +88,7 @@ guint n); WIN32_DLL GSList *g_slist_find_custom (GSList *list, - gpointer data, + gconstpointer data, GCompareFunc func ); WIN32_DLL gint g_slist_position (GSList *list, @@ -113,6 +117,11 @@ WIN32_DLL GHashTable *g_hash_table_new (GHashFunc hash_func, GCompareFunc key_compare_func); +WIN32_DLL GHashTable *g_hash_table_new_full (GHashFunc hash_func, + GCompareFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); + WIN32_DLL void g_hash_table_destroy (GHashTable *hash_table); WIN32_DLL void g_hash_table_insert (GHashTable *hash_table, Property changes on: trunk/libspectrum/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo - /vendor/fuse-emulator/0.10.0/libspectrum:556-557 /vendor/fuse-emulator/0.10.0-pre1/libspectrum:545-546 /vendor/fuse-emulator/current/libspectrum:530-711 /vendor/fuse-emulator/fuse-1.0.0a/libspectrum:668-669 /vendor/fuse-emulator/fuse-r4617/libspectrum:686 + /vendor/fuse-emulator/0.10.0/libspectrum:556-557 /vendor/fuse-emulator/0.10.0-pre1/libspectrum:545-546 /vendor/fuse-emulator/current/libspectrum:530-717 /vendor/fuse-emulator/fuse-1.0.0a/libspectrum:668-669 /vendor/fuse-emulator/fuse-r4617/libspectrum:686 Modified: trunk/libspectrum/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/libspectrum/Makefile.am 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/Makefile.am 2012-12-06 11:55:57 UTC (rev 719) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2001-2004 Philip Kendall -## $Id: Makefile.am 4388 2011-04-27 12:52:26Z fredm $ +## $Id: Makefile.am 4757 2012-11-07 11:14:48Z fredm $ ## 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 @@ -23,6 +23,8 @@ AUTOMAKE_OPTIONS = foreign +ACLOCAL_AMFLAGS = -I m4 + lib_LTLIBRARIES = libspectrum.la libspectrum_la_SOURCES = bzip2.c \ @@ -63,7 +65,7 @@ libspectrum_la_LDFLAGS = -version-info 8:0:0 -no-undefined @WINDRES_LDFLAGS@ -libspectrum_la_LIBADD = @AUDIOFILE_LIBS@ -lm +libspectrum_la_LIBADD = @AUDIOFILE_LIBS@ @GLIB_LIBS@ -lm libspectrum_la_DEPENDENCIES = @WINDRES_OBJ@ @@ -78,7 +80,7 @@ AM_CFLAGS = -DLIBSPECTRUM_EXPORTS make-perl$(EXEEXT): $(srcdir)/make-perl.c config.h - $(CC_FOR_BUILD) -I. -o $@ $< + $(CC_FOR_BUILD) -I. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< libspectrum.h: libspectrum.h.in generate.pl snap_accessors.txt tape_accessors.txt config.h @PERL@ -p generate.pl $(srcdir) $(srcdir)/libspectrum.h.in > $@.tmp && mv $@.tmp $@ @@ -97,12 +99,13 @@ @PERL@ $(srcdir)/tape_set.pl $(srcdir)/tape_accessors.txt > $@.tmp && mv $@.tmp $@ windres.o: windres.rc - @WINDRES@ $(srcdir)/windres.rc windres.o + @WINDRES@ -I. $(srcdir)/windres.rc windres.o -INCLUDES = @GLIB_CFLAGS@ @AUDIOFILE_CFLAGS@ +AM_CPPFLAGS = @GLIB_CFLAGS@ @AUDIOFILE_CFLAGS@ EXTRA_DIST = accessor.pl \ generate.pl.in \ + m4/audiofile.m4 \ make-perl.c \ tape_accessors.pl \ tape_accessors.txt \ Deleted: trunk/libspectrum/libspectrum/acinclude.m4 =================================================================== --- trunk/libspectrum/libspectrum/acinclude.m4 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/acinclude.m4 2012-12-06 11:55:57 UTC (rev 719) @@ -1,593 +0,0 @@ -# Configure paths for GLIB -# Owen Taylor 97-11-3 - -# Taken from Glib 1.2.10 by PAK 2004/07/06 - -dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or -dnl gthread is specified in MODULES, pass to glib-config -dnl -AC_DEFUN([AM_PATH_GLIB], -[dnl -dnl Get the cflags and libraries from the glib-config script -dnl -AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], - glib_config_prefix="$withval", glib_config_prefix="") -AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], - glib_config_exec_prefix="$withval", glib_config_exec_prefix="") -AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], - , enable_glibtest=yes) - - if test x$glib_config_exec_prefix != x ; then - glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config - fi - fi - if test x$glib_config_prefix != x ; then - glib_config_args="$glib_config_args --prefix=$glib_config_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_prefix/bin/glib-config - fi - fi - - for module in . $4 - do - case "$module" in - gmodule) - glib_config_args="$glib_config_args gmodule" - ;; - gthread) - glib_config_args="$glib_config_args gthread" - ;; - esac - done - - AC_PATH_PROG(GLIB_CONFIG, glib-config, no) - min_glib_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) - no_glib="" - if test "$GLIB_CONFIG" = "no" ; then - no_glib=yes - else - GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` - GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` - glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_glibtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" -dnl -dnl Now check if the installed GLIB is sufficiently new. (Also sanity -dnl checks the results of glib-config to some extent -dnl - rm -f conf.glibtest - AC_TRY_RUN([ -#include <glib.h> -#include <stdio.h> -#include <stdlib.h> - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.glibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_glib_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_glib_version"); - exit(1); - } - - if ((glib_major_version != $glib_config_major_version) || - (glib_minor_version != $glib_config_minor_version) || - (glib_micro_version != $glib_config_micro_version)) - { - printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, - glib_major_version, glib_minor_version, glib_micro_version); - printf ("*** was found! If glib-config was correct, then it is best\n"); - printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); - printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } - else if ((glib_major_version != GLIB_MAJOR_VERSION) || - (glib_minor_version != GLIB_MINOR_VERSION) || - (glib_micro_version != GLIB_MICRO_VERSION)) - { - printf("*** GLIB header files (version %d.%d.%d) do not match\n", - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - glib_major_version, glib_minor_version, glib_micro_version); - } - else - { - if ((glib_major_version > major) || - ((glib_major_version == major) && (glib_minor_version > minor)) || - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", - glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the glib-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); - printf("*** correct copy of glib-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_glib" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GLIB_CONFIG" = "no" ; then - echo "*** The glib-config script installed by GLIB could not be found" - echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GLIB_CONFIG environment variable to the" - echo "*** full path to glib-config." - else - if test -f conf.glibtest ; then - : - else - echo "*** Could not run GLIB test program, checking why..." - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ -#include <glib.h> -#include <stdio.h> -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GLIB or finding the wrong" - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB was incorrectly installed" - echo "*** or that you have moved GLIB since it was installed. In the latter case, you" - echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GLIB_CFLAGS="" - GLIB_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GLIB_CFLAGS) - AC_SUBST(GLIB_LIBS) - rm -f conf.glibtest -]) - -# Configure paths for GLIB -# Owen Taylor 1997-2001 - -# Taken from Glib 2.4.2 by PAK 2004/07/06 - -dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or -dnl gthread is specified in MODULES, pass to pkg-config -dnl -AC_DEFUN([AM_PATH_GLIB_2_0], -[dnl -dnl Get the cflags and libraries from pkg-config -dnl -AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], - , enable_glibtest=yes) - - pkg_config_args=glib-2.0 - for module in . $4 - do - case "$module" in - gmodule) - pkg_config_args="$pkg_config_args gmodule-2.0" - ;; - gobject) - pkg_config_args="$pkg_config_args gobject-2.0" - ;; - gthread) - pkg_config_args="$pkg_config_args gthread-2.0" - ;; - esac - done - - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - - no_glib="" - - if test x$PKG_CONFIG != xno ; then - if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then - : - else - echo *** pkg-config too old; version 0.7 or better required. - no_glib=yes - PKG_CONFIG=no - fi - else - no_glib=yes - fi - - min_glib_version=ifelse([$1], ,2.0.0,$1) - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) - - if test x$PKG_CONFIG != xno ; then - ## don't try to run the test against uninstalled libtool libs - if $PKG_CONFIG --uninstalled $pkg_config_args; then - echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" - enable_glibtest=no - fi - - if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then - : - else - no_glib=yes - fi - fi - - if test x"$no_glib" = x ; then - GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` - GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` - GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` - - GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` - GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` - glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_glibtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" -dnl -dnl Now check if the installed GLIB is sufficiently new. (Also sanity -dnl checks the results of pkg-config to some extent) -dnl - rm -f conf.glibtest - AC_TRY_RUN([ -#include <glib.h> -#include <stdio.h> -#include <stdlib.h> - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.glibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_glib_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_glib_version"); - exit(1); - } - - if ((glib_major_version != $glib_config_major_version) || - (glib_minor_version != $glib_config_minor_version) || - (glib_micro_version != $glib_config_micro_version)) - { - printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, - glib_major_version, glib_minor_version, glib_micro_version); - printf ("*** was found! If pkg-config was correct, then it is best\n"); - printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); - printf("*** to point to the correct configuration files\n"); - } - else if ((glib_major_version != GLIB_MAJOR_VERSION) || - (glib_minor_version != GLIB_MINOR_VERSION) || - (glib_micro_version != GLIB_MICRO_VERSION)) - { - printf("*** GLIB header files (version %d.%d.%d) do not match\n", - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - glib_major_version, glib_minor_version, glib_micro_version); - } - else - { - if ((glib_major_version > major) || - ((glib_major_version == major) && (glib_minor_version > minor)) || - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", - glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); - printf("*** correct copy of pkg-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_glib" = x ; then - AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$PKG_CONFIG" = "no" ; then - echo "*** A new enough version of pkg-config was not found." - echo "*** See http://www.freedesktop.org/software/pkgconfig/" - else - if test -f conf.glibtest ; then - : - else - echo "*** Could not run GLIB test program, checking why..." - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ -#include <glib.h> -#include <stdio.h> -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GLIB or finding the wrong" - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GLIB_CFLAGS="" - GLIB_LIBS="" - GLIB_GENMARSHAL="" - GOBJECT_QUERY="" - GLIB_MKENUMS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GLIB_CFLAGS) - AC_SUBST(GLIB_LIBS) - AC_SUBST(GLIB_GENMARSHAL) - AC_SUBST(GOBJECT_QUERY) - AC_SUBST(GLIB_MKENUMS) - rm -f conf.glibtest -]) - -# Configure paths for the Audio File Library -# Bertrand Guiheneuf 98-10-21 -# stolen from esd.m4 in esound : -# Manish Singh 98-9-30 -# stolen back from Frank Belew -# stolen from Manish Singh -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_AUDIOFILE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for Audio File Library, and define AUDIOFILE_CFLAGS and AUDIOFILE_LIBS. -dnl -AC_DEFUN([AM_PATH_AUDIOFILE], -[dnl -dnl Get compiler flags and libraries from the audiofile-config script. -dnl -AC_ARG_WITH(audiofile-prefix,[ --with-audiofile-prefix=PFX Prefix where Audio File Library is installed (optional)], - audiofile_prefix="$withval", audiofile_prefix="") -AC_ARG_WITH(audiofile-exec-prefix,[ --with-audiofile-exec-prefix=PFX Exec prefix where Audio File Library is installed (optional)], - audiofile_exec_prefix="$withval", audiofile_exec_prefix="") -AC_ARG_ENABLE(audiofiletest, [ --disable-audiofiletest Do not try to compile and run a test Audio File Library program], , enable_audiofiletest=yes) - - if test x$audiofile_exec_prefix != x ; then - audiofile_args="$audiofile_args --exec-prefix=$audiofile_exec_prefix" - if test x${AUDIOFILE_CONFIG+set} != xset ; then - AUDIOFILE_CONFIG=$audiofile_exec_prefix/bin/audiofile-config - fi - fi - if test x$audiofile_prefix != x ; then - audiofile_args="$audiofile_args --prefix=$audiofile_prefix" - if test x${AUDIOFILE_CONFIG+set} != xset ; then - AUDIOFILE_CONFIG=$audiofile_prefix/bin/audiofile-config - fi - fi - - AC_PATH_PROG(AUDIOFILE_CONFIG, audiofile-config, no) - min_audiofile_version=ifelse([$1], ,0.2.5,$1) - AC_MSG_CHECKING(for Audio File Library - version >= $min_audiofile_version) - no_audiofile="" - if test "$AUDIOFILE_CONFIG" = "no" ; then - no_audiofile=yes - else - AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG $audiofileconf_args --libs` - AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG $audiofileconf_args --cflags` - audiofile_major_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - audiofile_minor_version=`$AUDIOFILE_CONFIG $audiofile_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - audiofile_micro_version=`$AUDIOFILE_CONFIG $audiofile_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_audiofiletest" = "xyes" ; then - AC_LANG_SAVE - AC_LANG_C - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" - LIBS="$LIBS $AUDIOFILE_LIBS" -dnl -dnl Now check if the installed Audio File Library is sufficiently new. -dnl (Also checks the sanity of the results of audiofile-config to some extent.) -dnl - rm -f conf.audiofiletest - AC_TRY_RUN([ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <audiofile.h> - -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.audiofiletest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_audiofile_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_audiofile_version"); - exit(1); - } - - if (($audiofile_major_version > major) || - (($audiofile_major_version == major) && ($audiofile_minor_version > minor)) || - (($audiofile_major_version == major) && ($audiofile_minor_version == minor) && ($audiofile_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'audiofile-config --version' returned %d.%d.%d, but the minimum version\n", $audiofile_major_version, $audiofile_minor_version, $audiofile_micro_version); - printf("*** of the Audio File Library required is %d.%d.%d. If audiofile-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If audiofile-config was wrong, set the environment variable AUDIOFILE_CONFIG\n"); - printf("*** to point to the correct copy of audiofile-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - AC_LANG_RESTORE - fi - fi - if test "x$no_audiofile" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$AUDIOFILE_CONFIG" = "no" ; then - cat <<END -*** The audiofile-config script installed by the Audio File Library could -*** not be found. If the Audio File Library was installed in PREFIX, make -*** sure PREFIX/bin is in your path, or set the AUDIOFILE_CONFIG -*** environment variable to the full path to audiofile-config. -END - else - if test -f conf.audiofiletest ; then - : - else - echo "*** Could not run Audio File Library test program; checking why..." - AC_LANG_SAVE - AC_LANG_C - CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" - LIBS="$LIBS $AUDIOFILE_LIBS" - AC_TRY_LINK([ -#include <stdio.h> -#include <audiofile.h> -], [ return 0; ], - [ cat <<END -*** The test program compiled, but did not run. This usually means that -*** the run-time linker is not finding Audio File Library or finding the -*** wrong version of Audio File Library. -*** -*** If it is not finding Audio File Library, you'll need to set your -*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point -*** to the installed location. Also, make sure you have run ldconfig if -*** that is required on your system. -*** -*** If you have an old version installed, it is best to remove it, although -*** you may also be able to get things to work by modifying -*** LD_LIBRARY_PATH. -END - ], - [ echo "*** The test program failed to compile or link. See the file config.log" - echo "*** for the exact error that occured. This usually means the Audio File" - echo "*** Library was incorrectly installed or that you have moved the Audio" - echo "*** File Library since it was installed. In the latter case, you may want" - echo "*** to edit the audiofile-config script: $AUDIOFILE_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - AC_LANG_RESTORE - fi - fi - AUDIOFILE_CFLAGS="" - AUDIOFILE_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(AUDIOFILE_CFLAGS) - AC_SUBST(AUDIOFILE_LIBS) - rm -f conf.audiofiletest -]) Modified: trunk/libspectrum/libspectrum/autogen.sh =================================================================== --- trunk/libspectrum/libspectrum/autogen.sh 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/autogen.sh 2012-12-06 11:55:57 UTC (rev 719) @@ -3,7 +3,7 @@ # autogen.sh: autotools invocation # Copyright (c) 2004 Philip Kendall -# $Id: autogen.sh 2890 2007-05-26 19:31:43Z zubzero $ +# $Id: autogen.sh 4751 2012-10-21 05:03:37Z fredm $ # 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 @@ -26,7 +26,7 @@ # Exit on errors set -e -aclocal +aclocal -I m4 autoheader glibtoolize --automake automake --add-missing Copied: trunk/libspectrum/libspectrum/configure.ac (from rev 717, vendor/fuse-emulator/current/libspectrum/configure.ac) =================================================================== --- trunk/libspectrum/libspectrum/configure.ac (rev 0) +++ trunk/libspectrum/libspectrum/configure.ac 2012-12-06 11:55:57 UTC (rev 719) @@ -0,0 +1,224 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Copyright (c) 1999-2008 Philip Kendall + +dnl $Id: configure.ac 4778 2012-11-28 23:21:34Z sbaldovi $ + +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License along +dnl with this program; if not, write to the Free Software Foundation, Inc., +dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +dnl +dnl Author contact information: +dnl +dnl E-mail: phi...@sh... + +dnl Package version +m4_define([libspectrum_version], [1.0.0]) + +dnl Product full version +m4_define([libspectrum_major_version], [1]) +m4_define([libspectrum_minor_version], [0]) +m4_define([libspectrum_micro_version], [0]) +m4_define([libspectrum_nano_version], [0]) +m4_define([libspectrum_full_version], + [libspectrum_major_version.libspectrum_minor_version.libspectrum_micro_version.libspectrum_nano_version]) +m4_define([libspectrum_rc_version], + [libspectrum_major_version,libspectrum_minor_version,libspectrum_micro_version,libspectrum_nano_version]) + +dnl Package info +m4_define([libspectrum_copyright], ["(c) 1999-2012 Philip Kendall and others"]) +m4_define([libspectrum_url], + [http://fuse-emulator.sourceforge.net/libspectrum.php]) +m4_define([libspectrum_bugreport], + [http://sourceforge.net/tracker/?group_id=91293&atid=596648]) + +AC_INIT([libspectrum],[libspectrum_version],[libspectrum_bugreport], + [libspectrum],[libspectrum_url]) +AC_CONFIG_SRCDIR([libspectrum.c]) +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_HEADERS([config.h]) +AC_CANONICAL_HOST + +dnl Use automake to produce `Makefile.in' +AM_INIT_AUTOMAKE + +dnl Substitutions for .in files +LIBSPECTRUM_FULL_VERSION=libspectrum_full_version +LIBSPECTRUM_COPYRIGHT=libspectrum_copyright +LIBSPECTRUM_URL=libspectrum_url +AC_SUBST(LIBSPECTRUM_FULL_VERSION) +AC_SUBST(LIBSPECTRUM_COPYRIGHT) +AC_SUBST(LIBSPECTRUM_URL) + +dnl Definitions for config.h +AC_DEFINE([LIBSPECTRUM_RC_VERSION], [libspectrum_rc_version], + [Define version information for win32 dll library]) +AC_DEFINE([LIBSPECTRUM_COPYRIGHT], [libspectrum_copyright], + [Define copyright of libspectrum]) + +dnl Checks for programs. +AC_PROG_CC + +dnl Setup for compiling build tools (make-perl) +if test $cross_compiling = yes; then + AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) +else + CC_FOR_BUILD=$CC +fi +AC_MSG_CHECKING([for a C compiler for build tools]) +AC_MSG_RESULT([$CC_FOR_BUILD]) +AC_SUBST(CC_FOR_BUILD) + +LT_INIT +AC_PATH_PROG(PERL, perl) +AC_SUBST(PERL) + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(stdint.h strings.h unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Check for host specific programs +WINDRES_OBJ= +WINDRES_LDFLAGS= +case "$host_os" in + mingw32*) + AC_CHECK_TOOL([WINDRES], [windres], [no]) + if test "$WINDRES" != no; then + WINDRES_OBJ="windres.o" + WINDRES_LDFLAGS="-Xlinker windres.o" + fi + ;; +esac +AC_SUBST(WINDRES_OBJ) +AC_SUBST(WINDRES_LDFLAGS) + +dnl Check for big endianness +AC_C_BIGENDIAN + +dnl Check for functions +AC_CHECK_FUNCS(_snprintf _stricmp _strnicmp snprintf strcasecmp strncasecmp) + +dnl Allow the user to say that various libraries are in one place +AC_ARG_WITH(local-prefix, +[ --with-local-prefix=PFX local libraries installed in PFX (optional)], +CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib", +if test "$prefix" != "NONE"; then + CPPFLAGS="$CPPFLAGS -I$prefix/include"; LDFLAGS="$LDFLAGS -L$prefix/lib" +fi) + +dnl Check whether to use zlib (the UNIX version is called z, Win32 zdll) +AC_MSG_CHECKING(whether to use zlib) +AC_ARG_WITH(zlib, +[ --without-zlib don't use zlib], +if test "$withval" = no; then zlib=no; else zlib=yes; fi, +zlib=yes) +AC_MSG_RESULT($zlib) +if test "$zlib" = yes; then + AC_CHECK_HEADERS( + zlib.h, + AC_SEARCH_LIBS(compress2, z zdll) + ) +fi + +dnl Check whether to use libgcrypt +AC_MSG_CHECKING(whether to use libgcrypt) +AC_ARG_WITH(libgcrypt, +[ --without-libgcrypt don't use libgcrypt], +if test "$withval" = no; then libgcrypt=no; else libgcrypt=yes; fi, +libgcrypt=yes) +AC_MSG_RESULT($libgcrypt) +if test "$libgcrypt" = yes; then + AC_CHECK_HEADERS(gcrypt.h,LIBS="$LIBS -lgcrypt") +fi + +dnl Check whether to use libbz2 (1.0 or greater) +AC_MSG_CHECKING(whether to use libbz2) +AC_ARG_WITH(bzip2, +[ --without-bzip2 don't use libbz2], +if test "$withval" = no; then bzip2=no; else bzip2=yes; fi, +bzip2=yes) +AC_MSG_RESULT($bzip2) +if test "$bzip2" = yes; then + AC_CHECK_HEADER( + bzlib.h, + AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) + ) +fi + +dnl Either find glib or use the replacement +AC_MSG_CHECKING(whether to use glib) +AC_ARG_WITH(glib, +[ --without-glib don't use glib], +if test "$withval" = no; then glib=no; else glib=yes; fi, +glib=yes) +AC_MSG_RESULT($glib) +if test "$glib" = yes; then + PKG_CHECK_MODULES( + GLIB, + glib-2.0, + AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib]), + glib="no" + ) +fi + +AM_CONDITIONAL(USE_MYGLIB, test "$glib" = no) + +dnl If it appears we're using gcc as our compiler, turn on warnings +if test "$ac_cv_prog_gcc" = yes; then + CFLAGS="$CFLAGS -Wall" + dnl And possibly lots of warnings + AC_MSG_CHECKING(whether lots of warnings requested) + AC_ARG_ENABLE(warnings, + [ --enable-warnings give lots of warnings if using gcc], + if test "$enableval" = yes; then + warnings=yes; + else + warnings=no; + fi, + warnings=no) + AC_MSG_RESULT($warnings) + if test "$warnings" = yes; then + CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -W -Wsign-compare" + fi +fi + +dnl Check whether to use libaudiofile +AC_MSG_CHECKING(whether to use libaudiofile) +AC_ARG_WITH(libaudiofile, +[ --without-libaudiofile don't use libaudiofile], +if test "$withval" = no; then libaudiofile=no; else libaudiofile=yes; fi, +libaudiofile=yes) +AC_MSG_RESULT($libaudiofile) +if test "$libaudiofile" = yes; then + PKG_CHECK_MODULES( + AUDIOFILE, + audiofile, + AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile]), + [true] + ) + if test -z "$AUDIOFILE_LIBS"; then + AM_PATH_AUDIOFILE( + 0.2.3, + AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile]) + ) + fi +fi + +AC_CONFIG_FILES([ + Makefile + libspectrum.qpg +]) + +AC_OUTPUT Deleted: trunk/libspectrum/libspectrum/configure.in =================================================================== --- trunk/libspectrum/libspectrum/configure.in 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/configure.in 2012-12-06 11:55:57 UTC (rev 719) @@ -1,196 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Copyright (c) 1999-2008 Philip Kendall - -dnl $Id: configure.in 4416 2011-05-02 12:59:42Z fredm $ - -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License along -dnl with this program; if not, write to the Free Software Foundation, Inc., -dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -dnl -dnl Author contact information: -dnl -dnl E-mail: phi...@sh... - -AC_INIT(libspectrum.c) -AM_CONFIG_HEADER(config.h) - -define(LIBSPECTRUM_VERSION, [1.0.0]) - -dnl Use automake to produce `Makefile.in' -AM_INIT_AUTOMAKE(libspectrum, LIBSPECTRUM_VERSION) - -dnl Checks for programs. -AC_PROG_CC - -dnl Setup for compiling build tools (make-perl) -AC_MSG_CHECKING([for a C compiler for build tools]) -if test $cross_compiling = yes; then - AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) -else - CC_FOR_BUILD=$CC -fi -AC_MSG_RESULT([$CC_FOR_BUILD]) -AC_SUBST(CC_FOR_BUILD) - -AM_PROG_LIBTOOL -AC_PATH_PROG(PERL, perl) -AC_SUBST(PERL) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(stdint.h strings.h unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -dnl Check whether to use Windows resource file utility -AC_MSG_CHECKING(whether to use windres) -AC_ARG_WITH(windres, -[ --without-windres don't use windres], -if test "$withval" = no; then windres=no; else windres=yes; fi, -windres=yes) -AC_MSG_RESULT($windres) -if test "$windres" = yes; then - AC_CHECK_TOOL(WINDRES, windres, no) - AC_SUBST(WINDRES) - if test "$WINDRES" != no; then - WINDRES_OBJ="windres.o" - WINDRES_LDFLAGS="-Xlinker windres.o" - define(LIBSPECTRUM_FULL_VERSION, - [ifelse(translit(LIBSPECTRUM_VERSION, [0-9]), [.], [LIBSPECTRUM_VERSION[.0.0]], - translit(LIBSPECTRUM_VERSION, [0-9]), [..], [LIBSPECTRUM_VERSION[.0]], - [LIBSPECTRUM_VERSION])])dnl - AC_DEFINE([VERSION_WIN32], [translit(LIBSPECTRUM_FULL_VERSION, [.], [,])], [Define version information for win32 dll library]) - fi -fi -AC_SUBST(WINDRES_OBJ) -AC_SUBST(WINDRES_LDFLAGS) - -dnl Check for big endianness -AC_C_BIGENDIAN - -dnl Check for functions -AC_CHECK_FUNCS(_snprintf _stricmp _strnicmp snprintf strcasecmp strncasecmp) - -dnl Allow the user to say that various libraries are in one place -AC_ARG_WITH(local-prefix, -[ --with-local-prefix=PFX local libraries installed in PFX (optional)], -CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib", -if test "$prefix" != "NONE"; then - CPPFLAGS="$CPPFLAGS -I$prefix/include"; LDFLAGS="$LDFLAGS -L$prefix/lib" -fi) - -dnl Check whether to use zlib (the UNIX version is called z, Win32 zdll) -AC_MSG_CHECKING(whether to use zlib) -AC_ARG_WITH(zlib, -[ --without-zlib don't use zlib], -if test "$withval" = no; then zlib=no; else zlib=yes; fi, -zlib=yes) -AC_MSG_RESULT($zlib) -if test "$zlib" = yes; then - AC_CHECK_HEADERS( - zlib.h, - AC_SEARCH_LIBS(compress2, z zdll) - ) -fi - -dnl Check whether to use libgcrypt -AC_MSG_CHECKING(whether to use libgcrypt) -AC_ARG_WITH(libgcrypt, -[ --without-libgcrypt don't use libgcrypt], -if test "$withval" = no; then libgcrypt=no; else libgcrypt=yes; fi, -libgcrypt=yes) -AC_MSG_RESULT($libgcrypt) -if test "$libgcrypt" = yes; then - AC_CHECK_HEADERS(gcrypt.h,LIBS="$LIBS -lgcrypt") -fi - -dnl Check whether to use libbz2 (1.0 or greater) -AC_MSG_CHECKING(whether to use libbz2) -AC_ARG_WITH(bzip2, -[ --without-bzip2 don't use libbz2], -if test "$withval" = no; then bzip2=no; else bzip2=yes; fi, -bzip2=yes) -AC_MSG_RESULT($bzip2) -if test "$bzip2" = yes; then - AC_CHECK_HEADER( - bzlib.h, - AC_CHECK_LIB(bz2,BZ2_bzDecompressInit) - ) -fi - -dnl Either find glib or use the replacement -AC_MSG_CHECKING(whether to use glib) -AC_ARG_WITH(glib, -[ --without-glib don't use glib], -if test "$withval" = no; then glib=no; else glib=yes; fi, -glib=yes) -AC_MSG_RESULT($glib) -if test "$glib" = yes; then - glib2=no - AM_PATH_GLIB_2_0( - 2.0.0, - glib2=yes - AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib]) - LIBS="$LIBS `pkg-config --libs glib-2.0`", - ) - if test "$glib2" = no; then - AM_PATH_GLIB( - 1.2.0, - AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib]) - LIBS="$LIBS `glib-config --libs`", - glib=no - AC_MSG_WARN(glib not found - using internal replacement) - ) - fi -fi - -AM_CONDITIONAL(USE_MYGLIB, test "$glib" = no) - -dnl If it appears we're using gcc as our compiler, turn on warnings -if test "$ac_cv_prog_gcc" = yes; then - CFLAGS="$CFLAGS -Wall" - dnl And possibly lots of warnings - AC_MSG_CHECKING(whether lots of warnings requested) - AC_ARG_ENABLE(warnings, - [ --enable-warnings give lots of warnings if using gcc], - if test "$enableval" = yes; then - warnings=yes; - else - warnings=no; - fi, - warnings=no) - AC_MSG_RESULT($warnings) - if test "$warnings" = yes; then - CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Winline -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -W -Wsign-compare" - fi -fi - -dnl Check whether to use libaudiofile -AC_MSG_CHECKING(whether to use libaudiofile) -AC_ARG_WITH(libaudiofile, -[ --without-libaudiofile don't use libaudiofile], -if test "$withval" = no; then libaudiofile=no; else libaudiofile=yes; fi, -libaudiofile=yes) -AC_MSG_RESULT($libaudiofile) -if test "$libaudiofile" = yes; then - AM_PATH_AUDIOFILE( - 0.2.3, - AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile]) - ) -fi - -AC_OUTPUT( - Makefile - libspectrum.qpg -) Modified: trunk/libspectrum/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/libspectrum/hacking/ChangeLog 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/hacking/ChangeLog 2012-12-06 11:55:57 UTC (rev 719) @@ -875,3 +875,33 @@ (thanks, clang 2.1) (Fred). 20120220 make-perl.c: advertise that we support bzip2 compressed and wav files (part of patch #3413549) (Sergio Baldoví). +20120327 configure.in,Makefile.am,acinclude.m4: simplify detection of GLib + and drop support for version 1.x (patch #3508792) (Alberto Garcia) +20120327 configure.in: add support for audiofile 0.3.x (patch #3508658) (Alberto + Garcia). +20120506 make-perl.c,myglib/gslist.c: fix some const qualifiers for the data + argument to g_slist_remove and g_slist_find_custom (part of bug + #3514721) (Sergio Baldoví). +20120507 internals.h,libspectrum.c,libspectrum.h.in,make-perl.c,myglib/{ghash.c, + gslist.c}: add g_hash_table_new_full() and libspectrum_end() for memory + releasing (part of bug #3515269) (Sergio Baldoví). +20120916 Makefile.am: allow custom build flags for make-perl to address warning + from the debian build system (bug #3567469) (Sergio Baldoví). +20120928 szx.c: read all possible RAM pages from the snap (thanks, ketmar) + (Fred). +20121021 Makefile.am,acinclude.m4,autogen.sh,configure.ac,configure.in, + m4/audiofile.m4,windres.rc: modernise autoconf support (more from patch + #3575831) (Sergio). +20121026 configure.ac: fix the build when libaudiofile is not found and we are + using an old pkg-config/autoconf (bug #3579244) (Sergio). +20121107 Makefile.am: fix the build when source and build trees are different + (VPATH) (bug #3584527) (Sergio). +20121107 szx.c: fix potential calls to memcpy with a null pointer argument + (thanks, clang 4.1) (Fred). +20121107 libspectrum.c: fix potential leak of memory pointed to by + 'new_filename' (thanks, clang 4.1) (Fred). +20121126 memory.c,myglib/garray.c,windres.rc: fix hard-coded Id tags and add + missing properties (Sergio). +20121129 configure.ac: don't check for windres when not building for Windows + hosts. Remove --without-windres option, previously used as a workaround + (Sergio). Modified: trunk/libspectrum/libspectrum/internals.h =================================================================== --- trunk/libspectrum/libspectrum/internals.h 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/internals.h 2012-12-06 11:55:57 UTC (rev 719) @@ -2,7 +2,7 @@ routines, but not by user code Copyright (c) 2001-2008 Philip Kendall, Darren Salt - $Id: internals.h 4388 2011-04-27 12:52:26Z fredm $ + $Id: internals.h 4695 2012-05-07 02:03:10Z fredm $ 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 @@ -258,4 +258,14 @@ extern const int LIBSPECTRUM_BITS_IN_BYTE; +/* glib replacement functions */ + +#ifndef HAVE_LIB_GLIB /* Only if we are using glib replacement */ +void +libspectrum_slist_cleanup( void ); + +void +libspectrum_hashtable_cleanup( void ); +#endif /* #ifndef HAVE_LIB_GLIB */ + #endif /* #ifndef LIBSPECTRUM_INTERNALS_H */ Modified: trunk/libspectrum/libspectrum/libspectrum.c =================================================================== --- trunk/libspectrum/libspectrum/libspectrum.c 2012-12-06 10:27:01 UTC (rev 718) +++ trunk/libspectrum/libspectrum/libspectrum.c 2012-12-06 11:55:57 UTC (rev 719) @@ -1,7 +1,7 @@ /* libspectrum.c: Some general routines Copyright (c) 2001-2009 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.c 4539 2011-09-05 12:17:34Z fredm $ + $Id: libspectrum.c 4759 2012-11-07 12:01:50Z fredm $ 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 @@ -121,6 +121,15 @@ return LIBSPECTRUM_ERROR_NONE; } +void +libspectrum_end( void ) +{ +#ifndef HAVE_LIB_GLIB + libspectrum_slist_cleanup(); + libspectrum_hashtable_cleanup(); +#endif /* #ifndef HAVE_LIB_GLIB */ +} + #ifdef HAVE_GCRYPT_H static void gcrypt_log_handler( void *opaque, int level, const char *format, va_list ap ) @@ -463,10 +472,12 @@ error = libspectrum_iden... [truncated message content] |