<commit_before># - Try to find Libsmbclient
# Once done this will define
#
#  LIBSMBCLIENT_FOUND - system has Libsmbclient
#  LIBSMBCLIENT_INCLUDE_DIRS - the Libsmbclient include directory
#  LIBSMBCLIENT_LIBRARIES - Link these to use Libsmbclient
#  LIBSMBCLIENT_DEFINITIONS - Compiler switches required for using Libsmbclient
#
#  Copyright (c) 2006 <NAME> <<EMAIL>>
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#


if (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)
  # in cache already
  set(LIBSMBCLIENT_FOUND TRUE)
else (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)
  find_path(LIBSMBCLIENT_INCLUDE_DIR
    NAMES
      libsmbclient.h
    PATHS
      /usr/include
      /usr/local/include
      /opt/local/include
      /sw/include
  )

  find_library(SMBCLIENT_LIBRARY
    NAMES
      smbclient
    PATHS
      /usr/lib
      /usr/local/lib
      /opt/local/lib
      /sw/lib
  )

  if (SMBCLIENT_LIBRARY)
    set(SMBCLIENT_FOUND TRUE)
  endif (SMBCLIENT_LIBRARY)

  set(LIBSMBCLIENT_INCLUDE_DIRS
    ${LIBSMBCLIENT_INCLUDE_DIR}
  )

  if (SMBCLIENT_FOUND)
    set(LIBSMBCLIENT_LIBRARIES
      ${LIBSMBCLIENT_LIBRARIES}
      ${SMBCLIENT_LIBRARY}
    )
  endif (SMBCLIENT_FOUND)

  if (LIBSMBCLIENT_INCLUDE_DIRS AND LIBSMBCLIENT_LIBRARIES)
     set(LIBSMBCLIENT_FOUND TRUE)
  endif (LIBSMBCLIENT_INCLUDE_DIRS AND LIBSMBCLIENT_LIBRARIES)

  if (LIBSMBCLIENT_FOUND)
    if (NOT Libsmbclient_FIND_QUIETLY)
      message(STATUS "Found Libsmbclient: ${LIBSMBCLIENT_LIBRARIES}")
    endif (NOT Libsmbclient_FIND_QUIETLY)
  else (LIBSMBCLIENT_FOUND)
    if (Libsmbclient_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find Libsmbclient")
    endif (Libsmbclient_FIND_REQUIRED)
  endif (LIBSMBCLIENT_FOUND)

  # show the LIBSMBCLIENT_INCLUDE_DIRS and LIBSMBCLIENT_LIBRARIES variables only in the advanced view
  mark_as_advanced(LIBSMBCLIENT_INCLUDE_DIRS LIBSMBCLIENT_LIBRARIES)

endif (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)
<commit_msg>cmake: Use pkg-config for libsmbclient.<commit_after># - Try to find Libsmbclient
# Once done this will define
#
#  LIBSMBCLIENT_FOUND - system has Libsmbclient
#  LIBSMBCLIENT_INCLUDE_DIRS - the Libsmbclient include directory
#  LIBSMBCLIENT_LIBRARIES - Link these to use Libsmbclient
#  LIBSMBCLIENT_DEFINITIONS - Compiler switches required for using Libsmbclient
#
#  Copyright (c) 2013 <NAME> <<EMAIL>>
#
#  Redistribution and use is allowed according to the terms of the New
#  BSD license.
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#


if (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)
  # in cache already
  set(LIBSMBCLIENT_FOUND TRUE)
else (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)
  find_package(PkgConfig)
  if (PKG_CONFIG_FOUND)
    pkg_check_modules(_LIBSMBCLIENT smbclient)
  endif (PKG_CONFIG_FOUND)

  find_path(LIBSMBCLIENT_INCLUDE_DIR
    NAMES
      libsmbclient.h
    PATHS
      ${_LIBSMBCLIENT_INCLUDEDIR}
    PATH_SUFFIXES
      samba-4.0
  )

  find_library(SMBCLIENT_LIBRARY
    NAMES
      smbclient
    PATHS
      ${_LIBSMBCLIENT_LIBDIR}
  )

  set(LIBSMBCLIENT_INCLUDE_DIRS
    ${LIBSMBCLIENT_INCLUDE_DIR}
  )

  if (SMBCLIENT_LIBRARY)
    set(LIBSMBCLIENT_LIBRARIES
        ${LIBSMBCLIENT_LIBRARIES}
        ${SMBCLIENT_LIBRARY}
    )
  endif (SMBCLIENT_LIBRARY)

  include(FindPackageHandleStandardArgs)
  find_package_handle_standard_args(Libsmbclient DEFAULT_MSG LIBSMBCLIENT_LIBRARIES LIBSMBCLIENT_INCLUDE_DIRS)

  # show the LIBSMBCLIENT_INCLUDE_DIRS and LIBSMBCLIENT_LIBRARIES variables only in the advanced view
  mark_as_advanced(LIBSMBCLIENT_INCLUDE_DIRS LIBSMBCLIENT_LIBRARIES)

endif (LIBSMBCLIENT_LIBRARIES AND LIBSMBCLIENT_INCLUDE_DIRS)

{'fraction_non_alphanumeric': 0.05706021561924796, 'fraction_numerical': 0.0026295030239284773, 'mean_word_length': 4.4498567335243555, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1670428', 'n_tokens_mistral': 1502, 'n_tokens_neox': 1427, 'n_words': 279}