summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-08-20 13:35:28 -0700
committerMatt Turner <mattst88@gmail.com>2012-08-28 20:53:27 -0700
commit6960eeef4ac3fe1cec883b6fef15f404dbbd5787 (patch)
tree5736d41fdb9f521e22c971871a57c4077b6a828e
parent3b41134e17954279a99a671d2a8b87e60a2dad7e (diff)
build: Set AM_C* instead of CFLAGS/CPPFLAGS
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac11
2 files changed, 10 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 61dc9c3..23ae5e7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,6 +30,8 @@ AM_CPPFLAGS = -DLIBRARYBUILD \
-I$(top_srcdir)/src/libnurbs/internals \
-I$(top_srcdir)/src/libnurbs/interface \
-I$(top_srcdir)/src/libnurbs/nurbtess
+AM_CFLAGS = $(GL_CFLAGS) $(WARNCFLAGS)
+AM_CXXFLAGS = $(GL_CFLAGS) $(WARNCXXFLAGS)
GLU_LIBRARY_VERSION=1:3:1
lib_LTLIBRARIES = libGLU.la
@@ -123,6 +125,5 @@ libGLU_la_SOURCES = \
src/libnurbs/nurbtess/sampleMonoPoly.cc \
src/libnurbs/nurbtess/sampledLine.cc \
src/libnurbs/nurbtess/searchTree.cc
-libGLU_la_CFLAGS = $(GL_CFLAGS)
libGLU_la_LIBADD = $(GL_LIBS)
libGLU_la_LDFLAGS = -version-number $(GLU_LIBRARY_VERSION) -no-undefined -export-symbols-regex '^glu'
diff --git a/configure.ac b/configure.ac
index dd63141..e0ee467 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,14 +61,19 @@ PKG_CHECK_MODULES(GL, [gl], [], [
dnl Set up C warning flags.
if test "x$GCC" = xyes; then
- CFLAGS="$CFLAGS -Wall"
- CXXFLAGS="$CXXFLAGS -Wall"
+ WARNCFLAGS="-Wall"
+ if test "x$GXX" = xyes; then
+ WARNCXXFLAGS="-Wall"
+ fi
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
- WARNFLAGS="-v"
+ WARNCFLAGS="-v"
+ WARNCXXFLAGS="-v"
fi
fi
+AC_SUBST([WARNCFLAGS])
+AC_SUBST([WARNCXXFLAGS])
AC_OUTPUT([
Makefile