You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.8 KiB

  1. --- a/cmake/FindIconv.cmake
  2. +++ b/cmake/FindIconv.cmake
  3. @@ -9,10 +9,10 @@
  4. include(CheckCCompilerFlag)
  5. include(CheckCSourceCompiles)
  6. -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  7. +IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  8. # Already in cache, be silent
  9. SET(ICONV_FIND_QUIETLY TRUE)
  10. -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  11. +ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
  12. IF(APPLE)
  13. FIND_PATH(ICONV_INCLUDE_DIR iconv.h
  14. --- a/configure
  15. +++ b/configure
  16. @@ -33,6 +33,7 @@ Usage: ./configure [options]
  17. --enable-backup enable backup support
  18. --enable-win32 enable mingw crosscomilation
  19. --enable-protection enable compile time protections
  20. +--disable-iconv disable iconv support
  21. --without-gnapplet disable installation of gnapplet
  22. --without-completion disable installation of bash completion script
  23. @@ -57,6 +58,7 @@ CMAKE_CROSS=
  24. CMAKE_PROTECTION=
  25. CMAKE_GNAP=
  26. CMAKE_COMPLETE=
  27. +CMAKE_ICONV=
  28. # process command line
  29. while [ "$#" -gt 0 ] ; do
  30. @@ -91,6 +93,12 @@ while [ "$#" -gt 0 ] ; do
  31. --disable-protection)
  32. CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
  33. ;;
  34. + --enable-iconv)
  35. + CMAKE_ICONV="-DDISABLE_ICONV=OFF"
  36. + ;;
  37. + --disable-iconv)
  38. + CMAKE_ICONV="-DDISABLE_ICONV=ON"
  39. + ;;
  40. --enable-debug)
  41. CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
  42. ;;
  43. @@ -139,4 +147,4 @@ fi
  44. cd "$BUILD_DIR"
  45. # invoke cmake to do configuration
  46. -cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE
  47. +cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV