@@ -912,8 +912,9 @@ install_prereq() {
912
912
PREREQ_PACKAGES=" "
913
913
RHEL_MAJOR_VERSION_8=0
914
914
printf " Installing prerequisites for %s..." " $OS_DIST_INFO "
915
+ # libnewt-dev is needed for newt, which dahdi_tool requires. If it's not available, it won't get built.
915
916
if [ " $PAC_MAN " = " apt-get" ]; then
916
- PREREQ_PACKAGES=" $PREREQ_PACKAGES git patch gcc pkg-config autoconf automake m4 libtool build-essential"
917
+ PREREQ_PACKAGES=" $PREREQ_PACKAGES git patch gcc pkg-config autoconf automake m4 libtool build-essential libnewt-dev "
917
918
if [ " $1 " = " 1" ]; then
918
919
PREREQ_PACKAGES=" $PREREQ_PACKAGES curl subversion libcurl4-openssl-dev"
919
920
if [ " $ENHANCED_INSTALL " = " 1" ]; then
@@ -932,26 +933,26 @@ install_prereq() {
932
933
if [ -f /etc/redhat-release ] && [ " $RHEL_MAJOR_VERSION " = " 8" ]; then # RHEL or Rocky Linux major version 8
933
934
RHEL_MAJOR_VERSION_8=1
934
935
fi
935
- PREREQ_PACKAGES=" $PREREQ_PACKAGES git patch gcc gcc-c++ pkg-config autoconf automake m4 libtool"
936
+ PREREQ_PACKAGES=" $PREREQ_PACKAGES git patch gcc gcc-c++ pkg-config autoconf automake m4 libtool newt-devel "
936
937
if [ " $1 " = " 1" ]; then
937
938
PREREQ_PACKAGES=" $PREREQ_PACKAGES subversion libuuid-devel libxml2-devel sqlite-devel"
938
939
if [ $RHEL_MAJOR_VERSION_8 -eq 0 ]; then
939
940
PREREQ_PACKAGES=" $PREREQ_PACKAGES libedit-devel" # Required on Fedora, may fail initially on Rocky Linux 8.9
940
941
fi
941
942
fi
942
943
elif [ " $PAC_MAN " = " zypper" ]; then
943
- PREREQ_PACKAGES=" $PREREQ_PACKAGES git-core make patch gawk subversion bzip2 gcc-c++"
944
+ PREREQ_PACKAGES=" $PREREQ_PACKAGES git-core make patch gawk subversion bzip2 gcc-c++ newt-devel "
944
945
if [ " $1 " = " 1" ]; then
945
946
# TODO Some of these should be in Asterisk's install_prereq script
946
947
PREREQ_PACKAGES=" $PREREQ_PACKAGES libedit-devel libuuid-devel libxml2-devel sqlite3-devel"
947
948
fi
948
949
elif [ " $PAC_MAN " = " pacman" ]; then
949
- PREREQ_PACKAGES=" $PREREQ_PACKAGES git make patch gcc pkg-config autoconf automake m4 libtool"
950
+ PREREQ_PACKAGES=" $PREREQ_PACKAGES git make patch gcc pkg-config autoconf automake m4 libtool libnewt "
950
951
if [ " $1 " = " 1" ]; then
951
952
PREREQ_PACKAGES=" $PREREQ_PACKAGES subversion libedit"
952
953
fi
953
954
elif [ " $PAC_MAN " = " pkg" ]; then
954
- PREREQ_PACKAGES=" $PREREQ_PACKAGES git gmake"
955
+ PREREQ_PACKAGES=" $PREREQ_PACKAGES git gmake newt "
955
956
if [ " $1 " = " 1" ]; then
956
957
PREREQ_PACKAGES=" $PREREQ_PACKAGES curl subversion e2fsprogs-libuuid sqlite3 xmlstarlet libsysinfo"
957
958
if [ " $ENHANCED_INSTALL " = " 1" ]; then
@@ -1876,6 +1877,15 @@ install_dahdi() {
1876
1877
cp tonezone.h /usr/include/dahdi
1877
1878
fi
1878
1879
1880
+ # Ensure that dahdi_tool is installed, since it's not built if the prereqs weren't available at compile time.
1881
+ if ! which " dahdi_tool" > /dev/null; then
1882
+ echoerr " dahdi_tool does not appear to have been built successfully... newt development package missing?"
1883
+ if [ " $FORCE_INSTALL " != " 1" ] && [ " $PAC_MAN " != " pacman" ]; then
1884
+ # Even though we successfully install the newt dev package on Arch Linux, for some reason this still fails, so don't make it fatal on Arch
1885
+ exit 1
1886
+ fi
1887
+ fi
1888
+
1879
1889
# All right, here we go...
1880
1890
dahdi_scan -vvvvv
1881
1891
if [ ! -f /etc/dahdi/system.conf ]; then
0 commit comments