IF (USE_SCSL)

MARK_AS_ADVANCED(SCSL_INCLUDE_PATH SCSL_LIB)

SET(SCSL_INC_SEARCHPATH
  /usr/include
)

FIND_PATH(SCSL_INCLUDE_PATH scsl_fft.h ${SCSL_INC_SEARCHPATH})

IF(SCSL_INCLUDE_PATH)
  SET(SCSL_INCLUDE ${SCSL_INCLUDE_PATH})
ENDIF (SCSL_INCLUDE_PATH)
#MESSAGE(STATUS "INCLUDE PATH " ${SCSL_INCLUDE_PATH} )

FIND_LIBRARY(SCSL_LIB scs /usr/lib32 /usr/lib /usr/local/lib )

IF(SCSL_LIB)
        GET_FILENAME_COMPONENT(SCSL_LIBRARY_PATH ${SCSL_LIB} PATH)
ENDIF(SCSL_LIB)

#MESSAGE(STATUS "LIB PATH " ${SCSL_LIBRARY_PATH} )


IF(SCSL_INCLUDE)
  IF(SCSL_LIBRARY_PATH)
    SET(SCSL_FOUND 1)
  ENDIF (SCSL_LIBRARY_PATH)
ENDIF(SCSL_INCLUDE)

IF(SCSL_FOUND)
  INCLUDE_DIRECTORIES( ${SCSL_INCLUDE})
  LINK_DIRECTORIES( ${SCSL_LIBRARY_PATH} )
  ADD_DEFINITIONS(-DUSE_SCSL)
ENDIF (SCSL_FOUND)

ENDIF (USE_SCSL)
