diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-10-08 16:32:15 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-08 16:32:15 +0300 |
commit | 9e37de193f5d7412ffd8de76d5eed0158c0a3609 (patch) | |
tree | 4e7372d6ef0ee660d566ace542ea56348e331605 /configure.ac | |
parent | b559cbb1601f93cb03ea3dcfb2c5ca94ee6b73bb (diff) |
configure.ac: reactivate warnings when building with gcc
We were inadvertently stomping XSERVER_CFLAGS after adding the warnings, so
move them after we do that.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index 0397b5819..e1342f19b 100644 --- a/configure.ac +++ b/configure.ac @@ -848,28 +848,6 @@ else fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) -# The Xorg binary needs to export symbols so that they can be used from modules -# Some platforms require extra flags to do this. gcc should set these flags -# when -rdynamic is passed to it, other compilers/linkers may need to be added -# here. -if test "x$GCC" = "xyes"; then - GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" - GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" - GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" - GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" - if test "x$WERROR" = "xyes"; then - GCC_WARNINGS="${GCC_WARNINGS} -Werror" - fi - XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" - LD_EXPORT_SYMBOLS_FLAG="-rdynamic" -fi -case $host_os in - openbsd*) - LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" - ;; -esac -AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) - AC_DEFINE(USE_RGB_TXT, 1, [Use rgb.txt directly]) AC_DEFINE(MITMISC, 1, [Support MIT Misc extension]) AC_DEFINE(XTEST, 1, [Support XTest extension]) @@ -900,6 +878,29 @@ XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm" AC_SUBST([XSERVER_LIBS]) AC_SUBST([SYS_LIBS]) +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. gcc should set these flags +# when -rdynamic is passed to it, other compilers/linkers may need to be added +# here. +if test "x$GCC" = "xyes"; then + GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" + GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" + GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" + GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" + if test "x$WERROR" = "xyes"; then + GCC_WARNINGS="${GCC_WARNINGS} -Werror" + fi + XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" + + LD_EXPORT_SYMBOLS_FLAG="-rdynamic" +fi +case $host_os in + openbsd*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; +esac +AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) + dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so dnl we need to replicate that here until those can all be fixed AC_MSG_CHECKING([if SVR4 needs to be defined]) |