# 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 CheckInfoPopper { # CheckInfoPopper # Check for InfoPopper and defined HAVE_INFOPOPPER according, it also defines # INFOPOPPER_INCLUDE_DIR and INFOPOPPER_LIBRARY_DIR with location of respectively # include and library files. HAVE_INFOPOPPER = ; INFOPOPPER_INCLUDE_DIR = ; INFOPOPPER_LIBRARY_DIR = ; local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/infopopper : InfoPopper.h ] ; if $(haveHeaders) { INFOPOPPER_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/infopopper ; local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libinfopopper.so ] ; if $(haveLibs) { INFOPOPPER_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ; Echo InfoPopper Headers: $(INFOPOPPER_INCLUDE_DIR) ; Echo InfoPopper Libs: $(INFOPOPPER_LIBRARY_DIR) ; } HAVE_INFOPOPPER = $(haveLibs) ; } }