Skip to content

Commit

Permalink
hpux
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Jan 2, 2018
1 parent 690cc72 commit a6de2f6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Expand Up @@ -32,6 +32,8 @@ SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)





# enable "make check"
enable_testing()
set(CMAKE_CTEST_COMMAND ctest -V)
Expand Down Expand Up @@ -60,6 +62,16 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
link_directories(/usr/local/lib)
endif()

# hpux
if (${CMAKE_SYSTEM_NAME} MATCHES "HP-UX")
set(HAVE_HPUX_OS 1)
add_definitions(-D_XOPEN_SOURCE_EXTENDED=1)
add_definitions(-D_INCLUDE_XOPEN_SOURCE_EXTENDED=1)
add_definitions(-D_INCLUDE_LONGLONG=1)
include_directories(/usr/local/include/)
link_directories(/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib )
link_libraries(dld intl)
endif()

INCLUDE(BareosFindPrograms)

Expand Down
2 changes: 1 addition & 1 deletion cmake/BareosFindAllLibraries.cmake
Expand Up @@ -67,7 +67,7 @@ INCLUDE(BareosFindLibrary)
BareosFindLibrary("util")
BareosFindLibrary("dl")
BareosFindLibrary("acl")
BareosFindLibrary("wrap")
#BareosFindLibrary("wrap")
BareosFindLibrary("gtest")
BareosFindLibrary("gtest_main")

Expand Down
15 changes: 15 additions & 0 deletions cmake/BareosSetVariableDefaults.cmake
Expand Up @@ -388,6 +388,21 @@ IF(NOT sqlite3)
ENDIF()
ENDIF()

IF(NOT mysql)
set(MYSQL_INCLUDE_DIR "")
endif()

IF(NOT postgresql)
set(PostgreSQL_INCLUDE_DIR "")
endif()

if(NOT Readline_LIBRARY)
set(Readline_LIBRARY "")
endif()

if(NOT LIBZ_FOUND)
set(ZLIB_LIBRARY "")
endif()

set(db_backends "")

Expand Down
2 changes: 2 additions & 0 deletions platforms/CMakeLists.txt
Expand Up @@ -26,6 +26,8 @@ IF(NOT client-only)

if (${DISTNAME} STREQUAL ubuntu)
add_subdirectory(debian)
elseif (${DISTNAME} STREQUAL hpux)
MESSAGE( STATUS "DISTNAME: " ${DISTNAME} )
else()
add_subdirectory(${DISTNAME})
endif()
Expand Down
1 change: 1 addition & 0 deletions src/findlib/attribs.cc
Expand Up @@ -50,6 +50,7 @@ void win_error(JCR *jcr, const char *prefix, POOLMEM *ofile);
/**
* For old systems that don't have lchown() use chown()
*/

#ifndef HAVE_LCHOWN
#define lchown chown
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/findlib/unittests/CMakeLists.txt
Expand Up @@ -20,7 +20,7 @@
include_directories(.. ../.. ../../include/)

set (TEST_SRC
// drivetype_test.cc
# drivetype_test.cc
fstype_test.cc
)

Expand Down
2 changes: 2 additions & 0 deletions src/include/bareos.h
Expand Up @@ -80,6 +80,8 @@

#ifdef HAVE_HPUX_OS
#undef HAVE_LCHMOD
#undef HAVE_LCHOWN
#undef HAVE_POSIX_FADVISE
#endif

#define _REENTRANT 1
Expand Down

0 comments on commit a6de2f6

Please sign in to comment.