Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc70c4e3

Browse files
committed
I hope this is what you had in mind:
--enable-debug adds -g (unconditionally)--disable-debug removes -g (if it was already in there somehow)(giving neither does nothing)Since none of the templates default CFLAGS with a -g you're not likelytoend up with two -g flags. Not that they'd hurt though.It doesn't do anything about C++.Peter Eisentraut
1 parent48049b4 commitc70c4e3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎src/configure.in

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,27 @@ echo "- setting CPPFLAGS=$CPPFLAGS"
411411
LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
412412
echo "- setting LDFLAGS=$LDFLAGS"
413413

414+
dnl --enable-debug adds -g to compiler flags
415+
dnl --disable-debug will forcefully remove it
416+
AC_MSG_CHECKING(setting debug compiler flag)
417+
AC_ARG_ENABLE(
418+
debug,
419+
[ --enable-debug build with debugging symbols (-g) ],
420+
[
421+
case "$enableval" in
422+
y | ye | yes)
423+
CFLAGS="$CFLAGS -g"
424+
AC_MSG_RESULT(enabled)
425+
;;
426+
*)
427+
CFLAGS=`echo "$CFLAGS" | sed -e 's/ -g/ /g' | sed -e 's/^-g//'`
428+
AC_MSG_RESULT(disabled)
429+
;;
430+
esac
431+
],
432+
AC_MSG_RESULT(using default)
433+
)
434+
414435
# Assume system is ELF if it predefines __ELF__ as 1,
415436
# otherwise believe "elf" setting from check of host_os above.
416437
AC_EGREP_CPP(yes,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp