OSSP CVS Repository

ossp - Check-in [5457]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5457
Date: 2006-Jul-22 17:02:07 (local)
2006-Jul-22 15:02:07 (UTC)
User:rse
Branch:
Comment: add optional EDITLINE support
Tickets:
Inspections:
Files:
ossp-pkg/js/Makefile.in      1.3 -> 1.4     155 inserted, 153 deleted
ossp-pkg/js/configure.ac      1.3 -> 1.4     29 inserted, 0 deleted
ossp-pkg/js/devtool.conf      1.2 -> 1.3     1 inserted, 0 deleted

ossp-pkg/js/Makefile.in 1.3 -> 1.4

--- Makefile.in  2006/07/22 13:49:34     1.3
+++ Makefile.in  2006/07/22 15:02:07     1.4
@@ -29,154 +29,154 @@
 
 @SET_MAKE@
 
-VPATH       = @srcdir@
-srcdir      = @srcdir@
-top_srcdir  = @top_srcdir@
-
-DESTDIR     =
-prefix      = @prefix@
-exec_prefix = @exec_prefix@
-bindir      = @bindir@
-libdir      = @libdir@
-includedir  = @includedir@
-mandir      = @mandir@
-datarootdir = @datarootdir@
-
-CXX         = @CXX@
-CPPFLAGS    = @CPPFLAGS@ @DEFS@ -Isrc
-CFLAGS      = @CFLAGS@
-CXXFLAGS    = @CXXFLAGS@
-LDFLAGS     = @LDFLAGS@
-LIBS        = @LIBS@
-RM          = rm -f
-CP          = cp
-RMDIR       = rmdir
-SHTOOL      = ./shtool
-LIBTOOL     = ./libtool
-TRUE        = true
-
-LIB_HDR_API = src/jsapi.h      \
-              src/jsdbgapi.h
-LIB_HDR_CPP = src/jsarena.h    \
-              src/jsarray.h    \
-              src/jsatom.h     \
-              src/jsbool.h     \
-              src/jsclist.h    \
-              src/jscntxt.h    \
-              src/jsconfig.h   \
-              src/jsdate.h     \
-              src/jsdhash.h    \
-              src/jsdtoa.h     \
-              src/jsemit.h     \
-              src/jsexn.h      \
-              src/jsfun.h      \
-              src/jsgc.h       \
-              src/jshash.h     \
-              src/jsinterp.h   \
-              src/jslibmath.h  \
-              src/jslock.h     \
-              src/jslong.h     \
-              src/jsmath.h     \
-              src/jsnum.h      \
-              src/jsobj.h      \
-              src/jsopcode.h   \
-              src/jsosdep.h    \
-              src/jsparse.h    \
-              src/jsprvtd.h    \
-              src/jspubtd.h    \
-              src/jsregexp.h   \
-              src/jsscan.h     \
-              src/jsscope.h    \
-              src/jsscript.h   \
-              src/jsstr.h      \
-              src/jstypes.h    \
-              src/jsxdrapi.h   \
-              src/jsxml.h      \
-              src/jsfile.h
-LIB_HDR_OTH = src/jsbit.h      \
-              src/jscompat.h   \
-              src/jscpucfg.h   \
-              src/jsotypes.h   \
-              src/jsstddef.h   \
-              src/prmjtime.h   \
-              src/resource.h   \
-              src/jsopcode.tbl \
-              src/js.msg       \
-              src/jsshell.msg
-LIB_OBJS    = src/jsapi.lo     \
-              src/jsarena.lo   \
-              src/jsarray.lo   \
-              src/jsatom.lo    \
-              src/jsbool.lo    \
-              src/jscntxt.lo   \
-              src/jsdate.lo    \
-              src/jsdbgapi.lo  \
-              src/jsdhash.lo   \
-              src/jsdtoa.lo    \
-              src/jsemit.lo    \
-              src/jsexn.lo     \
-              src/jsfile.lo    \
-              src/jsfun.lo     \
-              src/jsgc.lo      \
-              src/jshash.lo    \
-              src/jsinterp.lo  \
-              src/jslock.lo    \
-              src/jslog2.lo    \
-              src/jslong.lo    \
-              src/jsmath.lo    \
-              src/jsnum.lo     \
-              src/jsobj.lo     \
-              src/jsopcode.lo  \
-              src/jsparse.lo   \
-              src/jsprf.lo     \
-              src/jsregexp.lo  \
-              src/jsscan.lo    \
-              src/jsscope.lo   \
-              src/jsscript.lo  \
-              src/jsstr.lo     \
-              src/jsutil.lo    \
-              src/jsxdrapi.lo  \
-              src/jsxml.lo     \
-              src/prmjtime.lo  \
-              src/fdlibm/e_acos.lo        \
-              src/fdlibm/e_asin.lo        \
-              src/fdlibm/e_atan2.lo       \
-              src/fdlibm/e_exp.lo         \
-              src/fdlibm/e_fmod.lo        \
-              src/fdlibm/e_log.lo         \
-              src/fdlibm/e_pow.lo         \
-              src/fdlibm/e_rem_pio2.lo    \
-              src/fdlibm/s_scalbn.lo      \
-              src/fdlibm/e_sqrt.lo        \
-              src/fdlibm/k_cos.lo         \
-              src/fdlibm/k_sin.lo         \
-              src/fdlibm/k_rem_pio2.lo    \
-              src/fdlibm/k_tan.lo         \
-              src/fdlibm/s_atan.lo        \
-              src/fdlibm/s_ceil.lo        \
-              src/fdlibm/s_copysign.lo    \
-              src/fdlibm/s_cos.lo         \
-              src/fdlibm/s_fabs.lo        \
-              src/fdlibm/s_finite.lo      \
-              src/fdlibm/s_floor.lo       \
-              src/fdlibm/s_isnan.lo       \
-              src/fdlibm/s_lib_version.lo \
-              src/fdlibm/s_sin.lo         \
-              src/fdlibm/s_tan.lo         \
-              src/fdlibm/w_acos.lo        \
-              src/fdlibm/w_asin.lo        \
-              src/fdlibm/w_atan2.lo       \
-              src/fdlibm/w_exp.lo         \
-              src/fdlibm/w_fmod.lo        \
-              src/fdlibm/w_log.lo         \
-              src/fdlibm/w_pow.lo         \
-              src/fdlibm/w_sqrt.lo
-LIB_NAME    = libjs.la
+VPATH        = @srcdir@
+srcdir       = @srcdir@
+top_srcdir   = @top_srcdir@
+
+DESTDIR      =
+prefix       = @prefix@
+exec_prefix  = @exec_prefix@
+bindir       = @bindir@
+libdir       = @libdir@
+includedir   = @includedir@
+mandir       = @mandir@
+datarootdir  = @datarootdir@
+
+CC           = @CC@
+CPPFLAGS     = @CPPFLAGS@ @DEFS@ -Isrc
+CFLAGS       = @CFLAGS@
+LDFLAGS      = @LDFLAGS@
+LIBS         = @LIBS@
+
+CLI_CPPFLAGS = @CLI_CPPFLAGS@
+CLI_LDFLAGS  = @CLI_LDFLAGS@
+CLI_LIBS     = @CLI_LIBS@
+
+RM           = rm -f
+CP           = cp
+RMDIR        = rmdir
+SHTOOL       = ./shtool
+LIBTOOL      = ./libtool
+TRUE         = true
+
+LIB_HDR_API  = src/jsapi.h                 \
+               src/jsdbgapi.h
+LIB_HDR_CPP  = src/jsarena.h               \
+               src/jsarray.h               \
+               src/jsatom.h                \
+               src/jsbool.h                \
+               src/jsclist.h               \
+               src/jscntxt.h               \
+               src/jsconfig.h              \
+               src/jsdate.h                \
+               src/jsdhash.h               \
+               src/jsdtoa.h                \
+               src/jsemit.h                \
+               src/jsexn.h                 \
+               src/jsfun.h                 \
+               src/jsgc.h                  \
+               src/jshash.h                \
+               src/jsinterp.h              \
+               src/jslibmath.h             \
+               src/jslock.h                \
+               src/jslong.h                \
+               src/jsmath.h                \
+               src/jsnum.h                 \
+               src/jsobj.h                 \
+               src/jsopcode.h              \
+               src/jsosdep.h               \
+               src/jsparse.h               \
+               src/jsprvtd.h               \
+               src/jspubtd.h               \
+               src/jsregexp.h              \
+               src/jsscan.h                \
+               src/jsscope.h               \
+               src/jsscript.h              \
+               src/jsstr.h                 \
+               src/jstypes.h               \
+               src/jsxdrapi.h              \
+               src/jsxml.h                 \
+               src/jsfile.h
+LIB_HDR_OTH  = src/jsbit.h                 \
+               src/jscompat.h              \
+               src/jscpucfg.h              \
+               src/jsotypes.h              \
+               src/jsstddef.h              \
+               src/prmjtime.h              \
+               src/resource.h              \
+               src/jsopcode.tbl            \
+               src/js.msg                  \
+               src/jsshell.msg
+LIB_OBJS     = src/jsapi.lo                \
+               src/jsarena.lo              \
+               src/jsarray.lo              \
+               src/jsatom.lo               \
+               src/jsbool.lo               \
+               src/jscntxt.lo              \
+               src/jsdate.lo               \
+               src/jsdbgapi.lo             \
+               src/jsdhash.lo              \
+               src/jsdtoa.lo               \
+               src/jsemit.lo               \
+               src/jsexn.lo                \
+               src/jsfile.lo               \
+               src/jsfun.lo                \
+               src/jsgc.lo                 \
+               src/jshash.lo               \
+               src/jsinterp.lo             \
+               src/jslock.lo               \
+               src/jslog2.lo               \
+               src/jslong.lo               \
+               src/jsmath.lo               \
+               src/jsnum.lo                \
+               src/jsobj.lo                \
+               src/jsopcode.lo             \
+               src/jsparse.lo              \
+               src/jsprf.lo                \
+               src/jsregexp.lo             \
+               src/jsscan.lo               \
+               src/jsscope.lo              \
+               src/jsscript.lo             \
+               src/jsstr.lo                \
+               src/jsutil.lo               \
+               src/jsxdrapi.lo             \
+               src/jsxml.lo                \
+               src/prmjtime.lo             \
+               src/fdlibm/e_acos.lo        \
+               src/fdlibm/e_asin.lo        \
+               src/fdlibm/e_atan2.lo       \
+               src/fdlibm/e_exp.lo         \
+               src/fdlibm/e_fmod.lo        \
+               src/fdlibm/e_log.lo         \
+               src/fdlibm/e_pow.lo         \
+               src/fdlibm/e_rem_pio2.lo    \
+               src/fdlibm/s_scalbn.lo      \
+               src/fdlibm/e_sqrt.lo        \
+               src/fdlibm/k_cos.lo         \
+               src/fdlibm/k_sin.lo         \
+               src/fdlibm/k_rem_pio2.lo    \
+               src/fdlibm/k_tan.lo         \
+               src/fdlibm/s_atan.lo        \
+               src/fdlibm/s_ceil.lo        \
+               src/fdlibm/s_copysign.lo    \
+               src/fdlibm/s_cos.lo         \
+               src/fdlibm/s_fabs.lo        \
+               src/fdlibm/s_finite.lo      \
+               src/fdlibm/s_floor.lo       \
+               src/fdlibm/s_isnan.lo       \
+               src/fdlibm/s_lib_version.lo \
+               src/fdlibm/s_sin.lo         \
+               src/fdlibm/s_tan.lo         \
+               src/fdlibm/w_acos.lo        \
+               src/fdlibm/w_asin.lo        \
+               src/fdlibm/w_atan2.lo       \
+               src/fdlibm/w_exp.lo         \
+               src/fdlibm/w_fmod.lo        \
+               src/fdlibm/w_log.lo         \
+               src/fdlibm/w_pow.lo         \
+               src/fdlibm/w_sqrt.lo
 
-PRG_NAME    = js
-PRG_OBJS    = src/js.o
-
-TARGETS     = $(LIB_NAME) $(PRG_NAME)
+TARGETS      = libjs.la js
 
 .SUFFIXES:
 .SUFFIXES: .c .o .lo
@@ -189,12 +189,14 @@
 .c.lo:
         @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
 
-$(LIB_NAME): $(LIB_OBJS)
-        @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \
+libjs.la: $(LIB_OBJS)
+        @$(LIBTOOL) --mode=link $(CC) -o libjs.la $(LIB_OBJS) -rpath $(libdir) \
             -version-info `$(SHTOOL) version -l txt -d libtool VERSION`
 
-$(PRG_NAME): $(PRG_OBJS) $(LIB_NAME)
-        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(PRG_NAME) $(PRG_OBJS) $(LIB_NAME) $(LIBS)
+js: src/js.o
+        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CLI_LDFLAGS) -o js src/js.o libjs.la $(LIBS) $(CLI_LIBS)
+src/js.o: src/js.c
+        $(CC) $(CPPFLAGS) $(CFLAGS) $(CLI_CPPFLAGS) -o $@ -c $<
 
 $(LIB_OBJS): src/jsautocfg.h
 src/jsautocfg.h: jscpucfg
@@ -221,8 +223,8 @@
 
 .PHONY: clean
 clean:
-        -$(RM) $(LIB_NAME) $(LIB_OBJS)
-        -$(RM) $(PRG_NAME) $(PRG_OBJS)
+        -$(RM) libjs.la $(LIB_OBJS)
+        -$(RM) js src/js.o
         -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE)
         -$(RM) *.o *.lo
 


ossp-pkg/js/configure.ac 1.3 -> 1.4

--- configure.ac 2006/07/22 14:03:51     1.3
+++ configure.ac 2006/07/22 15:02:07     1.4
@@ -47,6 +47,35 @@
 
 CPPFLAGS="$CPPFLAGS -DOSSP"
 
+CLI_CPPFLAGS=""
+CLI_LDFLAGS=""
+CLI_LIBS=""
+AC_ARG_WITH([editline],
+    AC_HELP_STRING([--with-editline], [build command line interface with line editing support via editline, libedit or GNU readline]),
+    [ac_cv_with_editline=$withval], [ac_cv_with_editline=no])
+AC_CACHE_CHECK([whether to build command line interface with line editing support],
+    [ac_cv_with_editline], [ac_cv_with_editline=no])
+if test ".$ac_cv_with_editline" != ".no"; then
+    CLI_CPPFLAGS="-DEDITLINE"
+    case "$ac_cv_with_editline" in
+        /* ) CLI_LDFLAGS="-L$ac_cv_with_editline" ;;
+    esac
+    OLD_LDFLAGS="$LDFLAGS";
+    OLD_LIBS="$LIBS";
+    LDFLAGS="$LDFLAGS $CLI_LDFLAGS"
+    LIBS=""
+    AC_SEARCH_LIBS(tcgetattr, termcap termlib curses ncurses)
+    AC_SEARCH_LIBS(tputs, termcap termlib curses ncurses)
+    TERM_LIBS="$LIBS"
+    AC_SEARCH_LIBS(readline, editline edit readline,,, [$TERM_LIBS])
+    CLI_LIBS="$LIBS"
+    LDFLAGS="$OLD_LDFLAGS"
+    LIBS="$OLD_LIBS"
+fi
+AC_SUBST(CLI_CPPFLAGS)
+AC_SUBST(CLI_LDFLAGS)
+AC_SUBST(CLI_LIBS)
+
 with_tags=""
 sinclude(libtool.m4)
 AC_PROG_LIBTOOL


ossp-pkg/js/devtool.conf 1.2 -> 1.3

--- devtool.conf 2006/07/22 14:03:51     1.2
+++ devtool.conf 2006/07/22 15:02:07     1.3
@@ -15,6 +15,7 @@
 %configure
     ./configure \
         --prefix=/tmp/js \
+        --with-editline=/usr/opkg/lib \
         --disable-shared \
         "$@"
 

CVSTrac 2.0.1