81 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
82 "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
82 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
83 "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
83 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
84 "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
84 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
85 "--mandir"*) MANDIR=${ARG#--mandir} ;; |
85 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
86 "--help"*) printhelp; rm -Rf "$TEMP_DIR"; exit 1 ;; |
|
87 "--debug") BUILD_TYPE="debug" ;; |
|
88 "--release") BUILD_TYPE="release" ;; |
86 "--enable-pg") FEATURE_PG=on ;; |
89 "--enable-pg") FEATURE_PG=on ;; |
87 "--disable-pg") unset FEATURE_PG ;; |
90 "--disable-pg") unset FEATURE_PG ;; |
88 "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; |
91 "-"*) echo "unknown option: $ARG"; rm -Rf "$TEMP_DIR"; exit 1 ;; |
89 esac |
92 esac |
90 done |
93 done |
413 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
416 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/config.mk" |
414 fi |
417 fi |
415 if [ -n "${TEMP_CXXFLAGS}" ]; then |
418 if [ -n "${TEMP_CXXFLAGS}" ]; then |
416 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
419 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/config.mk" |
417 fi |
420 fi |
|
421 if [ "$BUILD_TYPE" = "debug" ]; then |
|
422 echo 'CFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
423 echo 'CXXFLAGS += ${DEBUG_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
424 fi |
|
425 if [ "$BUILD_TYPE" = "release" ]; then |
|
426 echo 'CFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
427 echo 'CXXFLAGS += ${RELEASE_FLAGS}' >> "$TEMP_DIR/config.mk" |
|
428 fi |
418 if [ -n "${TEMP_LDFLAGS}" ]; then |
429 if [ -n "${TEMP_LDFLAGS}" ]; then |
419 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
430 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/config.mk" |
420 fi |
431 fi |
421 |
432 |
422 if [ $ERROR -ne 0 ]; then |
433 if [ $ERROR -ne 0 ]; then |