# Avoid default CXXFLAGS of "-g -O2" AC_DEFUN([SC_SET_CXXFLAGS], [if test "$CXXFLAGS" = ""; then CXXFLAGS="-O3 -g" fi ]) # Process this file with autoconf to produce a configure script. AC_INIT(SharpConstruct, 0.11, nicholasbishop@gmail.com, sharpconstruct) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config/config.h]) AC_SUBST(VERSION) # RANT: # The ******* who created autoconf set the CXXFLAGS variable to # include -g -O2. I'm sure there's a good reason for this, and maybe an # easy way to work around it, but from where I'm standing, it looks like # a really dumb thing to do. I mean, "AC_PROG_CXX" sure sounds like it # ought to be finding the _compiler_, not setting optimization flags. SC_SET_CXXFLAGS AC_PROG_CXX # Small library for prefix-independence AM_BINRELOC # Check for posix_memalign AC_CHECK_FUNCS(posix_memalign) # Check for gtk+ PKG_CHECK_MODULES(gtk, gtk+-2.0 >= 2.8.0) # Check for libglademm PKG_CHECK_MODULES(libglademm, libglademm-2.4 >= 2.6.0) AC_SUBST([libglademm_CFLAGS]) AC_SUBST([libglademm_LIBS]) # Check for gtkglextmm PKG_CHECK_MODULES(gtkglextmm, gtkglextmm-1.2 >= 1.0.0) AC_SUBST([gtkglextmm_CFLAGS]) AC_SUBST([gtkglextmm_LIBS]) # Check for (optional) rendering library #AC_CHECK_HEADERS([aqsis/ri.h], #[AC_CHECK_LIB(ri2rib, RiBegin)]) # Check for libXpm # Not sure how to do this other than to check for all of X. # Which hopefully has xpm. AC_PATH_XTRA AC_OUTPUT( Makefile src/Makefile doc/Makefile include/Makefile share/Makefile share/sharpconstruct/Makefile share/sharpconstruct/brushes/Makefile share/sharpconstruct/interface/Makefile)