Using a dummy channel causes CDR() testing to fail.
[asterisk/asterisk.git] / build_tools / make_buildopts_h
1 #!/bin/sh
2
3 cat << END
4 /*
5  * buildopts.h 
6  * Automatically generated
7  */
8
9 END
10 TMP=`${GREP} -e "^MENUSELECT_CFLAGS" menuselect.makeopts | sed 's/MENUSELECT_CFLAGS\=//g' | sed 's/-D//g'`
11 for x in ${TMP}; do
12         echo "#define ${x} 1"
13         if test "x${BUILDOPTS}" != "x" ; then
14                 BUILDOPTS="${BUILDOPTS}, ${x}"
15         else
16                 BUILDOPTS="${x}"
17         fi
18 done
19 TMP=`${GREP} -e "^MENUSELECT_BUILD_DEPS" menuselect.makeopts | sed 's/MENUSELECT_BUILD_DEPS\=//g'`
20 for x in ${TMP}; do
21         x2=`echo ${x} | tr a-z A-Z`
22         echo "#define AST_MODULE_${x2} 1"
23 done
24 if ${GREP} "AST_DEVMODE" makeopts | ${GREP} -q "yes"
25 then
26         echo "#define AST_DEVMODE 1"
27         TMP="${TMP} AST_DEVMODE"
28 fi
29
30 BUILDSUM=`echo ${TMP} | ${MD5} | cut -c1-32`
31
32 echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\""
33 echo "#define AST_BUILDOPTS \"${BUILDOPTS}\""