diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2016-10-18 23:15:49 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2016-10-18 23:19:08 +0100 |
commit | 3742f66abb7eeb9e31793a935fae3a2ecc0332fd (patch) | |
tree | 87ec4c39a4453612c3a243c36e638274f113f8f4 | |
parent | ec47907772b8302ca23b8a8a0b406c4e39e99f47 (diff) | |
download | rtmux-3742f66abb7eeb9e31793a935fae3a2ecc0332fd.tar.gz rtmux-3742f66abb7eeb9e31793a935fae3a2ecc0332fd.tar.bz2 rtmux-3742f66abb7eeb9e31793a935fae3a2ecc0332fd.zip |
Revert the AM_* change, I can't find a way to make AC_CHECK_HEADER use
LIBEVENT_CFLAGS.
-rw-r--r-- | Makefile.am | 38 | ||||
-rw-r--r-- | configure.ac | 9 |
2 files changed, 22 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am index 82101c57..bce84b91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,49 +12,49 @@ dist-hook: grep "^#enable_debug=" configure # Preprocessor flags. -AM_CPPFLAGS += @XOPEN_DEFINES@ -DTMUX_CONF="\"$(sysconfdir)/tmux.conf\"" +CPPFLAGS += @XOPEN_DEFINES@ -DTMUX_CONF="\"$(sysconfdir)/tmux.conf\"" # glibc as usual does things ass-backwards and hides useful things by default, # so everyone has to add this. if IS_GLIBC -AM_CFLAGS += -D_GNU_SOURCE +CFLAGS += -D_GNU_SOURCE endif # Set flags for gcc. if IS_GCC -AM_CFLAGS += -std=gnu99 -O2 +CFLAGS += -std=gnu99 -O2 if IS_DEBUG -AM_CFLAGS += -g -AM_CFLAGS += -Wno-long-long -Wall -W -Wformat=2 -AM_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -AM_CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare -AM_CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align -AM_CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes -AM_CPPFLAGS += -DDEBUG +CFLAGS += -g +CFLAGS += -Wno-long-long -Wall -W -Wformat=2 +CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations +CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare +CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align +CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes +CPPFLAGS += -DDEBUG endif if IS_COVERAGE -AM_CFLAGS += -g -O0 --coverage -AM_LDFLAGS += --coverage +CFLAGS += -g -O0 --coverage +LDFLAGS += --coverage endif if IS_PROFILE -AM_CFLAGS += -g -O0 -pg -AM_LDFLAGS += -pg +CFLAGS += -g -O0 -pg +LDFLAGS += -pg endif -AM_CPPFLAGS += -iquote. +CPPFLAGS += -iquote. endif # Set flags for Solaris. if IS_SUNOS if IS_GCC -AM_CPPFLAGS += -D_XPG6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS +CPPFLAGS += -D_XPG6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS else -AM_CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS +CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS endif endif # Set flags for Sun CC. if IS_SUNCC -AM_CFLAGS += -erroff=E_EMPTY_DECLARATION +CFLAGS += -erroff=E_EMPTY_DECLARATION endif # Set _LINUX_SOURCE_COMPAT for AIX for malloc(0). @@ -64,7 +64,7 @@ endif # Set flags for NetBSD. if IS_NETBSD -AM_CPPFLAGS += -D_OPENBSD_SOURCE +CPPFLAGS += -D_OPENBSD_SOURCE endif # List of sources. diff --git a/configure.ac b/configure.ac index f7a2008d..c172d6b2 100644 --- a/configure.ac +++ b/configure.ac @@ -51,8 +51,8 @@ AC_ARG_ENABLE( AC_HELP_STRING(--enable-static, create a static build) ) if test "x$enable_static" = xyes; then + LDFLAGS="$LDFLAGS -static" test "x$PKG_CONFIG" != x && PKG_CONFIG="$PKG_CONFIG --static" - AM_LDFLAGS="$AM_LDFLAGS -static" fi # Is this gcc? @@ -129,7 +129,7 @@ PKG_CHECK_MODULES( LIBEVENT, libevent, [ - AM_CFLAGS="$LIBEVENT_CFLAGS $AM_CFLAGS" + CPPFLAGS="$LIBEVENT_CFLAGS $CPPFLAGS" LIBS="$LIBEVENT_LIBS $LIBS" found_libevent=yes ], @@ -156,7 +156,7 @@ PKG_CHECK_MODULES( LIBNCURSES, ncurses, [ - AM_CFLAGS="$LIBNCURSES_CFLAGS $AM_CFLAGS" + CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS" LIBS="$LIBNCURSES_LIBS $LIBS" found_ncurses=yes ], @@ -646,7 +646,4 @@ AM_CONDITIONAL(IS_HPUX, test "x$PLATFORM" = xhpux) AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown) # autoconf should create a Makefile. -AC_SUBST(AM_CFLAGS) -AC_SUBST(AM_CPPFLAGS) -AC_SUBST(AM_LDFLAGS) AC_OUTPUT(Makefile) |