X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=configure.in;h=b6f6fa3cba13e651be438ed5c112de83aa750d69;hp=e4784718162dd3721353da1ccfd1f4790a87490e;hb=9f29c8b32c972db1178d6f8551d5cd57ceb67083;hpb=acd157c5e61e2eeba8308a49b4d7fc4a4aba9a84 diff --git a/configure.in b/configure.in index e478471..b6f6fa3 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout dnl CDPATH= AC_INIT(src/ctsim.cpp) -AM_INIT_AUTOMAKE(ctsim,3.0.0alpha4) +AM_INIT_AUTOMAKE(ctsim,3.0.0beta1) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -39,6 +39,9 @@ AC_CHECK_LIB(m, sin) AC_CHECK_LIB(curses, main, [curses=true], [curses=false]) AC_CHECK_LIB(ncurses, main, [ncurses=true], [ncurses=false]) AC_CHECK_LIB(g2, main, [g2=true], [g2=false]) +AC_CHECK_LIB(readline, main, [readline=true; AC_DEFINE(HAVE_READLINE)], [readline=false]) +AC_CHECK_LIB(ncurses, main, [ncurses=true; AC_DEFINE(HAVE_NCURSES)], [ncurses=false]) +AC_CHECK_LIB(curses, main, [curses=true; AC_DEFINE(HAVE_CURSES)], [curses=false]) wxwin=false AC_CHECK_LIB(wx_gtk, main, [wxwin=true; wx_gtk=true; AC_DEFINE(HAVE_WXWINDOWS)]) AC_CHECK_LIB(wx, main, [wxwin=true; wx_msw=true; AC_DEFINE(HAVE_WXWINDOWS)]) @@ -51,7 +54,7 @@ fi dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h) +AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h assert.h sys/time.h sys/resource.h sys/time.h readline.h readline/readline.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -82,6 +85,15 @@ if test "${getopt_long}" = "false" ; then AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1) fi +if test "${readline}" = "true" ; then + ctlibs_base="$ctlibs_base -lreadline" + if test "${ncurses}" = "true"; then + ctlibs_base="$ctlibs_base -lncurses" + elif test "${curses}" = "true"; then + ctlibs_base="$ctlibs_base -lcurses" + fi +fi + dnl Check for debug mode AC_MSG_CHECKING([debug]) AC_ARG_ENABLE(debug, @@ -104,8 +116,8 @@ dnl AC_ADD_GCC_CFLAGS([-g -DDEBUG]) CFLAGS="-g -DDEBUG" AC_DEFINE(DEBUG) else -dnl AC_ADD_GCC_CFLAGS([-g -O2 -DNDEBUG]) - CFLAGS="-g -O3 -DNDEBUG" +dnl AC_ADD_GCC_CFLAGS([-O2 -DNDEBUG]) + CFLAGS="-O3 -DNDEBUG -fomit-frame-pointer" AC_DEFINE(NDEBUG) fi @@ -364,7 +376,7 @@ ctlibs="$ctlibs_base -lctsim $ctlibs_graphics -lctsupport $ctlibs_tools" AC_SUBST(ctlibs) if test -n "$lamdir" ; then - lamprograms="pjrec-lam phm2if-lam phm2pj-lam" + lamprograms="ctsimtext-lam" AC_SUBST(lamprograms) lamdefs="$CFLAGS" AC_SUBST(lamdefs) @@ -372,4 +384,4 @@ fi CXXFLAGS="$CFLAGS" -AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile) +AC_OUTPUT(Makefile libctgraphics/Makefile libctsupport/Makefile libctsim/Makefile Makefile man/Makefile doc/Makefile cgi-bin/ctsim.cgi cgi-bin/Makefile html/simulate.html html/Makefile include/Makefile getopt/Makefile tools/sample-ctsim.sh cgi-bin/ctsim.conf tools/Makefile src/Makefile doc/tex2rtf/Makefile)