<commit_before>INCLUDE_ONCE_MACRO(GLUT)

if(APPLE)
  message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
  retunr()
endif()

SETUP_SUPERBUILD(GLUT)

ExternalProject_Add(GLUT
  PREFIX GLUT
  URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
  URL_MD5 918ffbddcffbac83c218bc52355b6d5a
  BINARY_DIR ${GLUT_SB_BUILD_DIR}
  INSTALL_DIR ${SB_INSTALL_PREFIX}
  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
  PATCH_COMMAND ${CMAKE_COMMAND} -E copy
  ${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
  ${GLUT_SB_SRC}
  CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
  CMAKE_COMMAND ${SB_CMAKE_COMMAND}
  )

set(_SB_GLUT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
  set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut.lib)
elseif(UNIX)
  set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
<commit_msg>BUG: mantis-1274: use autoconf on *nix. cmake build isn't mature<commit_after>INCLUDE_ONCE_MACRO(GLUT)

if(APPLE)
  message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
  return()
endif()

SETUP_SUPERBUILD(GLUT)

if(UNIX)
set(GLUT_PATCH_COMMAND ${CMAKE_COMMAND}
  -E copy
  ${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
  ${GLUT_SB_SRC}
)
  
set(GLUT_CONFIGURE_COMMAND  "${SB_ENV_CONFIGURE_CMD};${GLUT_SB_SRC}/configure" )

else(MSVC)
  set(GLUT_PATCH_COMMAND)
  set(GLUT_CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${SB_CMAKE_CACHE_ARGS})
endif()

ExternalProject_Add(GLUT
  PREFIX GLUT
  URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
  URL_MD5 918ffbddcffbac83c218bc52355b6d5a
  BINARY_DIR ${GLUT_SB_BUILD_DIR}
  INSTALL_DIR ${SB_INSTALL_PREFIX}
  DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
  PATCH_COMMAND ${GLUT_PATCH_COMMAND}
  CONFIGURE_COMMAND ${GLUT_CONFIGURE_COMMAND}
  )

set(_SB_GLUT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
  set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut.lib)
elseif(UNIX)
  set(_SB_GLUT_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()

{'fraction_non_alphanumeric': 0.11255411255411256, 'fraction_numerical': 0.02886002886002886, 'mean_word_length': 7.062015503875969, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2347133', 'n_tokens_mistral': 968, 'n_tokens_neox': 888, 'n_words': 114}