diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7d8284ec8f..3a5ec24809 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,37 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-14 11:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * bin/postinst.bat + * Minor internal cleanup. + + * bin/hb-mkdyn.bat + * config/lib.cf + ! Fix for gcc family. + ! Fixed to use /Y switch with move commands. + % Use automatically created .lib files instead of generating + them explicitly with pocc. + + Move .exp file to lib dir with pocc. + ! Three fixes for watcom .dll generation. + + * config/global.cf + + Plans added to cleanup lots of config vars with various names. + + Added central OpenSSL detection by the name HB_HAS_OPENSSL. + This makes it possible to use OpenSSL in core or in any contrib + without much hassle. + + * contrib/hbtip/Makefile + * contrib/hbssl/Makefile + + Relying on central OpenSSL detection logic. + ; TOFIX: For hbmk2 hbssl.hbc should be added explicitly to the + cmdline yet. + + * config/instsh.cf + * Suppressing install copy command for cleaner output. + + * ChangeLog + + Marked items [DONE] + 2009-08-14 09:42 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fix to prev fix. [I need a coffee I guess.] @@ -219,8 +250,10 @@ cleaner/leaner. ; TODO: Revise starter .sh scripts. ; TODO: mpkg_gnu.bat rework to run from postinst. [DONE] - ; TODO: Do some cleanup, remove redundancy in settings, etcetc. - ; TOFIX: Fix watcom .dll generation. + ; TODO: Do some cleanup, remove redundancy in settings, etcetc. [DONE] + ; TOFIX: Fix watcom .dll generation. [DONE - the rules are only + overridden for linux host builds, where .dll generation + isn't supported anyway, so I didn't touch it.] * config/global.cf ! Deleted double MAKE info line. @@ -1681,7 +1714,7 @@ ; TODO: If this works out okay, we can delete similar grouping options from .cf files. At the same time, core liblists could be moved to central place to ease maintenance - and guarantee correctness. + and guarantee correctness. [DONE] * utils/hbmk2/hbmk2.hbp * utils/hbrun/hbrun.hbp @@ -2208,7 +2241,7 @@ * contrib/hbssl/Makefile * contrib/hbbtree/Makefile % Using ':=' instead of '=' where possible. - ; TODO: Central make files (.cf). + ; TODO: Central make files (.cf). [DONE] * config/global.cf * config/bin.cf diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 9fa25fd6d9..4393e3cda3 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -18,9 +18,9 @@ rem NOTE: .prg files have to be compiled with -n1 rem NOTE: .c files have to be compiled with -DHB_DYNLIB if "%HB_ARCHITECTURE%" == "" ( echo ! HB_ARCHITECTURE needs to be set. && goto END ) -if "%HB_COMPILER%" == "" ( echo ! HB_COMPILER needs to be set. && goto END ) -if "%HB_BIN_INSTALL%" == "" ( echo ! HB_BIN_INSTALL needs to be set. && goto END ) -if "%HB_LIB_INSTALL%" == "" ( echo ! HB_LIB_INSTALL needs to be set. && goto END ) +if "%HB_COMPILER%" == "" ( echo ! HB_COMPILER needs to be set. && goto END ) +if "%HB_BIN_INSTALL%" == "" ( echo ! HB_BIN_INSTALL needs to be set. && goto END ) +if "%HB_LIB_INSTALL%" == "" ( echo ! HB_LIB_INSTALL needs to be set. && goto END ) set HB_DLL_VERSION=20 set HB_DLL_LIBS=source\common source\pp source\rtl source\macro source\lang source\codepage source\hbpcre source\hbzlib source\hbextern source\rdd source\rdd\dbfntx source\rdd\dbfnsx source\rdd\dbfcdx source\rdd\dbffpt source\rdd\hbsix source\rdd\hsx source\rdd\usrrdd source\rtl\gtcgi source\rtl\gtpca source\rtl\gtstd source\rtl\gtwvt source\rtl\gtgui @@ -28,7 +28,7 @@ set HB_DLL_LIBS_WIN=source\rtl\gtwin set HB_DLL_LIBS_ST=source\vm set HB_DLL_LIBS_MT=source\vm\vmmt set HB_DLL_LIBS_WATCOM=source\vm\maindllh -set HB_OBJ_EXT=.obj +set HB_OBJ_EXT=_dyn.obj set HB_OBJ_PREF= set HB_OBJ_POST= @@ -113,10 +113,10 @@ if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=wininet.lib ws2.lib echo ! Making %_DST_NAME_ST%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @"%_LIST_ST%" %_SYSLIBS% %HB_DLLLIBS% echo ! Making %_DST_NAME_MT%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @"%_LIST_MT%" %_SYSLIBS% %HB_DLLLIBS% -if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" -if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" -if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.exp" -if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.exp" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.exp" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.exp" del "%_LIST_ST%" del "%_LIST_MT%" @@ -165,8 +165,8 @@ echo. , "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll",, cw32mt.lib import32.lib %HB_DLLI echo ! Making %_DST_NAME_ST%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @%_LIST_ST% echo ! Making %_DST_NAME_MT%.dll... && ilink32 -q -Gn -C -aa -Tpd -Gi -x c0d32.obj @%_LIST_MT% -if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" -if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" del "%_LIST_ST%" del "%_LIST_MT%" @@ -182,11 +182,11 @@ set HB_OBJ_PREF=FILE ' set HB_OBJ_POST=' call :MAKE_LISTS -echo ! Making %_DST_NAME_ST%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' @"%_LIST_ST%" LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib -echo ! Making %_DST_NAME_MT%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' @"%_LIST_MT%" LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib +echo ! Making %_DST_NAME_ST%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll' @'%_LIST_ST%' LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib +echo ! Making %_DST_NAME_MT%.dll... && wlink OP QUIET SYS NT_DLL OP IMPLIB NAME '%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll' @'%_LIST_MT%' LIB user32.lib, ws2_32.lib, advapi32.lib, gdi32.lib -if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" -if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" del "%_LIST_ST%" del "%_LIST_MT%" @@ -206,8 +206,10 @@ if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=wininet.lib ws2.lib echo ! Making %_DST_NAME_ST%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @%_LIST_ST% %_SYSLIBS% %HB_DLLLIBS% echo ! Making %_DST_NAME_MT%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @%_LIST_MT% %_SYSLIBS% %HB_DLLLIBS% -polib "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" -polib "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.lib" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_ST%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_ST%.exp" +if exist "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" move /Y "%HB_BIN_INSTALL%\%_DST_NAME_MT%.exp" "%HB_LIB_INSTALL%\%_DST_NAME_MT%.exp" del "%_LIST_ST%" del "%_LIST_MT%" @@ -219,12 +221,12 @@ goto END echo ! Making .dlls for %HB_ARCHITECTURE% / %HB_COMPILER%... rem ; Extract neutral objects -for %%f in (%HB_DLL_LIBS% %HB_DLL_LIBS_WIN%) do ( +for %%f in (%HB_DLL_LIBS% %HB_DLL_LIBS_WIN% %HB_DLL_LIBS_WATCOM%) do ( if exist "%%f\%HB_OBJ_DIR%" ( echo ! Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%%p" == "hbpp_dyn%HB_OBJ_EXT%" ( + if not "%%p" == "hbpp%HB_OBJ_EXT%" ( echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" ) @@ -237,10 +239,10 @@ rem ; Extract ST objects for %%f in (%HB_DLL_LIBS_ST%) do ( if exist "%%f\%HB_OBJ_DIR%" ( echo ! Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%HB_COMPILER%-%%p" == "watcom-mainstd_dyn%HB_OBJ_EXT%" ( - if not "%HB_COMPILER%-%%p" == "watcom-mainwin_dyn%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainstd%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainwin%HB_OBJ_EXT%" ( echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_ST%" ) ) @@ -253,10 +255,10 @@ rem ; Extract MT objects for %%f in (%HB_DLL_LIBS_MT%) do ( if exist "%%f\%HB_OBJ_DIR%" ( echo ! Processing directory: %%f\%HB_OBJ_DIR% - dir /b "%%f\%HB_OBJ_DIR%\*_dyn%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" + dir /b "%%f\%HB_OBJ_DIR%\*%HB_OBJ_EXT%" > "%HB_BIN_INSTALL%\_hboraw.txt" for /F %%p in (%HB_BIN_INSTALL%\_hboraw.txt) do ( - if not "%HB_COMPILER%-%%p" == "watcom-mainstd_dyn%HB_OBJ_EXT%" ( - if not "%HB_COMPILER%-%%p" == "watcom-mainwin_dyn%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainstd%HB_OBJ_EXT%" ( + if not "%HB_COMPILER%-%%p" == "watcom-mainwin%HB_OBJ_EXT%" ( echo %HB_OBJ_PREF%%%f\%HB_OBJ_DIR%\%%p%HB_OBJ_POST%>> "%_LIST_MT%" ) ) diff --git a/harbour/bin/postinst.bat b/harbour/bin/postinst.bat index d6e152c94f..09daaec3bb 100644 --- a/harbour/bin/postinst.bat +++ b/harbour/bin/postinst.bat @@ -107,8 +107,10 @@ goto INST_%HB_ARCHITECTURE% "%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%HB_PKGPATH%.zip" . -i "%HB_PKGNAME%\*" -x *.tds -x *.exp popd - if not "%HB_ARCHITECTURE%" == "dos" echo ! Creating Harbour .exe install package: '%HB_PKGPATH%.exe' - if not "%HB_ARCHITECTURE%" == "dos" "%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0..\package\mpkg_win.nsi" + if "%HB_ARCHITECTURE%" == "dos" goto :EOF + + echo ! Creating Harbour .exe install package: '%HB_PKGPATH%.exe' + "%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0..\package\mpkg_win.nsi" goto :EOF diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 7131fe0c18..35486b4cfe 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -201,10 +201,24 @@ ifeq ($(HB_CONFIG_SHOWN),) ifneq ($(MAKE_381),) # Some additional ones to be given a standard name: - # HB_HOST_BUILD [yes|lib], HB_XBUILD, HB_WITHOUT_*, HB_REBUILD_PARSER, HB_DB_DRVEXT - # HB_COMMERCE, HB_CRS_LIB, HB_BUILD_VERBOSE, HB_BIN_COMPILE, HB_INC_COMPILE - # HB_POSTINST, HB_ROOTPOSTINST, HB_POSTINSTPARAM, HB_GCMODE - # HB_GPM_NOICE_DISABLE, HB_GT_CRS_BCEHACK, HB_NCURSES_194 + # HB_HOST_BUILD [yes|all|lib] -> HB_BUILD_LIBONLY (rest is redundant and can be controlled by other means) + # HB_XBUILD -> HB_INC_NODEFAULT ? + # HB_WITHOUT_* -> HB_HAS_* + # HB_REBUILD_PARSER -> HB_BUILD_PARSER + # HB_DB_DRVEXT -> - + # HB_COMMERCE + # HB_CRS_LIB + # HB_BUILD_VERBOSE ok + # HB_BIN_COMPILE + # HB_INC_COMPILE -> - + # HB_GPM_MOUSE -> HB_HAS_GPM + # HB_POSTINST + # HB_ROOTPOSTINST + # HB_POSTINSTPARAM + # HB_GCMODE + # HB_GPM_NOICE_DISABLE -> HB_USER_CFLAGS=-DHB_GPM_NOICE_DISABLE + # HB_GT_CRS_BCEHACK -> HB_USER_CFLAGS=-DHB_GT_CRS_BCEHACK + # HB_NCURSES_194 -> HB_USER_CFLAGS=-DHB_NCURSES_194 # Macros: # -DHB_PCRE_REGEX, -DHB_POSIX_REGEX, -DHB_EXT_ZLIB, -DHB_HAS_GPM @@ -704,6 +718,27 @@ ifeq ($(HB_COMMERCE),yes) export HB_WITHOUT_GTSLN := yes endif +# Detect OpenSSL +ifeq ($(HB_HAS_OPENSSL),) + HB_HAS_OPENSSL := no + ifneq ($(HB_ARCHITECTURE),dos) + ifneq ($(HB_COMPILER),watcom) + ifeq ($(HB_INC_OPENSSL),) + ifeq ($(HB_XBUILD),) + HB_INC_OPENSSL := /usr/include /usr/local/ssl/include + endif + endif + HB_INC_OPENSSL := $(strip $(foreach d,$(HB_INC_OPENSSL),$(if $(wildcard $(d)/openssl/ssl.h),$(d),))) + ifneq ($(HB_INC_OPENSSL),) + HB_HAS_OPENSSL := yes + export HB_INC_OPENSSL + endif + endif + endif + export HB_HAS_OPENSSL +endif + +# Detect GPM mouse lib ifeq ($(HB_GPM_MOUSE),) HB_GPM_MOUSE := no ifeq ($(HB_INC_GPM),) diff --git a/harbour/config/instsh.cf b/harbour/config/instsh.cf index 137f1745b0..7e9426a4d0 100644 --- a/harbour/config/instsh.cf +++ b/harbour/config/instsh.cf @@ -42,7 +42,7 @@ ifeq ($(HB_SHELL),nt) define inst_file_all -@if not exist "$(INSTALL_DIR_OS)" $(MDP) "$(INSTALL_DIR_OS)" - -for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" + -@for %%f in ($(INSTALL_FILES_OS)) do copy "%%f" "$(INSTALL_DIR_OS)" endef INSTALL_RULE = $(inst_file_all) @@ -60,7 +60,7 @@ ifeq ($(HB_SHELL),os2) # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every command will be separated by LF define inst_file - -$(CP) $(file) $(INSTALL_DIR_OS) + -@$(CP) $(file) $(INSTALL_DIR_OS) endef @@ -79,7 +79,7 @@ ifeq ($(HB_SHELL),dos) # NOTE: The empty line directly before 'endef' HAVE TO exist! # It causes that every command will be separated by LF define inst_file - -$(CP) $(file) $(INSTALL_DIR_OS) + -@$(CP) $(file) $(INSTALL_DIR_OS) endef diff --git a/harbour/config/lib.cf b/harbour/config/lib.cf index 44706f94dc..5300975923 100644 --- a/harbour/config/lib.cf +++ b/harbour/config/lib.cf @@ -7,7 +7,7 @@ include $(TOP)$(ROOT)config/global.cf ifneq ($(HB_ARCHITECTURE),) ifneq ($(HB_COMPILER),) -HB_DYN_LIBS := hbcommon hbpp hbrtl hbmacro hblang hbcpage hbpcre hbzlib hbextern hbrdd rddntx rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd gtcgi gtpca gtstd gtwvt gtgui gtwin hbvm hbvmmt maindllh +HB_DYN_LIBS := hbcommon hbpp hbrtl hbmacro hblang hbcpage hbpcre hbzlib hbextern hbrdd rddntx rddnsx rddcdx rddfpt hbsix hbhsx hbusrrdd gtcgi gtpca gtstd gtwvt gtgui gtwin hbvm hbvmmt hbmaindllh include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/$(HB_COMPILER).cf include $(TOP)$(ROOT)config/c.cf diff --git a/harbour/contrib/hbssl/Makefile b/harbour/contrib/hbssl/Makefile index 24bd65225b..4dad7798e8 100644 --- a/harbour/contrib/hbssl/Makefile +++ b/harbour/contrib/hbssl/Makefile @@ -8,29 +8,13 @@ include $(TOP)$(ROOT)config/global.cf LIBNAME := hbssl -HB_INC_OPENSSL_OK := - -ifneq ($(HB_ARCHITECTURE),dos) -ifneq ($(HB_COMPILER),watcom) - -ifeq ($(HB_INC_OPENSSL),) -ifeq ($(HB_XBUILD),) -HB_INC_OPENSSL := /usr/include /usr/local/ssl/include -endif -endif - -HB_INC_OPENSSL_OK := $(foreach d, $(HB_INC_OPENSSL), $(if $(wildcard $(d)/openssl/ssl.h),$(d),)) - -endif +ifeq ($(HB_HAS_OPENSSL),yes) +HB_USER_CFLAGS += -I$(HB_INC_OPENSSL) ifeq ($(HB_ARCHITECTURE),darwin) -HB_USER_CFLAGS += -DOPENSSL_NO_SHA256 -DOPENSSL_NO_SHA512 -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_DGRAM -DHB_OPENSSL_OLD_OSX_ + HB_USER_CFLAGS += -DOPENSSL_NO_SHA256 -DOPENSSL_NO_SHA512 -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_DGRAM -DHB_OPENSSL_OLD_OSX_ endif -ifneq ($(strip $(HB_INC_OPENSSL_OK)),) - -HB_USER_CFLAGS += $(foreach d, $(HB_INC_OPENSSL_OK), -I$(d)) - C_SOURCES := \ hbssl.c \ bio.c \ @@ -61,6 +45,3 @@ install:: else include $(TOP)$(ROOT)config/none.cf endif -else -include $(TOP)$(ROOT)config/none.cf -endif diff --git a/harbour/contrib/hbtip/Makefile b/harbour/contrib/hbtip/Makefile index b4e6db9b23..adb662508f 100644 --- a/harbour/contrib/hbtip/Makefile +++ b/harbour/contrib/hbtip/Makefile @@ -8,6 +8,11 @@ include $(TOP)$(ROOT)config/global.cf LIBNAME := hbtip +ifeq ($(HB_HAS_OPENSSL),yes) + HB_USER_PRGFLAGS += -DHB_HAS_OPENSSL + HB_INC_DEPEND := -I$(TOP)$(ROOT)contrib/hbssl +endif + ifneq ($(HB_ARCHITECTURE),dos) C_SOURCES := \