Automatically detect if backtrace(3) needs -lexecinfo

This commit is contained in:
Christian Göttsche 2020-10-15 21:12:57 +02:00 committed by cgzones
parent 846fe8a71f
commit 1d00893110
2 changed files with 4 additions and 2 deletions

View File

@ -154,7 +154,6 @@ freebsd_platform_headers = \
zfs/openzfs_sysctl.h zfs/openzfs_sysctl.h
if HTOP_FREEBSD if HTOP_FREEBSD
AM_LDFLAGS += -lexecinfo
myhtopplatsources = freebsd/Platform.c freebsd/FreeBSDProcessList.c \ myhtopplatsources = freebsd/Platform.c freebsd/FreeBSDProcessList.c \
freebsd/FreeBSDProcess.c freebsd/Battery.c \ freebsd/FreeBSDProcess.c freebsd/Battery.c \
zfs/ZfsArcMeter.c zfs/ZfsCompressedArcMeter.c zfs/ZfsArcStats.c zfs/openzfs_sysctl.c zfs/ZfsArcMeter.c zfs/ZfsCompressedArcMeter.c zfs/ZfsArcStats.c zfs/openzfs_sysctl.c
@ -172,7 +171,7 @@ dragonflybsd_platform_headers = \
dragonflybsd/Battery.h dragonflybsd/Battery.h
if HTOP_DRAGONFLYBSD if HTOP_DRAGONFLYBSD
AM_LDFLAGS += -lkvm -lkinfo -lexecinfo AM_LDFLAGS += -lkvm -lkinfo
myhtopplatsources = dragonflybsd/Platform.c dragonflybsd/DragonFlyBSDProcessList.c \ myhtopplatsources = dragonflybsd/Platform.c dragonflybsd/DragonFlyBSDProcessList.c \
dragonflybsd/DragonFlyBSDProcess.c dragonflybsd/Battery.c dragonflybsd/DragonFlyBSDProcess.c dragonflybsd/Battery.c

View File

@ -92,6 +92,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[AC_MSG_ERROR([htop is written in C99. A newer compiler is required.])]) [AC_MSG_ERROR([htop is written in C99. A newer compiler is required.])])
CFLAGS="$save_cflags" CFLAGS="$save_cflags"
# Add -lexecinfo if needed
AC_SEARCH_LIBS([backtrace], [execinfo])
# Checks for features and flags. # Checks for features and flags.
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
PROCDIR=/proc PROCDIR=/proc