dnl dnl Copyright (C) 2012 - Juan Ferrer Toribio dnl dnl This program is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see . dnl # serial 3 dev-tools AC_DEFUN([VN_BUILD_OPTIONS], [ case $CFLAGS in *-W*) ;; *)CFLAGS+=" -Wall ";; esac # Check for debug mode AC_MSG_CHECKING([whether to build with debug information...]) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable debug data generation [default = no]])], [ENABLE_DEBUG="$enableval"], [ENABLE_DEBUG=no]) AC_MSG_RESULT([$ENABLE_DEBUG]) case $CFLAGS in *-g*) ;; *) if test x"$ENABLE_DEBUG" = x"yes"; then CFLAGS+=" -ggdb " fi ;; esac # Check if the package must be configured to be installed AC_MSG_CHECKING([whether to configure to install...]) AC_ARG_ENABLE([install], [AS_HELP_STRING([--enable-install], [Enable install configuration [default = yes]])], [ENABLE_INSTALL="$enableval"], [ENABLE_INSTALL=yes]) AC_MSG_RESULT([$ENABLE_INSTALL]) AM_CONDITIONAL(ENABLE_INSTALL, [test x"$ENABLE_INSTALL" = x"yes"]) case $CFLAGS in *-O*) ;; *) if test x"$ENABLE_INSTALL" = x"yes"; then CFLAGS+=" -O3" fi ;; esac AC_SUBST([ENABLE_DEBUG]) AC_SUBST([ENABLE_INSTALL]) AC_SUBST([CFLAGS]) ])