Binaural synthesis (confbridge): Adds utils/conf_bridge_binaural_hrir_importer
[asterisk/asterisk.git] / build_tools / make_buildopts_h
1 #!/bin/sh
2
3 GREP=${GREP:-grep}
4 MD5=${MD5:-md5sum}
5
6 cat << END
7 /*
8  * buildopts.h 
9  * Automatically generated
10  */
11
12 END
13
14 if ${GREP} "AST_DEVMODE" makeopts | ${GREP} -q "yes"
15 then
16         echo "#define AST_DEVMODE 1"
17         BUILDOPTS="AST_DEVMODE"
18 fi
19
20 TMP=`${GREP} -e "^MENUSELECT_CFLAGS" menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
21 for x in ${TMP}; do
22         echo "#define ${x} 1"
23         if test "${x}" = "DONT_OPTIMIZE" \
24                         -o "${x}" = "BETTER_BACKTRACES" \
25                         -o "${x}" = "LOTS_OF_SPANS" \
26                         -o "${x}" = "BUILD_NATIVE" \
27                         -o "${x}" = "LOW_MEMORY" \
28                         -o "${x}" = "REF_DEBUG" \
29                         -o "${x}" = "AO2_DEBUG" \
30                         -o "${x}" = "REBUILD_PARSERS" \
31                         -o "${x}" = "RADIO_RELAX" \
32                         -o "${x}" = "DEBUG_SCHEDULER" \
33                         -o "${x}" = "DETECT_DEADLOCKS" \
34                         -o "${x}" = "DUMP_SCHEDULER" ; then
35                 # These aren't ABI affecting options, keep them out of AST_BUILDOPTS
36                 continue
37         fi
38         if test "x${BUILDOPTS}" != "x" ; then
39                 BUILDOPTS="${BUILDOPTS}, ${x}"
40         else
41                 BUILDOPTS="${x}"
42         fi
43 done
44
45 BUILDSUM=`echo ${BUILDOPTS} | ${MD5} | cut -c1-32`
46
47 echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\""
48 echo "#define AST_BUILDOPTS \"${BUILDOPTS}\""