|
From: Duncan C. <dun...@us...> - 2005-01-16 21:42:07
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2106 Modified Files: ChangeLog configure.ac Log Message: Do a portability test for sizeof(void *) needed by c2hs's binary serialisation code. Do a versionitis test, the "auto libs" feature was only added in ghc 6, so conditionally define GHCPKG_USE_AUTOLIBS to have the appropriate value to substitute into all the <module>.pkg.in files. Index: configure.ac =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.ac,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- configure.ac 16 Jan 2005 14:36:37 -0000 1.19 +++ configure.ac 16 Jan 2005 21:41:56 -0000 1.20 @@ -60,6 +60,10 @@ AC_PATH_PROG(TOUCH,touch) AC_PROG_RANLIB +dnl The binary serialisation in c2hs depends on the machine word size +dnl FIXME: this should probably be taken from ghc's config.h +AC_CHECK_SIZEOF(void *, 4) + dnl On some systems (Solaris,...) asking sh for the current directory dnl (with a built-in pwd) and asking make for the current directory dnl gives different results. Thus, if possible, we use the same external @@ -181,6 +185,15 @@ ]) AC_MSG_RESULT([$FOUR_WORD_CALLBACK]) +dnl From ghc 6 onwards, ghc-pkg has the "auto libs" feature which means +dnl users do not have to specify the -package flag most of the time. +dnl All our packages support this mode now. +dnl Earlieir version of ghc-pkg choke on this package configuration option, +dnl hence this test which only enables it for ghc 6 onwards. +GTKHS_PROG_CHECK_VERSION($GHC_VERSION, -ge, 6.0.0, [ +GHCPKG_USE_AUTOLIBS="auto = True," +]) + dnl ghc-pkg 5 searches for libxxx.a, even on Windows. Hence, we need to dnl create libraries with these names instead of the windows names. GTKHS_PROG_CHECK_VERSION($GHC_VERSION, -lt, 6.0.0, [ @@ -568,6 +581,7 @@ AC_SUBST(EXTRA_HFILES) dnl Versionitis AC_SUBST(CREATE_TYPES) +AC_SUBST(GHCPKG_USE_AUTOLIBS) dnl Optional packages AC_SUBST(SOURCEVIEW_CFLAGS) AC_SUBST(SOURCEVIEW_LIBS) Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.302 retrieving revision 1.303 diff -u -d -r1.302 -r1.303 --- ChangeLog 16 Jan 2005 21:40:33 -0000 1.302 +++ ChangeLog 16 Jan 2005 21:41:56 -0000 1.303 @@ -53,6 +53,12 @@ sources since older ghc versions do not like them to be given in the source file in a an {-# OPTIONS #-} pragma. + * configure.ac: do a portability test for sizeof(void *) needed by + c2hs's binary serialisation code. Do a versionitis test, the "auto + libs" feature was only added in ghc 6, so conditionally define + GHCPKG_USE_AUTOLIBS to have the appropriate value to substitute into + all the <module>.pkg.in files. + 2005-01-15 Duncan Coutts <du...@co...> * mk/common.mk: change the way we find pacakge variables for files |