From 6941ac515de157fcb0e4362804b3d81852600db8 Mon Sep 17 00:00:00 2001 From: Mike Brady Date: Wed, 30 Apr 2014 20:36:39 +0100 Subject: [PATCH] Moving over to autotools. --- configure | 86 ------------------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100755 configure diff --git a/configure b/configure deleted file mode 100755 index 2ed3df22..00000000 --- a/configure +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -echo Configuring Shairport - -rm -f config.mk config.h - -echo "// automatically generated file" > config.h - -LDFLAGS="${LDFLAGS} -lm -lpthread" - -export_config() -{ - echo "#define $1" >> config.h - echo "$1=yes" >> config.mk - eval "$1=yes" -} - -# check for header $1 with CONFIG_ var $2 -check_header() -{ - echo "#include<$1>" > .header_test.c - if gcc -c .header_test.c > /dev/null 2>&1 /dev/null; then - echo "$1 found" - if [ "$2" ]; then - export_config $2 - fi - else - echo "$1 not found" - if [ ! "$2" ]; then - echo "Required header not found, cannot continue" - rm .header_test.c - rm -f config.mk config.h - exit 1 - fi - fi - - rm -f .header_test.c .header_test.o -} - -# check for and use pkg-config package $2 with CONFIG_ var $3 -do_pkg_config() -{ - if pkg-config $2 2>/dev/null; then - CFLAGS="${CFLAGS} `pkg-config --cflags $2`" - LDFLAGS="${LDFLAGS} `pkg-config --libs $2`" - if [ "$3" ]; then - export_config $3 - fi - echo "$1 found" - else - echo "$1 or its dev package not found" - if [ ! "$3" ]; then - echo "Required package not found, cannot continue" - rm -f config.mk config.h - exit 1 - fi - fi -} - -do_pkg_config OpenSSL openssl -do_pkg_config libao ao CONFIG_AO -do_pkg_config PulseAudio libpulse-simple CONFIG_PULSE -do_pkg_config ALSA alsa CONFIG_ALSA -do_pkg_config Avahi\ client avahi-client CONFIG_AVAHI - -if [ `uname` = 'OpenBSD' ]; then - echo "OpenBSD machine, use sndio" - export_config CONFIG_SNDIO - LDFLAGS="${LDFLAGS} -lsndio" -fi - -check_header getopt.h CONFIG_HAVE_GETOPT_H - -# Don't build dns_sd backend if we have avahi -if [ -z "$CONFIG_AVAHI" ]; then - check_header dns_sd.h CONFIG_HAVE_DNS_SD_H -fi - - -echo "CFLAGS+=${CFLAGS}" >> config.mk -echo "LDFLAGS+=${LDFLAGS}" >> config.mk - -echo CFLAGS: ${CFLAGS} -echo LDFLAGS: ${LDFLAGS} - -echo "Configure successful. You may now build with 'make'"