]> git.sesse.net Git - vlc/blobdiff - extras/buildsystem/cmake/include/config.cmake
Don't link against yes. Of course it does not work anyway
[vlc] / extras / buildsystem / cmake / include / config.cmake
index 5425556d8b486f6045fce2354b3d4fd5e9c59cde..9cb3eab60bc04abe67cfca075b24c7d8901317d1 100644 (file)
@@ -22,6 +22,8 @@ vlc_check_include_files (netinet/in.h netinet/udplite.h)
 vlc_check_include_files (netdb.h fcntl.h sys/time.h poll.h)
 vlc_check_include_files (errno.h time.h)
 
+vlc_check_include_files (dlfcn.h dl.h)
+
 vlc_check_include_files (kernel/OS.h)
 vlc_check_include_files (mach-o/dyld.h)
 
@@ -73,11 +75,17 @@ if(NOT HAVE_GETADDRINFO)
     check_library_exists(getaddrinfo nsl "" HAVE_GETADDRINFO)
 endif(NOT HAVE_GETADDRINFO)
 
-find_library(HAVE_ICONV iconv)
+set(LIBICONV "")
+vlc_check_functions_exist(iconv)
+
+if(NOT HAVE_ICONV)
+    set(LIBICONV "iconv")
+    check_library_exists(iconv iconv "" HAVE_ICONV)
+endif(NOT HAVE_ICONV)
 # FIXME: this will break on *BSD:
-set( ICONV_CONST " " )
+set( ICONV_CONST "" )
 
-check_library_exists(dl dlopen "" HAVE_DL_DLOPEN)
+check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)
 
 ###########################################################
 # Other check
@@ -231,7 +239,9 @@ if(${LIBCDDB_FOUND})
   vlc_add_module_compile_flag(cdda ${LIBCDDB_CFLAGS} )
 endif(${LIBCDDB_FOUND})
 
+include (FindDlopen)
+set(HAVE_DL_DLOPEN ${Dlopen_FOUND})
+
 ###########################################################
 # Final configuration
 ###########################################################
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)