2010-05-07 04:47:10 -05:00
|
|
|
# CheckRules
|
|
|
|
#
|
|
|
|
# Common checks.
|
|
|
|
|
|
|
|
rule CheckGccPlatform
|
|
|
|
{
|
|
|
|
# CheckGccPlatform ;
|
|
|
|
# Detects if we are using gcc4 and set IS_GCC4_PLATFORM according.
|
|
|
|
|
|
|
|
# First find out which gcc version the platform uses.
|
|
|
|
IS_GCC4_PLATFORM = ;
|
|
|
|
if $(OS) = HAIKU {
|
|
|
|
# Only Haiku might use gcc 4. We use the existence of a libstdc++.r4.so in
|
|
|
|
# /boot/develop/lib/x86 to judge whether this is a BeOS compatible and thus
|
|
|
|
# gcc 2 platform. This is not entirely correct, but should be good enough
|
|
|
|
# for the time being.
|
2013-10-12 12:59:00 -05:00
|
|
|
local haveLibStdC++.R4 = [ Glob /boot/system/develop/tools/lib : libstdc++.r4.so ] ;
|
2010-05-07 04:47:10 -05:00
|
|
|
if ! $(haveLibStdC++.R4) {
|
|
|
|
IS_GCC4_PLATFORM = 1 ;
|
|
|
|
Echo Using GCC4 platform ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rule CheckOpenSSL
|
|
|
|
{
|
|
|
|
# CheckOpenSSL ;
|
|
|
|
# Check for OpenSSL and defined HAVE_OPENSSL according, it also defines
|
|
|
|
# OPENSSL_INCLUDE_DIR and OPENSSL_LIBRARY_DIR with location of respectively
|
|
|
|
# include and library files.
|
|
|
|
|
|
|
|
HAVE_OPENSSL = ;
|
|
|
|
OPENSSL_INCLUDE_DIR = ;
|
|
|
|
OPENSSL_LIBRARY_DIR = ;
|
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
local haveHeaders = [ Glob $(USER_INCLUDE_DIRECTORY)/openssl : ssl.h ] ;
|
2010-05-07 04:47:10 -05:00
|
|
|
if $(haveHeaders) {
|
2013-10-12 12:59:00 -05:00
|
|
|
OPENSSL_INCLUDE_DIR = $(USER_INCLUDE_DIRECTORY) ;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
local haveLibs = [ Glob $(USER_LIB_DIRECTORY) : libssl.so ] ;
|
2010-05-07 04:47:10 -05:00
|
|
|
if $(haveLibs) {
|
2013-10-12 12:59:00 -05:00
|
|
|
OPENSSL_LIBRARY_DIR = $(USER_LIB_DIRECTORY) ;
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
Echo OpenSSL Headers: $(OPENSSL_INCLUDE_DIR) ;
|
|
|
|
Echo OpenSSL Libs: $(OPENSSL_LIBRARY_DIR) ;
|
|
|
|
}
|
|
|
|
HAVE_OPENSSL = $(haveLibs) ;
|
|
|
|
}
|
|
|
|
}
|
2010-07-10 08:37:58 -05:00
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
rule CheckExpat
|
2010-07-10 08:37:58 -05:00
|
|
|
{
|
2013-10-12 12:59:00 -05:00
|
|
|
HAVE_EXPAT = ;
|
|
|
|
EXPAT_INCLUDE_DIR = ;
|
|
|
|
EXPAT_LIBRARY_DIR = ;
|
2010-07-10 08:37:58 -05:00
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
local haveHeaders = [ Glob $(USER_INCLUDE_DIRECTORY)/ : expat.h ] ;
|
2010-07-10 08:37:58 -05:00
|
|
|
if $(haveHeaders) {
|
2013-10-12 12:59:00 -05:00
|
|
|
EXPAT_INCLUDE_DIR = $(USER_INCLUDE_DIRECTORY)/ ;
|
2010-07-10 08:37:58 -05:00
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
local haveLibs = [ Glob $(USER_LIB_DIRECTORY) : libexpat.so ] ;
|
2010-07-10 08:37:58 -05:00
|
|
|
if $(haveLibs) {
|
2013-10-12 12:59:00 -05:00
|
|
|
EXPAT_LIBRARY_DIR = $(USER_LIB_DIRECTORY) ;
|
2010-07-10 08:37:58 -05:00
|
|
|
|
2013-10-12 12:59:00 -05:00
|
|
|
Echo Expat Headers: $(EXPAT_INCLUDE_DIR) ;
|
|
|
|
Echo Expat Libs: $(EXPAT_LIBRARY_DIR) ;
|
2010-07-10 08:37:58 -05:00
|
|
|
}
|
2013-10-12 12:59:00 -05:00
|
|
|
HAVE_EXPAT = $(haveLibs) ;
|
2010-07-10 08:37:58 -05:00
|
|
|
}
|
|
|
|
}
|