#!/bin/bash # # Tvheadend configure script # # Copyright (c) 2012 Adam Sutton # # ########################################################################### # Setup # ########################################################################### ROOTDIR=$(dirname $0) # # Options # OPTIONS=( "cwc:yes" "v4l:yes" "linuxdvb:yes" "dvbscan:yes" "avahi:auto" "zlib:auto" "bundle:no" ) # # Begin # . $ROOTDIR/support/configure.inc parse_args $* # ########################################################################### # Checks # ########################################################################### # # Compiler # check_cc || die 'No C compiler found' check_cc_header execinfo check_cc_option mmx check_cc_option sse2 # # Python # check_py || die 'No PYTHON binary found' check_py_import zlib pyzlib || die "Python module missing: zlib" check_py_import tarfile pytar || die "Python module missing: tarfile" # Note: the above could/should be made optional # # SSL # if check_pkg openssl || check_pkg libssl; then enable ssl else die "SSL development support not found" fi # # Gzip # if enabled_or_auto zlib; then if check_pkg zlib; then enable zlib elif enabled zlib; then die "Zlib development support not found (use --disable-zlib)" fi fi # # Bundling # if enabled_or_auto bundle; then if enabled zlib; then enable bundle elif enabled bundle; then die "Zlib development support not found (use --disable-bundle)" fi fi # # Avahi # if enabled_or_auto avahi; then if check_pkg avahi-client; then enable avahi elif enabled avahi; then die "Avahi development support not found (use --disable-avahi)" fi fi # # DVB scan # if enabled linuxdvb && enabled dvbscan; then if [ ! -d ${ROOTDIR}/data/dvb-scan ]; then echo -n "Fetching dvb-scan files... " ${PYTHON} ${ROOTDIR}/support/getmuxlist &> /dev/null || die "Failed to fetch dvb-scan files (use --disable-dvbscan to skip)" echo "done" fi fi # ########################################################################### # Write config # ########################################################################### # Write config write_config cat >> ${CONFIG_H} <