From eba19de1cde2a0c48dc58d23446175726db48d35 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Aug 2009 11:59:57 +0000 Subject: [PATCH] 2009-08-28 14:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * Updated Ubuntu external pkg list. + Added slang to darwin external pkg list. * config/darwin/libs.mk + Added two syslib paths required for slang (gtsln). * utils/hbmk2/hbmk2.prg ! Fixed to add user GTs before the list of user libs. This is to ensure proper linkage with linkers which need this (mingw f.e. and all which used lib grouping switches before they were removed from hbmk2/make in Harbour) * config/bin.mk * config/dyn.mk + Added new HB_LINKING_VMMT variable, which is set to non-empty if hbvmmt is to be linked. It makes it possible to add MT dependent libs to sys lib list, if needed. * config/linux/libs.mk + Adding pthread lib when HB_LINKING_VMMT is set. This isn't needed on my *nix systems (Ubuntu and Darwin), but was used for all platforms in postinst.sh dynlib creation logic, so please speak up if we should add this lib to other *nix platforms, or we can delete it from Linux. --- harbour/ChangeLog | 27 +++++++++++++++++++++++++++ harbour/INSTALL | 33 ++++++++++++++++----------------- harbour/config/bin.mk | 8 ++++++-- harbour/config/darwin/libs.mk | 1 + harbour/config/dyn.mk | 8 ++++++-- harbour/config/linux/libs.mk | 4 ++++ harbour/utils/hbmk2/hbmk2.prg | 7 ++++--- 7 files changed, 64 insertions(+), 24 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 359222a0f8..2a618e99ef 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,33 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-28 14:00 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + * Updated Ubuntu external pkg list. + + Added slang to darwin external pkg list. + + * config/darwin/libs.mk + + Added two syslib paths required for slang (gtsln). + + * utils/hbmk2/hbmk2.prg + ! Fixed to add user GTs before the list of user libs. + This is to ensure proper linkage with linkers which need + this (mingw f.e. and all which used lib grouping switches + before they were removed from hbmk2/make in Harbour) + + * config/bin.mk + * config/dyn.mk + + Added new HB_LINKING_VMMT variable, which is set to non-empty + if hbvmmt is to be linked. It makes it possible to add + MT dependent libs to sys lib list, if needed. + + * config/linux/libs.mk + + Adding pthread lib when HB_LINKING_VMMT is set. This isn't + needed on my *nix systems (Ubuntu and Darwin), but was used + for all platforms in postinst.sh dynlib creation logic, so + please speak up if we should add this lib to other *nix + platforms, or we can delete it from Linux. + 2009-08-28 08:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * bin/hb-func.sh ! Fixed recent mistake in gpm detection at postinst (now redundant) diff --git a/harbour/INSTALL b/harbour/INSTALL index 3d581d1af2..ac492ab339 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -249,14 +249,14 @@ HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD ----------------- 1.) Install MacPorts, follow their instructions: http://www.macports.org/ - 2.) sudo port install allegro freeimage gd2 mysql5-devel postgresql83 + 2.) sudo port install slang allegro freeimage gd2 mysql5-devel postgresql83 Linux (generic) --------------- For contrib/rddads lib: Download and install 'Advantage Client Engine API for Linux' package - (f.e. aceapi-9.00.0.0.tar.gz) + (f.e. aceapi-9.10.0.0.tar.gz) For contrib/hbhpdf lib: Download libharu from http://libharu.org/ -> './configure' -> 'make install' @@ -265,21 +265,20 @@ HOW TO ENABLE OPTIONAL COMPONENTS BEFORE BUILD ---------------------- (tested with Ubuntu 7.04, 8.04, 9.04) - for gtcrs terminal lib: sudo apt-get install libncurses-dev - for gtsln terminal lib: sudo apt-get install libslang2-dev - for gtxwc terminal lib: sudo apt-get install libx11-dev - for console mouse (GPM) support: sudo apt-get install libgpmg1-dev - for contrib/hbodbc lib: sudo apt-get install unixodbc-dev - for contrib/hbcurl lib: sudo apt-get install libcurl4-openssl-dev OR - sudo apt-get install libcurl4-gnutls-dev - for contrib/hbfbird lib: sudo apt-get install libfirebird2.0-dev OR - sudo apt-get install firebird2.1-dev - for contrib/hbfimage lib: sudo apt-get install libfreeimage-dev - for contrib/hbgd lib: sudo apt-get install libgd2-xpm-dev OR - sudo apt-get install libgd-xpm-dev - for contrib/hbmysql lib: sudo apt-get install libmysqlclient15-dev - for contrib/hbpgsql lib: sudo apt-get install libpq-dev - for contrib/hbqt lib: sudo apt-get install libqt4-dev + for gtcrs terminal lib: sudo apt-get install libncurses-dev + for gtsln terminal lib: sudo apt-get install libslang2-dev + for gtxwc terminal lib: sudo apt-get install libx11-dev + for console mouse support: sudo apt-get install libgpm-dev OR libgpmg1-dev + for contrib/hbodbc lib: sudo apt-get install unixodbc-dev + for contrib/hbcurl lib: sudo apt-get install libcurl4-openssl-dev + for contrib/hbfbird lib: sudo apt-get install firebird2.1-dev OR + sudo apt-get install libfirebird2.0-dev + for contrib/hbfimage lib: sudo apt-get install libfreeimage-dev + for contrib/hbgd lib: sudo apt-get install libgd2-xpm-dev OR + sudo apt-get install libgd-xpm-dev + for contrib/hbmysql lib: sudo apt-get install libmysqlclient15-dev + for contrib/hbpgsql lib: sudo apt-get install libpq-dev + for contrib/hbqt lib: sudo apt-get install libqt4-dev Linux (openSUSE) ---------------- diff --git a/harbour/config/bin.mk b/harbour/config/bin.mk index 0feaef997c..03b4e42982 100644 --- a/harbour/config/bin.mk +++ b/harbour/config/bin.mk @@ -52,10 +52,14 @@ HB_LIBS_TPL := _HB_RDD := _HB_VM := +HB_LINKING_RTL := +HB_LINKING_VMMT := + ifneq ($(filter hbrtl, $(LIBS)),) HB_LINKING_RTL := yes -else - HB_LINKING_RTL := + ifneq ($(filter hbvmmt, $(LIBS)),) + HB_LINKING_VMMT := yes + endif endif -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk diff --git a/harbour/config/darwin/libs.mk b/harbour/config/darwin/libs.mk index 7397415f61..d6db25fc6a 100644 --- a/harbour/config/darwin/libs.mk +++ b/harbour/config/darwin/libs.mk @@ -18,6 +18,7 @@ ifneq ($(HB_LINKING_RTL),) ifneq ($(HB_HAS_CURSES),) SYSLIBS += $(HB_CRS_LIB) endif + SYSLIBPATHS += /sw/lib /opt/local/lib endif ifneq ($(HB_HAS_X11),) SYSLIBS += X11 diff --git a/harbour/config/dyn.mk b/harbour/config/dyn.mk index a16513e8cb..b7912625d4 100644 --- a/harbour/config/dyn.mk +++ b/harbour/config/dyn.mk @@ -7,10 +7,14 @@ include $(TOP)$(ROOT)config/global.mk ifneq ($(HB_PLATFORM),) ifneq ($(HB_COMPILER),) +HB_LINKING_RTL := +HB_LINKING_VMMT := + ifneq ($(DYNNAME),) HB_LINKING_RTL := yes -else - HB_LINKING_RTL := + ifneq ($(findstring vmmt, $(DYNDIRLIST)),) + HB_LINKING_VMMT := yes + endif endif -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk diff --git a/harbour/config/linux/libs.mk b/harbour/config/linux/libs.mk index 58cae89c10..727e67d751 100644 --- a/harbour/config/linux/libs.mk +++ b/harbour/config/linux/libs.mk @@ -33,6 +33,10 @@ ifneq ($(HB_LINKING_RTL),) SYSLIBS += z endif SYSLIBS += rt dl + # Don't seem to be needed here, but added it for reference to move/copy it to *nix platforms where this is required + ifneq ($(HB_LINKING_VMMT),) + SYSLIBS += pthread + endif endif SYSLIBS += m diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 86a72871b3..40d8dad228 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1902,7 +1902,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) ENDIF /* Merge user libs from command line and envvar. Command line has priority. */ - hbmk[ _HBMK_aLIBUSER ] := ArrayAJoin( { hbmk[ _HBMK_aLIBUSER ], hbmk[ _HBMK_aLIBUSERGT ], ListToArray( PathSepToTarget( hbmk, GetEnv( "HB_USER_LIBS" ) ) ) } ) + hbmk[ _HBMK_aLIBUSER ] := ArrayAJoin( { hbmk[ _HBMK_aLIBUSERGT ], hbmk[ _HBMK_aLIBUSER ], ListToArray( PathSepToTarget( hbmk, GetEnv( "HB_USER_LIBS" ) ) ) } ) DEFAULT hbmk[ _HBMK_lSHAREDDIST ] TO lSysLoc @@ -1968,8 +1968,9 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) /* Assemble library list */ IF ! Empty( hbmk[ _HBMK_cGT ] ) .AND. !( Lower( hbmk[ _HBMK_cGT ] ) == "gtnul" ) - IF AScan( hbmk[ _HBMK_aLIBCOREGT ], {|tmp| Lower( tmp ) == Lower( hbmk[ _HBMK_cGT ] ) } ) == 0 - AAdd( hbmk[ _HBMK_aLIBCOREGT ], hbmk[ _HBMK_cGT ] ) + IF AScan( hbmk[ _HBMK_aLIBCOREGT ], {|tmp| Lower( tmp ) == Lower( hbmk[ _HBMK_cGT ] ) } ) == 0 .AND. ; + AScan( hbmk[ _HBMK_aLIBUSERGT ], {|tmp| Lower( tmp ) == Lower( hbmk[ _HBMK_cGT ] ) } ) == 0 + AAdd( hbmk[ _HBMK_aLIBUSERGT ], hbmk[ _HBMK_cGT ] ) ENDIF ENDIF