Add --enable-debug option + *i is unused.

This commit is contained in:
c9s 2014-05-18 11:03:01 +08:00
parent 9639174f73
commit b25a68eaac
8 changed files with 72 additions and 92 deletions

View file

@ -77,7 +77,7 @@
#define PACKAGE_NAME "r3"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "r3 1.0"
#define PACKAGE_STRING "r3 1.0.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "r3"
@ -86,13 +86,13 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0"
#define PACKAGE_VERSION "1.0.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "1.0"
#define VERSION "1.0.0"
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */

View file

@ -380,7 +380,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by r3 $as_me 1.0, which was
This file was extended by r3 $as_me 1.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -427,9 +427,9 @@ $config_commands
Report bugs to the package provider."
ac_cs_config="'--enable-graphviz'"
ac_cs_config=""
ac_cs_version="\
r3 config.status 1.0
r3 config.status 1.0.0
configured by ./configure, generated by GNU Autoconf 2.69,
with options \"$ac_cs_config\"
@ -519,7 +519,7 @@ if $ac_cs_silent; then
fi
if $ac_cs_recheck; then
set X /bin/sh './configure' '--enable-graphviz' $ac_configure_extra_args --no-create --no-recursion
set X /bin/sh './configure' $ac_configure_extra_args --no-create --no-recursion
shift
$as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
CONFIG_SHELL='/bin/sh'
@ -728,7 +728,7 @@ fi
PACKAGE='r3'
VERSION='1.0'
VERSION='1.0.0'
TIMESTAMP=''
RM='rm -f'
ofile='libtool'
@ -818,12 +818,12 @@ S["am__EXEEXT_TRUE"]="#"
S["LTLIBOBJS"]=""
S["DEPS_LIBS"]="-L/opt/local/lib -lpcre -lcheck "
S["DEPS_CFLAGS"]="-D_THREAD_SAFE -I/opt/local/include "
S["DEBUG_FALSE"]=""
S["DEBUG_TRUE"]="#"
S["ENABLE_GRAPHVIZ_FALSE"]="#"
S["ENABLE_GRAPHVIZ_TRUE"]=""
S["GVC_DEPS_LIBS"]="-L/opt/local/lib -lgvc -lcgraph -lcdt "
S["GVC_DEPS_CFLAGS"]="-I/opt/local/include/graphviz "
S["ENABLE_GRAPHVIZ_FALSE"]=""
S["ENABLE_GRAPHVIZ_TRUE"]="#"
S["ENABLE_DEBUG_FALSE"]=""
S["ENABLE_DEBUG_TRUE"]="#"
S["GVC_DEPS_LIBS"]=""
S["GVC_DEPS_CFLAGS"]=""
S["PKG_CONFIG_LIBDIR"]=""
S["PKG_CONFIG_PATH"]=""
S["PKG_CONFIG"]="/opt/local/bin/pkg-config"
@ -899,7 +899,7 @@ S["AUTOHEADER"]="${SHELL} /Users/c9s/work/php/r3/missing autoheader"
S["AUTOMAKE"]="${SHELL} /Users/c9s/work/php/r3/missing automake-1.14"
S["AUTOCONF"]="${SHELL} /Users/c9s/work/php/r3/missing autoconf"
S["ACLOCAL"]="${SHELL} /Users/c9s/work/php/r3/missing aclocal-1.14"
S["VERSION"]="1.0"
S["VERSION"]="1.0.0"
S["PACKAGE"]="r3"
S["CYGPATH_W"]="echo"
S["am__isrc"]=""
@ -938,8 +938,8 @@ S["prefix"]="/usr/local"
S["exec_prefix"]="${prefix}"
S["PACKAGE_URL"]=""
S["PACKAGE_BUGREPORT"]=""
S["PACKAGE_STRING"]="r3 1.0"
S["PACKAGE_VERSION"]="1.0"
S["PACKAGE_STRING"]="r3 1.0.0"
S["PACKAGE_VERSION"]="1.0.0"
S["PACKAGE_TARNAME"]="r3"
S["PACKAGE_NAME"]="r3"
S["PATH_SEPARATOR"]=":"
@ -987,12 +987,12 @@ cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
D["PACKAGE_NAME"]=" \"r3\""
D["PACKAGE_TARNAME"]=" \"r3\""
D["PACKAGE_VERSION"]=" \"1.0\""
D["PACKAGE_STRING"]=" \"r3 1.0\""
D["PACKAGE_VERSION"]=" \"1.0.0\""
D["PACKAGE_STRING"]=" \"r3 1.0.0\""
D["PACKAGE_BUGREPORT"]=" \"\""
D["PACKAGE_URL"]=" \"\""
D["PACKAGE"]=" \"r3\""
D["VERSION"]=" \"1.0\""
D["VERSION"]=" \"1.0.0\""
D["STDC_HEADERS"]=" 1"
D["HAVE_SYS_TYPES_H"]=" 1"
D["HAVE_SYS_STAT_H"]=" 1"

97
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for r3 1.0.
# Generated by GNU Autoconf 2.69 for r3 1.0.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='r3'
PACKAGE_TARNAME='r3'
PACKAGE_VERSION='1.0'
PACKAGE_STRING='r3 1.0'
PACKAGE_VERSION='1.0.0'
PACKAGE_STRING='r3 1.0.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -633,10 +633,10 @@ am__EXEEXT_TRUE
LTLIBOBJS
DEPS_LIBS
DEPS_CFLAGS
DEBUG_FALSE
DEBUG_TRUE
ENABLE_GRAPHVIZ_FALSE
ENABLE_GRAPHVIZ_TRUE
ENABLE_DEBUG_FALSE
ENABLE_DEBUG_TRUE
GVC_DEPS_LIBS
GVC_DEPS_CFLAGS
PKG_CONFIG_LIBDIR
@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures r3 1.0 to adapt to many kinds of systems.
\`configure' configures r3 1.0.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1401,7 +1401,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of r3 1.0:";;
short | recursive ) echo "Configuration of r3 1.0.0:";;
esac
cat <<\_ACEOF
@ -1421,7 +1421,7 @@ Optional Features:
speeds up one-time build
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-graphviz enable graphviz support
--enable-debug Turn on debugging
--enable-debug enable debug
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1520,7 +1520,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
r3 configure 1.0
r3 configure 1.0.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1939,7 +1939,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by r3 $as_me 1.0, which was
It was created by r3 $as_me 1.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2806,7 +2806,7 @@ fi
# Define the identity of the package.
PACKAGE='r3'
VERSION='1.0'
VERSION='1.0.0'
cat >>confdefs.h <<_ACEOF
@ -13141,10 +13141,6 @@ $as_echo "no" >&6; }
fi
fi
# AC_ARG_ENABLE([graphviz],
# AS_HELP_STRING([--enable-graphviz], [Enable graphviz feature]))
# Check whether --enable-graphviz was given.
if test "${enable_graphviz+set}" = set; then :
enableval=$enable_graphviz;
@ -13152,11 +13148,6 @@ else
enable_graphviz=unset
fi
if test "x$enable_graphviz" != "xunset" ; then
pkg_failed=no
@ -13251,6 +13242,22 @@ $as_echo "yes" >&6; }
fi
fi
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug;
else
enable_debug=unset
fi
if test "x$enable_debug" = "xyes"; then
ENABLE_DEBUG_TRUE=
ENABLE_DEBUG_FALSE='#'
else
ENABLE_DEBUG_TRUE='#'
ENABLE_DEBUG_FALSE=
fi
if test "x$enable_graphviz" = "xyes"; then
@ -13263,44 +13270,6 @@ fi
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug; case "${enableval}" in
yes) enable_debug=true ;;
no) enable_debug=false ;;
*) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;;
esac
else
enable_debug=false
fi
if test x$enable_debug = xtrue; then
DEBUG_TRUE=
DEBUG_FALSE='#'
else
DEBUG_TRUE='#'
DEBUG_FALSE=
fi
# fi],[
# AC_DEFINE(ENABLE_GRAPHVIZ, 0, [Graphviz support disabled.])
# AM_CONDITIONAL(ENABLE_GRAPHVIZ, 0)
# AC_ARG_ENABLE(graphviz,
# [ --enable-graphvizviz Build with graphviz support],
# [if test x$enableval != xyes; then
# AC_DEFINE(ENABLE_GRAPHVIZ, 1, [Graphviz support enabled.])
# PKG_CHECK_MODULES(GVC_DEPS, [libgvc])
# AC_SUBST(GVC_DEPS_CFLAGS)
# AC_SUBST(GVC_DEPS_LIBS)
# AM_CONDITIONAL(ENABLE_GRAPHVIZ, 1)
# fi],[
# AC_DEFINE(ENABLE_GRAPHVIZ, 0, [Graphviz support disabled.])
# AM_CONDITIONAL(ENABLE_GRAPHVIZ, 0)
# ])
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEPS" >&5
@ -13537,12 +13506,12 @@ if test -z "${HAVE_CHECK_TRUE}" && test -z "${HAVE_CHECK_FALSE}"; then
as_fn_error $? "conditional \"HAVE_CHECK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_GRAPHVIZ_TRUE}" && test -z "${ENABLE_GRAPHVIZ_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_GRAPHVIZ\" was never defined.
if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then
as_fn_error $? "conditional \"DEBUG\" was never defined.
if test -z "${ENABLE_GRAPHVIZ_TRUE}" && test -z "${ENABLE_GRAPHVIZ_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_GRAPHVIZ\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@ -13942,7 +13911,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by r3 $as_me 1.0, which was
This file was extended by r3 $as_me 1.0.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -14008,7 +13977,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
r3 config.status 1.0
r3 config.status 1.0.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View file

@ -39,6 +39,12 @@ if test "x$enable_graphviz" != "xunset" ; then
AC_SUBST(GVC_DEPS_LIBS)
fi
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debug]),
, enable_debug=unset)
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
AM_CONDITIONAL(ENABLE_GRAPHVIZ, test "x$enable_graphviz" = "xyes")

View file

@ -1,7 +1,7 @@
#! /bin/sh
# libtool - Provide generalized library-building support services.
# Generated automatically by config.status (r3) 1.0
# Generated automatically by config.status (r3) 1.0.0
# Libtool was configured on host c9smba.local:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#

View file

@ -5,6 +5,10 @@ libr3_la_SOURCES = node.c edge.c list.c str.c token.c
libr3_la_LIBADD=$(DEPS_LIBS)
AM_CFLAGS=$(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include -Wall
if ENABLE_DEBUG
AM_CFLAGS += -g
endif
if ENABLE_GRAPHVIZ
libr3_la_SOURCES += gvc.c
libr3_la_LIBADD += $(GVC_DEPS_LIBS)

View file

@ -78,9 +78,10 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@ENABLE_GRAPHVIZ_TRUE@am__append_1 = gvc.c
@ENABLE_GRAPHVIZ_TRUE@am__append_2 = $(GVC_DEPS_LIBS)
@ENABLE_GRAPHVIZ_TRUE@am__append_3 = $(GVC_DEPS_CFLAGS)
@ENABLE_DEBUG_TRUE@am__append_1 = -g
@ENABLE_GRAPHVIZ_TRUE@am__append_2 = gvc.c
@ENABLE_GRAPHVIZ_TRUE@am__append_3 = $(GVC_DEPS_LIBS)
@ENABLE_GRAPHVIZ_TRUE@am__append_4 = $(GVC_DEPS_CFLAGS)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
@ -322,10 +323,10 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
lib_LTLIBRARIES = libr3.la
# lib_LIBRARIES = libr3.a
libr3_la_SOURCES = node.c edge.c list.c str.c token.c $(am__append_1)
libr3_la_LIBADD = $(DEPS_LIBS) $(am__append_2)
libr3_la_SOURCES = node.c edge.c list.c str.c token.c $(am__append_2)
libr3_la_LIBADD = $(DEPS_LIBS) $(am__append_3)
AM_CFLAGS = $(DEPS_CFLAGS) -I$(top_builddir) -I$(top_builddir)/include \
-Wall $(am__append_3)
-Wall $(am__append_1) $(am__append_4)
all: all-am
.SUFFIXES:

View file

@ -54,7 +54,7 @@ bool contains_slug(char * str) {
*/
char * compile_slug(char * str, int len)
{
char *s1 = NULL, *s2 = NULL, *i = NULL, *o = NULL;
char *s1 = NULL, *s2 = NULL, *o = NULL;
char *pat = NULL;
char sep = '/';