--- Makefile (Asterisk 13.20) +++ Makefile (working copy) @@ -934,2 +934,6 @@ ./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk "$(DESTDIR)/etc/init.d/asterisk"; \ + elif [ -f /etc/slackware-version ]; then \ + ./build_tools/install_subst contrib/init.d/rc.slackware.asterisk "$(DESTDIR)/etc/rc.d/rc.asterisk"; \ + elif [ -f /etc/os-release ] && [ "slackware" = "$(shell . /etc/os-release && echo $$ID)" ] ; then \ + ./build_tools/install_subst contrib/init.d/rc.slackware.asterisk "$(DESTDIR)/etc/rc.d/rc.asterisk"; \ elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \ @@ -941,4 +945,2 @@ fi; \ - elif [ -f /etc/slackware-version ]; then \ - echo "Slackware is not currently supported, although an init script does exist for it."; \ else \ --- contrib/scripts/install_prereq (Asterisk 13.20) +++ contrib/scripts/install_prereq (working copy) @@ -193 +193,5 @@ - echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf + if test -d /etc/ld.so.conf.d; then + echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf + else # for example: Slackware 14.2 + echo "/usr/local/lib" > /etc/ld.so.conf + fi @@ -206 +210,5 @@ - echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf + if test -d /etc/ld.so.conf.d; then + echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local.conf + else # for example: Slackware 14.2 + echo "/usr/local/lib" > /etc/ld.so.conf + fi @@ -248,2 +256,8 @@ -if [ -f /etc/slackware-version ]; then - unsupported_distro='Slackware' +if [ -f /etc/slackware-version ] || ([ -f /etc/os-release ] && . /etc/os-release && [ "$ID" = "slackware" ]); then + echo >&2 "$0: Your distribution (Slackware) is currently not supported. Aborting. Try manually:" + # libedit requires a newer version than Slackware 14.2, for example Slackware-current + # or you build it manually: + echo >&2 "$0: # slackpkg install make gcc pkg-config libedit util-linux sqlite libxml2 patch wget" + # required for libjansson + echo >&2 "$0: # ./contrib/scripts/install_prereq install-unpackaged" + exit 1