107 lines
2.8 KiB
Plaintext
107 lines
2.8 KiB
Plaintext
# 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.
|
|
local haveLibStdC++.R4 = [ Glob /boot/develop/lib/x86 : libstdc++.r4.so ] ;
|
|
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 = ;
|
|
|
|
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/openssl : ssl.h ] ;
|
|
if $(haveHeaders) {
|
|
OPENSSL_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/openssl ;
|
|
|
|
local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libssl.so ] ;
|
|
if $(haveLibs) {
|
|
OPENSSL_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
|
|
|
|
Echo OpenSSL Headers: $(OPENSSL_INCLUDE_DIR) ;
|
|
Echo OpenSSL Libs: $(OPENSSL_LIBRARY_DIR) ;
|
|
}
|
|
|
|
HAVE_OPENSSL = $(haveLibs) ;
|
|
}
|
|
}
|
|
|
|
rule CheckLibYahoo2
|
|
{
|
|
# CheckLibYahoo2
|
|
# Check for LibYahoo2 and defined HAVE_LIBYAHOO2 according, it also defines
|
|
# LIBYAHOO2_INCLUDE_DIR and LIBYAHOO2_LIBRARY_DIR with location of respectively
|
|
# include and library files.
|
|
|
|
HAVE_LIBYAHOO2 = ;
|
|
LIBYAHOO2_INCLUDE_DIR = ;
|
|
LIBYAHOO2_LIBRARY_DIR = ;
|
|
|
|
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/libyahoo2 : yahoo2.h ] ;
|
|
if $(haveHeaders) {
|
|
LIBYAHOO2_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/libyahoo2 ;
|
|
|
|
local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libyahoo2.so ] ;
|
|
if $(haveLibs) {
|
|
LIBYAHOO2_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
|
|
|
|
Echo Yahoo Headers: $(LIBYAHOO2_INCLUDE_DIR) ;
|
|
Echo Yahoo Libs: $(LIBYAHOO2_LIBRARY_DIR) ;
|
|
}
|
|
|
|
HAVE_LIBYAHOO2 = $(haveLibs) ;
|
|
}
|
|
}
|
|
|
|
rule CheckCaya
|
|
{
|
|
# CheckCaya
|
|
# Check for Caya and defined HAVE_CAYA according, it also defines
|
|
# CAYA_INCLUDE_DIR and CAYA_LIBRARY_DIR with location of respectively
|
|
# include and library files.
|
|
|
|
HAVE_CAYA = ;
|
|
CAYA_INCLUDE_DIR = ;
|
|
CAYA_LIBRARY_DIR = ;
|
|
|
|
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/caya : CayaProtocol.h ] ;
|
|
if $(haveHeaders) {
|
|
CAYA_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/caya ;
|
|
|
|
# local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libinfopopper.so ] ;
|
|
# if $(haveLibs) {
|
|
# CAYA_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
|
|
|
|
Echo Caya Headers: $(CAYA_INCLUDE_DIR) ;
|
|
# Echo Caya Libs: $(CAYA_LIBRARY_DIR) ;
|
|
# }
|
|
|
|
# HAVE_CAYA = $(haveLibs) ;
|
|
}
|
|
|
|
HAVE_CAYA = $(haveHeaders) ;
|
|
}
|