- --- a/cmake/FindIconv.cmake
- +++ b/cmake/FindIconv.cmake
- @@ -9,10 +9,10 @@
- include(CheckCCompilerFlag)
- include(CheckCSourceCompiles)
-
- -IF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- +IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- # Already in cache, be silent
- SET(ICONV_FIND_QUIETLY TRUE)
- -ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
- +ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
-
- IF(APPLE)
- FIND_PATH(ICONV_INCLUDE_DIR iconv.h
- --- a/configure
- +++ b/configure
- @@ -33,6 +33,7 @@ Usage: ./configure [options]
- --enable-backup enable backup support
- --enable-win32 enable mingw crosscomilation
- --enable-protection enable compile time protections
- +--disable-iconv disable iconv support
- --without-gnapplet disable installation of gnapplet
- --without-completion disable installation of bash completion script
-
- @@ -57,6 +58,7 @@ CMAKE_CROSS=
- CMAKE_PROTECTION=
- CMAKE_GNAP=
- CMAKE_COMPLETE=
- +CMAKE_ICONV=
-
- # process command line
- while [ "$#" -gt 0 ] ; do
- @@ -91,6 +93,12 @@ while [ "$#" -gt 0 ] ; do
- --disable-protection)
- CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF"
- ;;
- + --enable-iconv)
- + CMAKE_ICONV="-DDISABLE_ICONV=OFF"
- + ;;
- + --disable-iconv)
- + CMAKE_ICONV="-DDISABLE_ICONV=ON"
- + ;;
- --enable-debug)
- CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug"
- ;;
- @@ -139,4 +147,4 @@ fi
- cd "$BUILD_DIR"
-
- # invoke cmake to do configuration
- -cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE
- +cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV
|