mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Revert the AM_* change, I can't find a way to make AC_CHECK_HEADER use
LIBEVENT_CFLAGS.
This commit is contained in:
38
Makefile.am
38
Makefile.am
@ -12,49 +12,49 @@ dist-hook:
|
|||||||
grep "^#enable_debug=" configure
|
grep "^#enable_debug=" configure
|
||||||
|
|
||||||
# Preprocessor flags.
|
# 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,
|
# glibc as usual does things ass-backwards and hides useful things by default,
|
||||||
# so everyone has to add this.
|
# so everyone has to add this.
|
||||||
if IS_GLIBC
|
if IS_GLIBC
|
||||||
AM_CFLAGS += -D_GNU_SOURCE
|
CFLAGS += -D_GNU_SOURCE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set flags for gcc.
|
# Set flags for gcc.
|
||||||
if IS_GCC
|
if IS_GCC
|
||||||
AM_CFLAGS += -std=gnu99 -O2
|
CFLAGS += -std=gnu99 -O2
|
||||||
if IS_DEBUG
|
if IS_DEBUG
|
||||||
AM_CFLAGS += -g
|
CFLAGS += -g
|
||||||
AM_CFLAGS += -Wno-long-long -Wall -W -Wformat=2
|
CFLAGS += -Wno-long-long -Wall -W -Wformat=2
|
||||||
AM_CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
CFLAGS += -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
|
||||||
AM_CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
|
CFLAGS += -Wwrite-strings -Wshadow -Wpointer-arith -Wsign-compare
|
||||||
AM_CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align
|
CFLAGS += -Wundef -Wbad-function-cast -Winline -Wcast-align
|
||||||
AM_CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes
|
CFLAGS += -Wdeclaration-after-statement -Wno-pointer-sign -Wno-attributes
|
||||||
AM_CPPFLAGS += -DDEBUG
|
CPPFLAGS += -DDEBUG
|
||||||
endif
|
endif
|
||||||
if IS_COVERAGE
|
if IS_COVERAGE
|
||||||
AM_CFLAGS += -g -O0 --coverage
|
CFLAGS += -g -O0 --coverage
|
||||||
AM_LDFLAGS += --coverage
|
LDFLAGS += --coverage
|
||||||
endif
|
endif
|
||||||
if IS_PROFILE
|
if IS_PROFILE
|
||||||
AM_CFLAGS += -g -O0 -pg
|
CFLAGS += -g -O0 -pg
|
||||||
AM_LDFLAGS += -pg
|
LDFLAGS += -pg
|
||||||
endif
|
endif
|
||||||
AM_CPPFLAGS += -iquote.
|
CPPFLAGS += -iquote.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set flags for Solaris.
|
# Set flags for Solaris.
|
||||||
if IS_SUNOS
|
if IS_SUNOS
|
||||||
if IS_GCC
|
if IS_GCC
|
||||||
AM_CPPFLAGS += -D_XPG6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
CPPFLAGS += -D_XPG6 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
||||||
else
|
else
|
||||||
AM_CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set flags for Sun CC.
|
# Set flags for Sun CC.
|
||||||
if IS_SUNCC
|
if IS_SUNCC
|
||||||
AM_CFLAGS += -erroff=E_EMPTY_DECLARATION
|
CFLAGS += -erroff=E_EMPTY_DECLARATION
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set _LINUX_SOURCE_COMPAT for AIX for malloc(0).
|
# Set _LINUX_SOURCE_COMPAT for AIX for malloc(0).
|
||||||
@ -64,7 +64,7 @@ endif
|
|||||||
|
|
||||||
# Set flags for NetBSD.
|
# Set flags for NetBSD.
|
||||||
if IS_NETBSD
|
if IS_NETBSD
|
||||||
AM_CPPFLAGS += -D_OPENBSD_SOURCE
|
CPPFLAGS += -D_OPENBSD_SOURCE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# List of sources.
|
# List of sources.
|
||||||
|
@ -51,8 +51,8 @@ AC_ARG_ENABLE(
|
|||||||
AC_HELP_STRING(--enable-static, create a static build)
|
AC_HELP_STRING(--enable-static, create a static build)
|
||||||
)
|
)
|
||||||
if test "x$enable_static" = xyes; then
|
if test "x$enable_static" = xyes; then
|
||||||
|
LDFLAGS="$LDFLAGS -static"
|
||||||
test "x$PKG_CONFIG" != x && PKG_CONFIG="$PKG_CONFIG --static"
|
test "x$PKG_CONFIG" != x && PKG_CONFIG="$PKG_CONFIG --static"
|
||||||
AM_LDFLAGS="$AM_LDFLAGS -static"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Is this gcc?
|
# Is this gcc?
|
||||||
@ -129,7 +129,7 @@ PKG_CHECK_MODULES(
|
|||||||
LIBEVENT,
|
LIBEVENT,
|
||||||
libevent,
|
libevent,
|
||||||
[
|
[
|
||||||
AM_CFLAGS="$LIBEVENT_CFLAGS $AM_CFLAGS"
|
CPPFLAGS="$LIBEVENT_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$LIBEVENT_LIBS $LIBS"
|
LIBS="$LIBEVENT_LIBS $LIBS"
|
||||||
found_libevent=yes
|
found_libevent=yes
|
||||||
],
|
],
|
||||||
@ -156,7 +156,7 @@ PKG_CHECK_MODULES(
|
|||||||
LIBNCURSES,
|
LIBNCURSES,
|
||||||
ncurses,
|
ncurses,
|
||||||
[
|
[
|
||||||
AM_CFLAGS="$LIBNCURSES_CFLAGS $AM_CFLAGS"
|
CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$LIBNCURSES_LIBS $LIBS"
|
LIBS="$LIBNCURSES_LIBS $LIBS"
|
||||||
found_ncurses=yes
|
found_ncurses=yes
|
||||||
],
|
],
|
||||||
@ -646,7 +646,4 @@ AM_CONDITIONAL(IS_HPUX, test "x$PLATFORM" = xhpux)
|
|||||||
AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
|
AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
|
||||||
|
|
||||||
# autoconf should create a Makefile.
|
# autoconf should create a Makefile.
|
||||||
AC_SUBST(AM_CFLAGS)
|
|
||||||
AC_SUBST(AM_CPPFLAGS)
|
|
||||||
AC_SUBST(AM_LDFLAGS)
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|
||||||
|
Reference in New Issue
Block a user