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.

56 lines
1.9 KiB

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