Add missing terminator to ast_event_subscribe to fix a crash.
[asterisk-bristuff.git] / build_tools / make_buildopts_h
blobf721dbca2f0efcf76548a0dadef7985af660261a
1 #!/bin/sh
3 cat << END
4 /*
5 * buildopts.h
6 * Automatically generated
7 */
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}"
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"
30 case ${OSARCH} in # actually we should check build_os
31 *BSD|mingw|darwin*)
32 BUILDSUM=`echo ${TMP} | md5 | cut -c1-32`
34 SunOS)
35 BUILDSUM=`echo ${TMP} | digest -a md5 | cut -c1-32`
38 BUILDSUM=`echo ${TMP} | md5sum | cut -c1-32`
40 esac
42 echo "#define AST_BUILDOPT_SUM \"${BUILDSUM}\""
44 echo "#define AST_BUILDOPTS \"${BUILDOPTS}\""