Skip to content

Commit

Permalink
Improved portability on Cygwin and DJGPP.
Browse files Browse the repository at this point in the history
git-svn-id: https://ctags.svn.sourceforge.net/svnroot/ctags/trunk@307 c5d04d22-be80-434c-894e-aa346cc9e8e8
  • Loading branch information
Darren Hiebert committed Mar 31, 2003
1 parent 545fed8 commit 8a0b377
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 158 deletions.
8 changes: 7 additions & 1 deletion INSTALL.oth
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For non-Unix platforms, simple makefiles are provided:
descrip.mms For VMS using either DEC C or VAX C
mk_bc3.mak For MSDOS using Borland C/C++ 3.x
mk_bc5.mak For Win32 using Borland C++ 5.5
mk_djg.mak For MSDOS using Gnu GCC (DJGPP)
mk_djg.mak For MSDOS using DJGPP Gnu GCC (better to follow Unix install)
mk_manx.mak For Amiga using Aztec/Manx C 5.0
mk_ming.mak For Win32 using Mingw32
mk_mpw.mak For Macintosh using MPW
Expand All @@ -34,6 +34,12 @@ Win32:
See the makefiles, mk_mvc.mak or mk_bc5.mak, to learn how to build with
this library.

DJGPP:
------

It is better to follow the standard Unix install on DJGPP, but this requires
that you use BASH and requires a fairly complete installation of GJGPP
packages. You can use mk_djg.mak if you can't run configure.

Macintosh with MPW:
-------------------
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Current Version: @@VERSION@@

ctags-5.5 (Sat Mar 29 2003)
ctags-5.5 (Sun Mar 30 2003)
* Changed kind indicator for methods from 'f' to 'm' [Tcl].
* Changed tags within interfaces to be disabled by default (like prototypes in
C/C++) [Fortran].
Expand Down Expand Up @@ -42,6 +42,7 @@ ctags-5.5 (Sat Mar 29 2003)
* Fixed man page errors and omissions.
* Fixed bug in readFieldValue() in readtags library.
* Fixed bug in option parsing in readtags command-line program.
* Fixed portability problems with Cygwin and DJGPP.

ctags-5.4 (Thu Oct 17 2002)
* Improved ability for tagsOpen() in readtags library to report failure to
Expand Down
93 changes: 55 additions & 38 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ AC_ARG_ENABLE(maintainer-mode,
[ --enable-maintainer-mode
use maintainer makefile])

AC_ARG_ENABLE(shell-globbing,
[ --enable-shell-globbing=DIR
does shell expand wildcards (yes|no)? [yes]])

AC_ARG_ENABLE(tmpdir,
[ --enable-tmpdir=DIR default directory for temporary files [ARG=/tmp]],
tmpdir_specified=yes)
Expand Down Expand Up @@ -112,31 +116,6 @@ if test "$enable_macro_patterns" = yes ; then
AC_MSG_RESULT(tag file will use patterns for macros by default)
fi

AC_MSG_CHECKING(selected sort method)
if test no = "$enable_external_sort"; then
AC_MSG_RESULT(simple internal algorithm)
else
AC_MSG_RESULT(external sort utility)
enable_external_sort=no
AC_CHECK_PROG(sort_found, sort, yes, no)
if test "$sort_found" = yes ; then
AC_MSG_CHECKING(if sort accepts our command line)
touch /tmp/sort.test
sort -u -f -o /tmp/sort.test /tmp/sort.test 1>/dev/null 2>&1
if test $? -ne 0 ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_DEFINE(EXTERNAL_SORT)
enable_external_sort=yes
fi
rm -f /tmp/sort.test
fi
fi
if test "$enable_external_sort" != yes ; then
AC_MSG_RESULT(using internal sort algorithm as fallback)
fi

dnl Checks for programs
dnl -------------------

Expand Down Expand Up @@ -172,6 +151,30 @@ AC_CHECK_PROG(STRIP, strip, strip, :)
dnl Checks for operating environment
dnl --------------------------------

dnl Check for temporary directory
AC_MSG_CHECKING(directory to use for temporary files)
if test -n "$enable_tmpdir"; then
tmpdir="$enable_tmpdir"
elif test -n "$TMPDIR"; then
tmpdir="$TMPDIR"
elif test -n "$TMPDIR"; then
tmpdir="$TMPDIR"
elif test -n "$TMP"; then
tmpdir="$TMP"
elif test -n "$TEMP"; then
tmpdir="$TEMP"
elif test -d "c:/"; then
tmpdir="c:/"
else
tmpdir="/tmp"
fi
if test -d $tmpdir ; then
AC_MSG_RESULT($tmpdir)
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir")
else
AC_MSG_ERROR($tmpdir does not exist)
fi

dnl Check whether system supports #! scripts
AC_SYS_INTERPRETER
if test yes = "$interpval"; then
Expand All @@ -189,6 +192,31 @@ else
fi
rm -f conftest.cif

AC_MSG_CHECKING(selected sort method)
if test no = "$enable_external_sort"; then
AC_MSG_RESULT(simple internal algorithm)
else
AC_MSG_RESULT(external sort utility)
enable_external_sort=no
AC_CHECK_PROG(sort_found, sort, yes, no)
if test "$sort_found" = yes ; then
AC_MSG_CHECKING(if sort accepts our command line)
touch ${tmpdir}/sort.test
sort -u -f -o ${tmpdir}/sort.test ${tmpdir}/sort.test 1>/dev/null 2>&1
if test $? -ne 0 ; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
AC_DEFINE(EXTERNAL_SORT)
enable_external_sort=yes
fi
rm -f ${tmpdir}/sort.test
fi
fi
if test "$enable_external_sort" != yes ; then
AC_MSG_RESULT(using internal sort algorithm as fallback)
fi


dnl Checks for header files
dnl -----------------------
Expand Down Expand Up @@ -276,21 +304,10 @@ if test "$have_mkstemp" != yes -a "$have_tempnam" != yes; then
if test "$tmpdir_specified" = yes ; then
AC_MSG_RESULT(use of tmpnam overrides temporary directory selection)
fi
else
AC_MSG_CHECKING(directory to use for temporary files)
if test -z "$enable_tmpdir" -o "$enable_tmpdir" = no -o "$enable_tmpdir" = yes ;
then tmpdir=/tmp
else tmpdir="$enable_tmpdir"
fi
if test -d $tmpdir ; then
AC_MSG_RESULT($tmpdir)
AC_DEFINE_UNQUOTED(TMPDIR, "$tmpdir")
else
AC_MSG_WARN($tmpdir does not exist)
fi
fi

AC_CHECK_FUNCS(strerror opendir)
AC_CHECK_FUNCS(opendir findfirst _findfirst, break)
AC_CHECK_FUNCS(strerror)
AC_CHECK_FUNCS(clock times, break)
AC_CHECK_FUNCS(remove, have_remove=yes,
CHECK_HEADER_DEFINE(remove, unistd.h,, AC_DEFINE(remove, unlink)))
Expand Down
26 changes: 24 additions & 2 deletions e_djgpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,34 @@

#define CASE_INSENSITIVE_FILENAMES 1
#define MSDOS_STYLE_PATH 1
#define HAVE_DIR_H 1

#define HAVE_DIRENT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_FNMATCH_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_DIR_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1

#define HAVE_CLOCK 1
#define HAVE_FGETPOS 1
#define HAVE_FINDFIRST 1
#define HAVE_FNMATCH 1
#define HAVE_MKSTEMP 1
#define HAVE_OPENDIR 1
#define HAVE_REGCOMP 1
#define HAVE_REMOVE 1
#define HAVE_SETENV 1
#define HAVE_STAT_ST_INO 1
#define HAVE_STRCASECMP 1
#define HAVE_STRERROR 1
#define HAVE_STRNCASECMP 1
#define HAVE_STRSTR 1
#define HAVE_TRUNCATE 1
#define NEED_PROTO_LSTAT 1
#define STDC_HEADERS 1

#endif
1 change: 1 addition & 0 deletions e_msoft.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define errout stdout

#define CASE_INSENSITIVE_FILENAMES 1
#define MANUAL_GLOBBING 1
#define MSDOS_STYLE_PATH 1
#define HAVE_DOS_H 1
#define HAVE_FCNTL_H 1
Expand Down
8 changes: 0 additions & 8 deletions general.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@
# endif
#endif

#ifndef HAVE_STRICMP
# define stricmp(s1,s2) struppercmp(s1,s2)
#endif

#ifndef HAVE_STRICMP
# define strnicmp(s1,s2,n) strnuppercmp(s1,s2,n)
#endif

/*
* DATA DECLARATIONS
*/
Expand Down
Loading

0 comments on commit 8a0b377

Please sign in to comment.