if (WIN32)
  if (CMAKE_BUILD_TYPE STREQUAL Debug) 
    set(LIB_SUF "d")
  endif (CMAKE_BUILD_TYPE STREQUAL Debug) 
else (WIN32) 
  set(LIB_SUF "")
endif (WIN32)

FIND_PATH(GMPXX_INCLUDE_DIR gmpxx.h /usr/include /usr/local/include)
FIND_LIBRARY(GMPXX_LIBRARY NAMES gmpxx${LIB_SUF} PATHS /usr/lib /usr/local/lib)

IF (GMPXX_INCLUDE_DIR AND GMPXX_LIBRARY)
   SET(GMPXX_FOUND TRUE)
ENDIF (GMPXX_INCLUDE_DIR AND GMPXX_LIBRARY)

IF (GMPXX_FOUND)
   IF (NOT Gmpxx_FIND_QUIETLY)
      MESSAGE(STATUS "Found Gmpxx: ${GMPXX_LIBRARY}")
   ENDIF (NOT Gmpxx_FIND_QUIETLY)
ELSE (GMPXX_FOUND)
   IF (Gmpxx_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find Gmpxx")
   ENDIF (Gmpxx_FIND_REQUIRED)
ENDIF (GMPXX_FOUND)
