dnl Curses detection: Munged from Midnight Commander's configure.in dnl dnl What it does: dnl ============= dnl dnl - Determine which version of curses is installed on your system dnl and set the -I/-L/-l compiler entries and add a few preprocessor dnl symbols dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in dnl Makefile.in's dnl - Modify the following configure variables (these are the only dnl curses.m4 variables you can access from within configure.in) dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if dnl an ncurses.h that's been renamed to curses.h dnl is found. dnl CURSES_LIBS - sets -L and -l's appropriately dnl CFLAGS - if --with-sco, add -D_SVID3 dnl has_curses - exports result of tests to rest of configure dnl dnl Usage: dnl ====== dnl 1) Add lines indicated below to acconfig.h dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in dnl 3) Instead of #include you should use the following to dnl properly locate ncurses or curses header file dnl dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) dnl #include dnl #else dnl #include dnl #endif dnl dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS dnl dnl Notes with automake: dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from dnl configure.in dnl - your Makefile.am can look something like this dnl ----------------------------------------------- dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) dnl if HAS_CURSES dnl CURSES_TARGETS=name_of_curses_prog dnl endif dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) dnl other_programs_SOURCES = blah blah blah dnl name_of_curses_prog_SOURCES = blah blah blah dnl other_programs_LDADD = blah dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) dnl ----------------------------------------------- dnl dnl dnl The following lines should be added to acconfig.h: dnl ================================================== dnl dnl /*=== Curses version detection defines ===*/ dnl /* Found some version of curses that we're going to use */ dnl #undef HAS_CURSES dnl dnl /* Use SunOS SysV curses? */ dnl #undef USE_SUNOS_CURSES dnl dnl /* Use old BSD curses - not used right now */ dnl #undef USE_BSD_CURSES dnl dnl /* Use SystemV curses? */ dnl #undef USE_SYSV_CURSES dnl dnl /* Use Ncurses? */ dnl #undef USE_NCURSES dnl dnl /* If you Curses does not have color define this one */ dnl #undef NO_COLOR_CURSES dnl dnl /* Define if you want to turn on SCO-specific code */ dnl #undef SCO_FLAVOR dnl dnl /* Set to reflect version of ncurses * dnl * 0 = version 1.* dnl * 1 = version 1.9.9g dnl * 2 = version 4.0/4.1 */ dnl #undef NCURSES_970530 dnl dnl /*=== End new stuff for acconfig.h ===*/ dnl AC_DEFUN([AC_CHECK_CURSES],[ search_ncurses=true screen_manager="" has_curses=false CFLAGS=${CFLAGS--O} AC_SUBST(CURSES_LIBS) AC_SUBST(CURSES_INCLUDEDIR) AC_ARG_WITH(sco, [ --with-sco Use this to turn on SCO-specific code],[ if test x$withval = xyes; then AC_DEFINE(SCO_FLAVOR) CFLAGS="$CFLAGS -D_SVID3" fi ]) AC_ARG_WITH(sunos-curses, [ --with-sunos-curses Used to force SunOS 4.x curses],[ if test x$withval = xyes; then AC_USE_SUNOS_CURSES fi ]) AC_ARG_WITH(osf1-curses, [ --with-osf1-curses Used to force OSF/1 curses],[ if test x$withval = xyes; then AC_USE_OSF1_CURSES fi ]) AC_ARG_WITH(vcurses, [ --with-vcurses[=incdir] Used to force SysV curses], if test x$withval != xyes; then CURSES_INCLUDEDIR="-I$withval" fi AC_USE_SYSV_CURSES ) AC_ARG_WITH(ncurses, [ --with-ncurses[=dir] Compile with ncurses/locate base dir], if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then CURSES_LIBS="$LIBS -L$withval/lib -lncurses" CURSES_INCLUDEDIR="-I$withval/include" search_ncurses=false screen_manager="ncurses" AC_DEFINE(USE_NCURSES) AC_DEFINE(HAS_CURSES) has_curses=true fi ) if $search_ncurses then AC_SEARCH_NCURSES() fi ]) AC_DEFUN([AC_USE_SUNOS_CURSES], [ search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) AC_DEFINE(USE_SUNOS_CURSES) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" AC_MSG_RESULT(Please note that some screen refreshs may fail) ]) AC_DEFUN([AC_USE_OSF1_CURSES], [ AC_MSG_RESULT(Using OSF1 curses) search_ncurses=false screen_manager="OSF1 curses" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_LIBS="-lcurses" ]) AC_DEFUN([AC_USE_SYSV_CURSES], [ AC_MSG_RESULT(Using SysV curses) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_SYSV_CURSES) search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" ]) dnl AC_ARG_WITH(bsd-curses, dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], dnl search_ncurses=false dnl screen_manager="Ultrix/cursesX" dnl if test $system = ULTRIX dnl then dnl THIS_CURSES=cursesX dnl else dnl THIS_CURSES=curses dnl fi dnl dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" dnl AC_DEFINE(HAS_CURSES) dnl has_curses=true dnl AC_DEFINE(USE_BSD_CURSES) dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) dnl AC_MSG_WARN(Use of the bsdcurses extension has some) dnl AC_MSG_WARN(display/input problems.) dnl AC_MSG_WARN(Reconsider using xcurses) dnl) dnl dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename dnl AC_DEFUN([AC_NCURSES], [ if $search_ncurses then if test -f $1/$2 then AC_MSG_RESULT(Found ncurses on $1/$2) CURSES_LIBS="$3" CURSES_INCLUDEDIR="$4" search_ncurses=false screen_manager=$5 AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) fi fi ]) AC_DEFUN([AC_SEARCH_NCURSES], [ AC_CHECKING("location of ncurses.h file") AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") dnl dnl We couldn't find ncurses, try SysV curses dnl if $search_ncurses then AC_EGREP_HEADER(init_color, /usr/include/curses.h, AC_USE_SYSV_CURSES) AC_EGREP_CPP(USE_NCURSES,[ #include #ifdef __NCURSES_H #undef USE_NCURSES USE_NCURSES #endif ],[ CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) search_ncurses=false screen_manager="ncurses installed as curses" ]) fi dnl dnl Try SunOS 4.x /usr/5{lib,include} ncurses dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES dnl should be replaced by a more fine grained selection routine dnl if $search_ncurses then if test -f /usr/5include/curses.h then AC_USE_SUNOS_CURSES fi else # check for ncurses version, to properly ifdef mouse-fix AC_MSG_CHECKING(for ncurses version) ncurses_version=unknown cat > conftest.$ac_ext < #else #include #endif #undef VERSION VERSION:NCURSES_VERSION EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | egrep "VERSION:" >conftest.out 2>&1; then changequote(,)dnl ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` changequote([,])dnl fi rm -rf conftest* AC_MSG_RESULT($ncurses_version) case "$ncurses_version" in changequote(,)dnl 4.[01]) changequote([,])dnl AC_DEFINE(NCURSES_970530,2) ;; 1.9.9g) AC_DEFINE(NCURSES_970530,1) ;; 1*) AC_DEFINE(NCURSES_970530,0) ;; esac fi ]) eik2004-02-291-1/+1 * Add ruby-dcl, a ruby interface to DCL, a scienific graphical library.pav2004-02-286-0/+314 * update to 1.01 and unbreakmaho2004-02-283-47/+44 * - Make MAINTAINER and COMMENT fields overridable by slave portpav2004-02-281-2/+2 * Add cdcl-gtk, a slave port for science/cdcl with enabled Gtk support.pav2004-02-282-0/+14 * Add cdcl, a scientific graphic library for geosciencepav2004-02-285-0/+675 * Chase repomove graphics/hdf* -> science/hdf*pav2004-02-261-1/+1 * Unhook hdf* ports in graphics, hook them in science.pav2004-02-261-0/+2 * After repocopy from graphics/hdf5,pav2004-02-266-88/+88 * - Update to 1.0.1pav2004-02-253-442/+564 * This is broken on 4.x as well.kris2004-02-231-7/+3 * BROKEN: Checksum mismatchkris2004-02-221-0/+2 * BROKEN on 5.x: does not compilekris2004-02-181-1/+7 * Update to 0.5.3knu2004-02-173-4/+6 * - Fix build on AMD64krion2004-02-081-1/+3 * fix build on currentoliver2004-02-076-30/+104 * - Fix build on -currentkrion2004-02-064-14/+42 * BROKEN: Does not compile on 5.xkris2004-02-052-2/+14 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-0418-2/+18 * Gramps (Genealogical Research and Analysis Management Programming System)pav2004-02-015-0/+502 * - Remove local mastersite now Savannah is backpav2004-01-301-5/+2 * SIZEify.trevor2004-01-3015-0/+15 * SIZEify.trevor2004-01-292-0/+2 * - Update to version 0.7.0krion2004-01-273-57/+66 * - Chase libraries for new math/GiNaC versionkrion2004-01-231-2/+2 * Use the CPIO macro defined in bsd.port.mk.trevor2004-01-221-1/+1 * - Put distfile on MASTER_SITE_LOCAL until Savannah is restoredpav2004-01-081-2/+5 * - Update to version 0.81krion2004-01-065-22/+42 * - Update to 0.4.0pav2004-01-043-3/+3 * Update to 2.2.1maho2003-12-284-30/+234 * - Use canonical form (ports@FreeBSD.org) in MAINTAINER linesergei2003-12-211-1/+1 * - Update to 0.3.90pav2003-12-135-36/+12 * USE_MESA -> USE_GLfjoe2003-12-101-1/+1 * - Make it do actually something useful.pav2003-12-071-4/+9 * - Fix build on 5.xpav2003-12-074-22/+54 * - Update to version 2.5krion2003-11-223-8/+8 * Update maintainer field with my FreeBSD.org address.pav2003-11-142-2/+2 * Use the FIND and XARGS macros introduced in bsd.port.mk 1.391.trevor2003-11-131-1/+2 * upgrade to 1.6.1ijliao2003-11-1310-20/+184 * Forgot to remove EXAMPLEDIRmaho2003-11-101-0/+1 * Remove a patch forgotten in the last commit.marcus2003-11-091-64/+0 * Update to 0.3.6.marcus2003-11-095-4/+33 * . Welcome felt to the science category.glewis2003-11-082-1/+2 * - Chase libraries for new math/GiNaC versionkrion2003-11-071-2/+2 * Chase the gcu shared lib version.marcus2003-11-031-1/+2 * Update to 0.2.0, the first stable release.marcus2003-11-033-12/+7 * upgrade to 0.6.0ijliao2003-10-283-6/+21 * utilize SITE_PERLijliao2003-10-242-6/+5 * add kmovisto 0.5.1ijliao2003-10-245-0/+68 * Before committing the previous BROKEN changes I carefully checked the statuskris2003-10-161-7/+1 * BROKEN on 5.x: does not compilekris2003-10-161-1/+7 * Fix configure by remove -lcipher.osa2003-10-132-2/+4 * - Fix build on 4-stablekrion2003-10-113-8/+41 * Fix CONFIGURE_ENV, this is passed as-is to the shell.maho2003-10-081-2/+2 * Add INSTALLS_SHLIB to the Makefileedwin2003-10-061-0/+2 * Remove #maho2003-10-041-1/+1 * Update to up-to-date developer versionmaho2003-10-043-9/+33 * Honor CFLAGSmaho2003-10-041-1/+1 * a) add support for EMF formatmaho2003-10-041-6/+4 * Update to 2.1.5maho2003-10-042-4/+4 * Chase up new MASTER_SITE_SAVANNAH.edwin2003-10-032-2/+4 * Make portlint(1) happy by changing strip to ${STRIP_CMD}osa2003-09-242-2/+2 * New port: science/at Acoustic ToolBoxedwin2003-09-086-0/+366 * Fix very stupid error.maho2003-09-041-1/+4 * 1) takeover maintainershipmaho2003-09-041-2/+4 * - don't clobber any given LDFLAGSdinoex2003-08-312-2/+2 * Fixed build dependencymaho2003-08-301-2/+2 * Update to 0.3.5.marcus2003-08-293-2/+66 * Update to 0.1.7.marcus2003-08-293-3/+88 * Update to CAD/feltedwin2003-08-255-9/+741 * Fix `fails to patch'maho2003-08-191-13/+0 * - Don't hardcode python version on Makefile and pkg-plist.perky2003-08-184-18/+22 * Fix configure failure (autoconf257 is required)maho2003-08-121-1/+1 * Fix build on 4-STABLEmaho2003-08-081-21/+25 * Update to 2.1.4maho2003-08-034-1715/+1747 * Fix build on gcc-3.3.xmaho2003-08-022-0/+24 * Chase the GtkGLExt shared lib version.marcus2003-07-311-1/+1 * Add bash for BUILD_DEPENDSmaho2003-07-281-0/+1 * Unbreak by clean-ups.maho2003-07-272-11/+8 * Add a missing dependency on libgnomeui.marcus2003-07-271-2/+2 * Add a dependency on gnometarget to quiet a configure warning.marcus2003-07-271-1/+1 * Drop maintainership of science/mmtkdaichi2003-07-251-1/+1 * Added a Numerical Hartree-Fock Program for Diatomic Molecules.maho2003-07-249-0/+496 * Comment out chemtool-devel, which provides a duplicate chemtool-1.6 versionkris2003-07-231-1/+1 * Update to version 0.77.4maho2003-07-213-15/+2 * Update to 1.6 and some clean-up.maho2003-07-217-104/+63 * Fix build on -CURRENT (gcc-3.3)osa2003-07-201-0/+13 * get rid of libgnugetopt dependency for -CURRENT,sf2003-07-142-3/+4 * Add a missing dependency on libbonoboui.marcus2003-07-101-1/+2 * Update to 0.3.4.marcus2003-06-304-7/+19 * Update to 0.1.4.marcus2003-06-307-78/+27 * * Update to 1.100.1marcus2003-06-305-25/+54 * Fix MASTER_SITESerwin2003-06-082-2/+2 * Move inclusion of bsd.port.pre.mk later in the file for conditional BROKENkris2003-06-052-8/+8 * BROKEN on 5.1: bad C++kris2003-05-182-2/+14 * Added new port chemtool-devel.maho2003-05-105-0/+86 * Remove Broken because it really builds by fomer commit.maho2003-05-091-2/+0 * BROKEN: Does not patchkris2003-05-071-0/+2 * Add new port science/ghemicalmaho2003-05-047-0/+225 * remove unnecessary patch to build.maho2003-05-031-18/+0 * Chase guile's shared lib version.marcus2003-05-022-2/+2 * Remove USE_GNOMENG.marcus2003-04-214-4/+0 * Remove an extra plist item.marcus2003-04-131-1/+0 * Update to 2.4kevlo2003-04-082-3/+2 * Add gchempaint, a 2D chemical structure editor for GNOME 2.marcus2003-04-085-0/+95 * Add gchemutils a set of C++ class and GTK+-2 widgets related to chemistry.marcus2003-04-089-0/+151 * forgot to add the patches.edwin2003-04-052-0/+22 * science/openbabel and biology/babel binary names conflictedwin2003-04-052-2/+2 * add mpb 1.4.2ijliao2003-04-045-0/+53 * add libctl 2.2ijliao2003-04-045-0/+96 * Clear moonlight beckons.ade2003-03-074-2/+2 * De-pkg-comment.knu2003-02-218-4/+4 * De-pkg-comment.knu2003-02-212-1/+1 * De-pkg-comment.knu2003-02-2130-15/+15 * de-pkg-commentknu2003-02-214-2/+2 * De-pkg-comment.knu2003-02-212-1/+1 * De-pkg-comment.knu2003-02-182-1/+1 * upgrade to 1.4.5ijliao2003-02-066-4/+6 * Update to 0.3.6.knu2003-02-063-4/+2 * Update to 2.1.3maho2003-02-014-1966/+1976 * upgrade to 0.40ijliao2003-01-1612-165/+18 * add openbabel 1.100.0ijliao2003-01-066-0/+52 * upgrade to 0.77.3ijliao2003-01-042-2/+2 * upgrade to 1.8.0.0ijliao2003-01-043-32/+227 * After repo copy from graphics category, update all appropriatelioux2002-11-291-1/+1 * Add parallel to CATEGORIES.knu2002-11-241-1/+1 * Change ${.CURDIR} to ${MASTERDIR} for slave ports.maho2002-11-201-1/+1 * Fix the problem mpqc and mpqc-mpich portmaho2002-11-186-78/+5233 * Fix the problem mpqc and mpqc-mpich portmaho2002-11-181-1/+1 * o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-1134-34/+17 * upgrade to 0.77.1ijliao2002-11-072-2/+2 * upgrade to 1.60.6ijliao2002-11-074-117/+134 * Use PORTCOMMENT in the Makefile, and whack the pkg-comment.adamw2002-11-0734-17/+34 * Update to 0.77.0dwcjr2002-10-244-24/+28 * - Support CC/CFLAGS/FC/FFLAGS/X11BASE properlyijliao2002-10-223-51/+64 * add xloops-ginac 0.1.3ijliao2002-10-158-0/+70 * add flounder 0.32aijliao2002-10-1522-0/+341 * Use RUBY_MOD*.knu2002-10-072-23/+23 * make the patch work on both -current and -stableijliao2002-10-012-12/+24 * - Support CFLAGS/CXXFLAGS properlyijliao2002-09-201-5/+12 * - Support CFLAGS/CXXFLAGS properlyijliao2002-09-203-12/+16 * add mmtk 2.2ijliao2002-09-166-0/+1047 * fix patch pathijliao2002-09-164-8/+8 * fix build on -currentijliao2002-09-164-0/+96 * Fix build on -stable.marcus2002-09-162-2/+2 * Fix plistkris2002-09-151-0/+2 * Deploy USE_GNOMENG infrastructurelioux2002-09-023-3/+6 * Rename this port to mpqc-mpich to avoid conflicting with mpqc port.kris2002-08-311-0/+2 * Update to 1.5.naddy2002-08-3113-57/+163 * Add missing .pyo files to each pkg-plistperky2002-08-231-0/+53 * Update to version 2.36kevlo2002-08-222-2/+2 * add glens 0.3ijliao2002-08-087-0/+65 * add bblimage 0.66ijliao2002-07-2211-0/+135 * INTERNALLIB has a different meaning in the new bsd.lib.mkru2002-07-222-4/+0 * correct the installation pathijliao2002-07-171-7/+2 * forgot a "\"ijliao2002-07-161-1/+1 * add mpqc-mpichijliao2002-07-162-0/+26 * fix broken and make some enhancementijliao2002-07-163-7/+175 * - GNU_CONFIGURE -> USE_LIBTOOLijliao2002-07-1410-12/+72 * PERL -> REINPLACE_CMDijliao2002-07-081-4/+5 * oops... forgot to add this oneijliao2002-07-072-0/+22 * add HDF5 1.4.4ijliao2002-07-07