Browse Source

AIX fixes

Bill Hoffman 23 years ago
parent
commit
3aa781ab6d
2 changed files with 13 additions and 1 deletions
  1. 12 0
      Source/CTest/Curl/CMakeLists.txt
  2. 1 1
      Source/CTest/Curl/config.h.in

+ 12 - 0
Source/CTest/Curl/CMakeLists.txt

@@ -9,6 +9,10 @@ SET(OPERATING_SYSTEM ${CMAKE_SYSTEM_NAME})
 SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
 SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
 
+IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
+  SET(_ALL_SOURCE 1)
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
+
 INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
 INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
@@ -308,6 +312,14 @@ IF(NOT HAVE_IN_ADDR_T)
   SET(in_addr_t "unsigned long")
 ENDIF(NOT HAVE_IN_ADDR_T)
 
+IF(NOT HAVE_LIBZ)
+  SET(HAVE_ZLIB_H 0)
+ENDIF(NOT HAVE_LIBZ)
+
+IF(NOT HAVE_ZLIB_H)
+  SET(HAVE_LIBZ 0)
+ENDIF(NOT HAVE_ZLIB_H)
+
 SET(HAVE_SOME_NONBLOCK 0)
 FOREACH(CURL_TEST
         HAVE_FIONBIO

+ 1 - 1
Source/CTest/Curl/config.h.in

@@ -469,7 +469,7 @@
    System headers sometimes define this.
    We just want to avoid a redefinition error message.  */
 #ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
+#cmakedefine _ALL_SOURCE ${_ALL_SOURCE}
 #endif
 
 /* Number of bits in a file offset, on hosts where this is settable. */