Skip to content

Commit

Permalink
configure: trim HEADERS_LIST
Browse files Browse the repository at this point in the history
libexiv2 has its own EXV_HAVE_SYS_MMAN_H and EXV_HAVE_UNISTD_H

Switch NuppelVideoRecorder.cpp to __has_include().

Remove never defined HAVE_CONFIG_H in lirc_client.cpp.

MALLOC_PREFIX is only used in FFmpeg
  • Loading branch information
ulmus-scott committed Jan 1, 2025
1 parent e22ca3e commit 3029b22
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 119 deletions.
137 changes: 25 additions & 112 deletions mythtv/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1584,57 +1584,43 @@ HAVE_LIST_PUB="
fast_unaligned
"

HEADERS_LIST_BLURAY="
dirent_h
dlfcn_h
mntent_h
pthread_h
strings_h
sys_dl_h
sys_time_h
"

HEADERS_LIST_UDFREAD="
fcntl_h
pthread_h
unistd_h
"

HEADERS_LIST_DVDNAV="
dlfcn_h
sys_param_h
"

HEADERS_LIST_LIBMPEG2="
altivec_h
"

HEADERS_LIST="
altivec_h
arpa_inet_h
asm_types_h
d3d11_h
dispatch_dispatch_h
dev_bktr_ioctl_bt848_h
dev_bktr_ioctl_meteor_h
dev_ic_bt8xx_h
dev_video_bktr_ioctl_bt848_h
dev_video_meteor_ioctl_meteor_h
direct_h
dirent_h
dlfcn_h
dxgidebug_h
dxva_h
ES2_gl_h
EGL_egl_h
GLES2_gl2_h
fcntl_h
gsm_h
io_h
linux_videodev_h
linux_videodev2_h
mach_mach_time_h
machine_ioctl_bt848_h
machine_ioctl_meteor_h
mntent_h
opencv2_core_core_c_h
OpenGL_gl3_h
poll_h
pthread_h
soundcard_h
stdatomic_h
strings_h
sys_dl_h
sys_mman_h
sys_param_h
sys_resource_h
sys_select_h
sys_soundcard_h
sys_time_h
sys_un_h
termios_h
udplite_h
unistd_h
valgrind_valgrind_h
vulkan_vulkan_core_h
windows_h
winsock2_h
wayland_client_h
"

INTRINSICS_LIST="
Expand Down Expand Up @@ -1769,7 +1755,6 @@ MYTHTV_CONFIG_LIST='
'

MYTHTV_HAVE_LIST='
byteswap_h
bdj_j2me
fe_can_2g_modulation
ftime
Expand All @@ -1780,7 +1765,6 @@ MYTHTV_HAVE_LIST='
stdint_h
sync_file_range
close_range
sys_endian_h
'

MYTHTV_LIST='
Expand Down Expand Up @@ -4183,8 +4167,6 @@ case $target_os in
enabled x86_64 && objformat="macho64" || objformat="macho32"
enabled_any pic shared x86_64 ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
check_header dispatch/dispatch.h &&
add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore'
version_script='-exported_symbols_list'
VERSION_SCRIPT_POSTPROCESS_CMD='tr " " "\n" | sed -n /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E "s/(.+[^*])$$$$/\1*/"'
;;
Expand Down Expand Up @@ -5039,62 +5021,25 @@ check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwai
check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
check_builtin x264_csp_bgr x264.h X264_CSP_BGR

case "$custom_allocator" in
jemalloc)
# jemalloc by default does not use a prefix
require libjemalloc jemalloc/jemalloc.h malloc -ljemalloc
;;
tcmalloc)
require_pkg_config libtcmalloc libtcmalloc gperftools/tcmalloc.h tc_malloc
malloc_prefix=tc_
;;
esac

check_func gettimeofday

check_header d3d11.h
check_header direct.h
check_header dirent.h
check_header dlfcn.h
check_header dxgidebug.h
check_header dxva.h
check_header dxva2api.h -D_WIN32_WINNT=0x0600
check_header fcntl.h
check_header io.h
check_header mach/mach_time.h
check_header malloc.h
check_header mntent.h
check_func_headers mntent.h getmntent_r
check_header net/udplite.h
check_header poll.h
check_header pthread.h
check_header strings.h
check_header sys/dl.h
check_header sys/mman.h
check_header sys/param.h
check_header sys/resource.h
check_header sys/select.h
check_header sys/time.h
check_header sys/un.h
check_header termios.h
check_header unistd.h
check_header valgrind/valgrind.h
check_header vulkan/vulkan_core.h
check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
check_header windows.h
check_header asm/types.h
check_header linux/videodev.h
check_header linux/videodev2.h


# it seems there are versions of clang in some distros that try to use the
# gcc headers, which explodes for stdatomic
# so we also check that atomics actually work here
check_builtin stdatomic_h stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0)"

#Myth check for MYTHTV_HAVE_LIST
check_header byteswap.h
check_header sys/endian.h
check_header va/va.h
check_header va/va_x11.h
check_header va/va_glx.h
Expand All @@ -5105,10 +5050,6 @@ check_func_headers "sys/types.h sys/socket.h ifaddrs.h" getifaddrs
check_func_headers sys/time.h gettimeofday
#End MythTV check

check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
check_type "windows.h dxva.h" "DXVA_PicParams_VP9" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
check_type "windows.h d3d11.h" "ID3D11VideoContext"
check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602

check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
Expand Down Expand Up @@ -5440,15 +5381,6 @@ check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_def

check_type "dshow.h" IBaseFilter

# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
{ check_header dev/bktr/ioctl_meteor.h &&
check_header dev/bktr/ioctl_bt848.h; } ||
{ check_header machine/ioctl_meteor.h &&
check_header machine/ioctl_bt848.h; } ||
{ check_header dev/video/meteor/ioctl_meteor.h &&
check_header dev/video/bktr/ioctl_bt848.h; } ||
check_header dev/ic/bt8xx.h

if check_struct sys/soundcard.h audio_buf_info bytes; then
enable_safe sys/soundcard.h
else
Expand Down Expand Up @@ -6385,22 +6317,6 @@ for thread in $THREADS_LIST; do
fi
done

if disabled stdatomic_h; then
if enabled atomics_gcc; then
add_cppflags '-I\$(SRC_PATH)/compat/atomics/gcc'
elif enabled atomics_win32; then
add_cppflags '-I\$(SRC_PATH)/compat/atomics/win32'
elif enabled atomics_suncc; then
add_cppflags '-I\$(SRC_PATH)/compat/atomics/suncc'
elif enabled pthreads; then
add_compat atomics/pthread/stdatomic.o
add_cppflags '-I\$(SRC_PATH)/compat/atomics/pthread'
else
enabled threads && die "Threading is enabled, but no atomics are available"
add_cppflags '-I\$(SRC_PATH)/compat/atomics/dummy'
fi
fi

# Check if requested libraries were found.
for lib in $AUTODETECT_LIBS; do
requested $lib && ! enabled $lib && die "ERROR: $lib requested but not found";
Expand Down Expand Up @@ -7041,9 +6957,6 @@ EOF
test -n "$assert_level" &&
echo "#define ASSERT_LEVEL $assert_level" >>$TMPH

test -n "$malloc_prefix" &&
echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH

if enabled cygwin ; then
echo "#ifndef llrint" >> $TMPH
echo "#define llrint llrint // make sure not to define twice" >> $TMPH
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/recorders/NuppelVideoRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ extern "C" {

#define bswap_dbl(x) bswap_64(x)

#if HAVE_BYTESWAP_H
#if __has_include(<byteswap.h>)
# include <byteswap.h> /* bswap_16|32|64 */
#elif HAVE_SYS_ENDIAN_H
#elif __has_include(<sys/endian.h>)
# include <sys/endian.h>
# if !defined(bswap_16) && defined(bswap16)
# define bswap_16(x) bswap16(x)
Expand Down
5 changes: 0 additions & 5 deletions mythtv/libs/libmythui/devices/lirc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
*
* System wide LIRCRC support by Michal Svec <[email protected]>
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <array>
#include <cerrno>
#include <climits>
Expand Down

0 comments on commit 3029b22

Please sign in to comment.