0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-12 13:01:07 +01:00

configure.ac/Makefile: Add debug conditionals.

This commit is contained in:
Jason Volk 2017-09-12 09:54:10 -07:00
parent 6fb3b44c05
commit a0aeb2de2d
3 changed files with 21 additions and 2 deletions

View file

@ -154,6 +154,8 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging suite fo
CPPDEFINE([NDEBUG]) CPPDEFINE([NDEBUG])
]) ])
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
AC_MSG_CHECKING(if you want to do a profile build) AC_MSG_CHECKING(if you want to do a profile build)
AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]), AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),

View file

@ -5,8 +5,17 @@ AM_CPPFLAGS = \
@BOOST_CPPFLAGS@ \ @BOOST_CPPFLAGS@ \
### ###
AM_CXXFLAGS = \
###
if GCC if GCC
AM_CXXFLAGS = -fpch-deps AM_CXXFLAGS += -fpch-deps
endif
if DEBUG
if GCC
AM_CXXFLAGS += -fmax-errors=2
endif
endif endif
if BUILD_PCH if BUILD_PCH

View file

@ -3,7 +3,6 @@ AUTOMAKE_OPTIONS = foreign
libircddir = @libdir@ libircddir = @libdir@
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-fmax-errors=2 \
-ffriend-injection \ -ffriend-injection \
-I$(top_srcdir)/include \ -I$(top_srcdir)/include \
@ROCKSDB_CPPFLAGS@ \ @ROCKSDB_CPPFLAGS@ \
@ -12,10 +11,19 @@ AM_CPPFLAGS = \
-include ircd/ircd.h \ -include ircd/ircd.h \
### ###
AM_CXXFLAGS = \
###
if MINGW if MINGW
PLATFORM_LDFLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*' PLATFORM_LDFLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
endif endif
if DEBUG
if GCC
AM_CXXFLAGS += -fmax-errors=2
endif
endif
AM_LDFLAGS = \ AM_LDFLAGS = \
-avoid-version \ -avoid-version \
-Wl,-fuse-ld=gold \ -Wl,-fuse-ld=gold \