diff options
author | phintuka <phintuka> | 2008-10-31 20:50:24 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-10-31 20:50:24 +0000 |
commit | 60a701f5516331b77df9873e7947286f2496ce6c (patch) | |
tree | aec40da866a54f8f64d8d4c100440e19e8596695 | |
parent | 6a4cb4d1f8194dda70b39f93937f99b449a3056d (diff) | |
download | xineliboutput-60a701f5516331b77df9873e7947286f2496ce6c.tar.gz xineliboutput-60a701f5516331b77df9873e7947286f2496ce6c.tar.bz2 |
Automatically generate features.h.
This file replaces all -DHAVE_... options passed to C compiler.
-rwxr-xr-x | configure | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -7,9 +7,12 @@ # See the main source file 'xineliboutput.c' for copyright information and # how to reach the author. # +# * $Id: configure,v 1.2 2008-10-31 20:50:24 phintuka Exp $ +# PKG_CONFIG="pkg-config" makefile="config.mak" +header="features.h" logfile="configure.log" debug=no @@ -26,7 +29,7 @@ toupper(){ } die(){ - echo "$1" + log "$@" exit -1 } @@ -293,12 +296,35 @@ done log # +# create features.h +# + +log "Creating $header ..." + +cat <<EOF >$header +/* Automatically generated by configure - do not modify! */ + +#ifndef XINELIBOUTPUT_FEATURES_H +#define XINELIBOUTPUT_FEATURES_H + +EOF + +for feature in $FEATURES; do + enabled $feature && + echo "#define HAVE_$(toupper $feature) 1">>$header || \ + echo "#undef HAVE_$(toupper $feature)">>$header +done + +echo "" >> $header +echo "#endif /* XINELIBOUTPUT_FEATURES_H */" >> $header + +# # create features.mak # log "Creating $makefile ..." -echo "# Automatically generated by configure.sh - do not modify!" > $makefile +echo "# Automatically generated by configure - do not modify!" > $makefile echo >> $makefile # subsystems |