"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "autoconf/aclocal.m4" between
most-5.0.0a.tar.gz and most-5.1.0.tar.gz

About: most is a textfile paging program (supports multiple windows and can scroll left and right).

aclocal.m4  (most-5.0.0a):aclocal.m4  (most-5.1.0)
dnl# -*- mode: sh; mode: fold -*- dnl# -*- mode: sh; mode: fold -*-
dnl# 0.3.3-1: Use INSTALL instead of INSTALL_DATA to install modules to get exec
utable permissions
dnl# 0.3.3-0: Added $(OBJ_O_DEPS) and $(ELF_O_DEPS) to PROGRAM_OBJECT_RULES
dnl# 0.3.2-0: Add rpath support for freebsd
dnl# 0.3.1-0: New output variable: CC_SHARED_FLAGS; CC_SHARED is deprecated
dnl# 0.3.0-0: Added support for parsing /etc/ld.so.conf
dnl# 0.2.7-3: Change ncurses5w-config to ncursesw5-config (Gilles Espinasse)
dnl# 0.2.7-2: For the Makefile rules, use cd foo && bar instead of cd foo; bar
dnl# 0.2.7-1: Use "$ARCH"elfobjs instead of elf"$ARCH"objs for better flexibilit
y
dnl# 0.2.7-0: Instead of expanding $ARCH at configure time, use \$ARCH for compi
le-time expansion
dnl# 0.2.6-2: Missing hyphen for cygwin ELFLIB_MAJOR (Marco Atzeri)
dnl# 0.2.6-1: Added optional second and third arguments to AC_DEFINE (Marco Atze
ri)
dnl# 0.2.6-0: On cygwin, change libfooX_Y_Z.dll to cygfoo-X_Y_Z.dll (Marco Atzer
i)
dnl# 0.2.5-3: Changed AC_DEFUN(foo...) to AC_DEFUN([foo]...)
dnl# 0.2.5-2: JD_CHECK_FOR_LIBRARY will alse output *_INC_DIR and *_LIB_DIR
dnl# 0.2.5-1: Updated using autoupdate
dnl# 0.2.5-0: M_LIB output variable created for haiku support (Scott McCreary)
dnl# 0.2.4-0: Added optional 3rd argument to JD_WITH_LIBRARY for a default path
dnl# 0.2.3-2: X was missing in a "test" statement (Joerg Sommer)
dnl# 0.2.3-1: AC_AIX needs to be called before running the compiler (Miroslav Li
chvar)
dnl# 0.2.3: rewrote JD_CHECK_FOR_LIBRARY to loop over include/lib pairs
dnl# 0.2.2-1: JD_WITH_LIBRARY bug-fix
dnl# 0.2.2: Use ncurses5-config to search for terminfo dirs.
dnl# 0.2.1: Add .dll.a to list of extensions to when searching for libs (cygwin ) dnl# 0.2.1: Add .dll.a to list of extensions to when searching for libs (cygwin )
dnl# 0.2.0: Added install target name and more fixes for cygwin dnl# 0.2.0: Added install target name and more fixes for cygwin
dnl# 0.1.12: Improved support for cygwin dnl# 0.1.12: Improved support for cygwin
dnl# 0.1.11: Fixed elf linking on freebsd (Renato Botelho (garga at freebsd, org ) dnl# 0.1.11: Fixed elf linking on freebsd (Renato Botelho (garga at freebsd, org )
dnl# Version 0.1.10: rpath support for netbsd dnl# Version 0.1.10: rpath support for netbsd
dnl# Version 0.1.9: When searching for libs, use dylib on darwin dnl# Version 0.1.9: When searching for libs, use dylib on darwin
dnl# Version 0.1.8: Add rpath support for OpenBSD dnl# Version 0.1.8: Add rpath support for OpenBSD
dnl# Version 0.1.7: removed "-K pic" from IRIX compiler lines dnl# Version 0.1.7: removed "-K pic" from IRIX compiler lines
dnl# Version 0.1.6: Added cygwin module support dnl# Version 0.1.6: Added cygwin module support
dnl# Version 0.1.5: Added gcc version-script support. dnl# Version 0.1.5: Added gcc version-script support.
dnl#
AC_DEFUN(JD_INIT, dnl#{{{ AC_DEFUN([JD_INIT], dnl#{{{
[ [
#These variable are initialized by JD init function #These variable are initialized by JD init function
CONFIG_DIR=`pwd` CONFIG_DIR=`pwd`
cd $srcdir cd $srcdir
if test "`pwd`" != "$CONFIG_DIR" if test "`pwd`" != "$CONFIG_DIR"
then then
AC_MSG_ERROR("This software does not support configuring from another director y. See the INSTALL file") AC_MSG_ERROR("This software does not support configuring from another director y. See the INSTALL file")
fi fi
dnl# if test "X$PWD" != "X" dnl# if test "X$PWD" != "X"
dnl# then dnl# then
skipping to change at line 43 skipping to change at line 64
JD_Above_Dir=`cd ..;pwd` JD_Above_Dir=`cd ..;pwd`
fi fi
JD_Above_Dir2=`cd ..;pwd` JD_Above_Dir2=`cd ..;pwd`
]) ])
dnl#}}} dnl#}}}
dnl# This function expand the "prefix variables. For example, it will expand dnl# This function expand the "prefix variables. For example, it will expand
dnl# values such as ${exec_prefix}/foo when ${exec_prefix} itself has a dnl# values such as ${exec_prefix}/foo when ${exec_prefix} itself has a
dnl# of ${prefix}. This function produces the shell variables: dnl# of ${prefix}. This function produces the shell variables:
dnl# jd_prefix_libdir, jd_prefix_incdir dnl# jd_prefix_libdir, jd_prefix_incdir
AC_DEFUN(JD_EXPAND_PREFIX, dnl#{{{ AC_DEFUN([JD_EXPAND_PREFIX], dnl#{{{
[ [
if test "X$jd_prefix" = "X" if test "X$jd_prefix" = "X"
then then
jd_prefix=$ac_default_prefix jd_prefix=$ac_default_prefix
if test "X$prefix" != "XNONE" if test "X$prefix" != "XNONE"
then then
jd_prefix="$prefix" jd_prefix="$prefix"
fi fi
jd_exec_prefix="$jd_prefix" jd_exec_prefix="$jd_prefix"
if test "X$exec_prefix" != "XNONE" if test "X$exec_prefix" != "XNONE"
skipping to change at line 72 skipping to change at line 93
exec_prefix=$jd_exec_prefix exec_prefix=$jd_exec_prefix
libdir=$libdir libdir=$libdir
includedir=$includedir includedir=$includedir
echo jd_prefix_libdir="\$libdir" jd_prefix_incdir="\$includedir" echo jd_prefix_libdir="\$libdir" jd_prefix_incdir="\$includedir"
EOF EOF
` `
fi fi
]) ])
#}}} #}}}
AC_DEFUN(JD_SET_OBJ_SRC_DIR, dnl#{{{ AC_DEFUN([JD_GET_SYS_INCLIBS], dnl#{{{
[
if test -x $ac_aux_dir/scripts/getsyslibs.sh
then
JD_SYS_INCLIBS=`$ac_aux_dir/scripts/getsyslibs.sh`
else
JD_SYS_INCLIBS=""
fi
])
dnl#}}}
AC_DEFUN([JD_SET_OBJ_SRC_DIR], dnl#{{{
[ [
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Set the source directory and object directory. The makefile assumes an # Set the source directory and object directory. The makefile assumes an
# absolute path name. This is because src/Makefile cds to OBJDIR and compiles # absolute path name. This is because src/Makefile cds to OBJDIR and compiles
# the src file which is in SRCDIR # the src file which is in SRCDIR
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SRCDIR=$CONFIG_DIR SRCDIR=$CONFIG_DIR
if test "$1" != "." if test "$1" != "."
then then
if test -z "$1" if test -z "$1"
then then
SRCDIR=$SRCDIR/src SRCDIR=$SRCDIR/src
else else
SRCDIR=$SRCDIR/$1 SRCDIR=$SRCDIR/$1
fi fi
fi fi
OBJDIR=$SRCDIR/"$ARCH"objs OBJDIR=$SRCDIR/"\$(ARCH)"objs
ELFDIR=$SRCDIR/elf"$ARCH"objs ELFDIR=$SRCDIR/"\$(ARCH)"elfobjs
AC_SUBST(SRCDIR)dnl AC_SUBST(SRCDIR)dnl
AC_SUBST(OBJDIR)dnl AC_SUBST(OBJDIR)dnl
AC_SUBST(ELFDIR)dnl AC_SUBST(ELFDIR)dnl
]) ])
dnl#}}} dnl#}}}
RPATH="" RPATH=""
AC_DEFUN(JD_INIT_RPATH, dnl#{{{ AC_DEFUN([JD_INIT_RPATH], dnl#{{{
[ [
dnl# determine whether or not -R or -rpath can be used dnl# determine whether or not -R or -rpath can be used
case "$host_os" in case "$host_os" in
*linux*|*solaris* ) *linux*|*solaris* )
if test "X$GCC" = Xyes if test "X$GCC" = Xyes
then then
if test "X$ac_R_nospace" = "Xno" if test "X$ac_R_nospace" = "Xno"
then then
RPATH="-Wl,-R," RPATH="-Wl,-R,"
else else
skipping to change at line 121 skipping to change at line 153
fi fi
else else
if test "X$ac_R_nospace" = "Xno" if test "X$ac_R_nospace" = "Xno"
then then
RPATH="-R " RPATH="-R "
else else
RPATH="-R" RPATH="-R"
fi fi
fi fi
;; ;;
*osf*|*openbsd*) *osf*|*openbsd*|*freebsd*)
if test "X$GCC" = Xyes if test "X$GCC" = Xyes
then then
RPATH="-Wl,-rpath," RPATH="-Wl,-rpath,"
else else
RPATH="-rpath " RPATH="-rpath "
fi fi
;; ;;
*netbsd*) *netbsd*)
if test "X$GCC" = Xyes if test "X$GCC" = Xyes
then then
RPATH="-Wl,-R" RPATH="-Wl,-R"
fi fi
;; ;;
esac esac
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_SET_RPATH, dnl#{{{ AC_DEFUN([JD_SET_RPATH], dnl#{{{
[ [
if test "X$1" != "X" if test "X$1" != "X"
then then
if test "X$RPATH" = "X" if test "X$RPATH" = "X"
then then
JD_INIT_RPATH JD_INIT_RPATH
if test "X$RPATH" != "X" if test "X$RPATH" != "X"
then then
RPATH="$RPATH$1" RPATH="$RPATH$1"
fi fi
else else
RPATH="$RPATH:$1" _already_there=0
for X in `echo $RPATH | sed 's/:/ /g'`
do
if test "$X" = "$1"
then
_already_there=1
break
fi
done
if test $_already_there = 0
then
RPATH="$RPATH:$1"
fi
fi fi
fi fi
]) ])
AC_SUBST(RPATH)dnl AC_SUBST(RPATH)dnl
dnl#}}} dnl#}}}
AC_DEFUN(JD_UPPERCASE, dnl#{{{ AC_DEFUN([JD_UPPERCASE], dnl#{{{
[ [
changequote(<<, >>)dnl changequote(<<, >>)dnl
define(<<$2>>, translit($1, [a-z], [A-Z]))dnl define(<<$2>>, translit($1, [a-z], [A-Z]))dnl
changequote([, ])dnl changequote([, ])dnl
]) ])
#}}} #}}}
AC_DEFUN(JD_SIMPLE_LIB_DIR, dnl#{{{ AC_DEFUN([JD_SIMPLE_LIB_DIR], dnl#{{{
[ [
JD_UPPERCASE($1,JD_UP_NAME) JD_UPPERCASE($1,JD_UP_NAME)
JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/libsrc/"$ARCH"objs JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/libsrc/"$ARCH"objs
JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/libsrc JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/libsrc
if test ! -d "[$]JD_UP_NAME[]_INCLUDE" if test ! -d "[$]JD_UP_NAME[]_INCLUDE"
then then
JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/src/"$ARCH"objs JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/src/"$ARCH"objs
JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/src JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/src
if test ! -d "[$]JD_UP_NAME[]_INCLUDE" if test ! -d "[$]JD_UP_NAME[]_INCLUDE"
skipping to change at line 194 skipping to change at line 238
fi fi
fi fi
AC_SUBST(JD_UP_NAME[]_LIB_DIR)dnl AC_SUBST(JD_UP_NAME[]_LIB_DIR)dnl
AC_SUBST(JD_UP_NAME[]_INCLUDE)dnl AC_SUBST(JD_UP_NAME[]_INCLUDE)dnl
undefine([JD_UP_NAME])dnl undefine([JD_UP_NAME])dnl
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_FIND_GENERIC, dnl#{{{ AC_DEFUN([JD_FIND_GENERIC], dnl#{{{
[ [
AC_REQUIRE([JD_EXPAND_PREFIX])dnl AC_REQUIRE([JD_EXPAND_PREFIX])dnl
changequote(<<, >>)dnl changequote(<<, >>)dnl
define(<<JD_UP_NAME>>, translit($1, [a-z], [A-Z]))dnl define(<<JD_UP_NAME>>, translit($1, [a-z], [A-Z]))dnl
changequote([, ])dnl changequote([, ])dnl
# Look for the JD_UP_NAME package # Look for the JD_UP_NAME package
#JD_UP_NAME[]_INCLUDE="" #JD_UP_NAME[]_INCLUDE=""
#JD_UP_NAME[]_LIB_DIR="" #JD_UP_NAME[]_LIB_DIR=""
skipping to change at line 271 skipping to change at line 315
echo Unable to find the $JD_UP_NAME library. echo Unable to find the $JD_UP_NAME library.
echo You may have to edit $CONFIG_DIR/src/Makefile. echo You may have to edit $CONFIG_DIR/src/Makefile.
JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/src JD_UP_NAME[]_INCLUDE=$JD_Above_Dir/$1/src
JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/src/"$ARCH"objs JD_UP_NAME[]_LIB_DIR=$JD_Above_Dir/$1/src/"$ARCH"objs
jd_have_$1="no" jd_have_$1="no"
fi fi
JD_UP_NAME[]_INC="-I[$]JD_UP_NAME[]_INCLUDE" JD_UP_NAME[]_INC="-I[$]JD_UP_NAME[]_INCLUDE"
JD_UP_NAME[]_LIB="-L[$]JD_UP_NAME[]_LIB_DIR" JD_UP_NAME[]_LIB="-L[$]JD_UP_NAME[]_LIB_DIR"
JD_SET_RPATH([$]JD_UP_NAME[]_LIB_DIR) JD_SET_RPATH([$]JD_UP_NAME[]_LIB_DIR)
dnl if test "X$GCC" = Xyes dnl# if test "X$GCC" = Xyes
dnl then dnl# then
dnl RPATH_[]JD_UP_NAME="-Wl,-R[$]JD_UP_NAME[]_LIB_DIR" dnl# RPATH_[]JD_UP_NAME="-Wl,-R[$]JD_UP_NAME[]_LIB_DIR"
dnl else dnl# else
dnl RPATH_[]JD_UP_NAME="-R[$]JD_UP_NAME[]_LIB_DIR" dnl# RPATH_[]JD_UP_NAME="-R[$]JD_UP_NAME[]_LIB_DIR"
dnl fi dnl# fi
# gcc under solaris is often not installed correctly. Avoid specifying # gcc under solaris is often not installed correctly. Avoid specifying
# -I/usr/include. # -I/usr/include.
if test "[$]JD_UP_NAME[]_INC" = "-I/usr/include" if test "[$]JD_UP_NAME[]_INC" = "-I/usr/include"
then then
JD_UP_NAME[]_INC="" JD_UP_NAME[]_INC=""
fi fi
if test "[$]JD_UP_NAME[]_LIB" = "-L/usr/lib" if test "[$]JD_UP_NAME[]_LIB" = "-L/usr/lib"
then then
JD_UP_NAME[]_LIB="" JD_UP_NAME[]_LIB=""
RPATH_[]JD_UP_NAME="" RPATH_[]JD_UP_NAME=""
fi fi
AC_SUBST(JD_UP_NAME[]_LIB)dnl AC_SUBST(JD_UP_NAME[]_LIB)dnl
AC_SUBST(JD_UP_NAME[]_INC)dnl AC_SUBST(JD_UP_NAME[]_INC)dnl
AC_SUBST(JD_UP_NAME[]_LIB_DIR)dnl AC_SUBST(JD_UP_NAME[]_LIB_DIR)dnl
AC_SUBST(JD_UP_NAME[]_INCLUDE)dnl AC_SUBST(JD_UP_NAME[]_INCLUDE)dnl
dnl AC_SUBST(RPATH_[]JD_UP_NAME)dnl dnl# AC_SUBST(RPATH_[]JD_UP_NAME)dnl
undefine([JD_UP_NAME])dnl undefine([JD_UP_NAME])dnl
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_FIND_SLANG, dnl#{{{ AC_DEFUN([JD_FIND_SLANG], dnl#{{{
[ [
JD_FIND_GENERIC(slang) JD_FIND_GENERIC(slang)
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_GCC_WARNINGS, dnl#{{{ AC_DEFUN([JD_GCC_WARNINGS], dnl#{{{
[ [
AC_ARG_ENABLE(warnings, AC_ARG_ENABLE(warnings,
[ --enable-warnings turn on GCC compiler warnings], AC_HELP_STRING([--enable-warnings],[turn on GCC compiler warnings]) ,
[gcc_warnings=$enableval]) [gcc_warnings=$enableval])
if test -n "$GCC" if test -n "$GCC"
then then
#CFLAGS="$CFLAGS -fno-strength-reduce" #CFLAGS="$CFLAGS -fno-strength-reduce"
if test -n "$gcc_warnings" if test -n "$gcc_warnings"
then then
CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \ CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes" -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
-Wformat=2"
# Now trim excess whitespace # Now trim excess whitespace
CFLAGS=`echo $CFLAGS` CFLAGS=`echo $CFLAGS`
fi fi
fi fi
]) ])
dnl#}}} dnl#}}}
IEEE_CFLAGS="" IEEE_CFLAGS=""
AC_DEFUN(JD_IEEE_CFLAGS, dnl#{{{ AC_DEFUN([JD_IEEE_CFLAGS], dnl#{{{
[ [
case "$host_cpu" in case "$host_cpu" in
*alpha* ) *alpha* )
if test "$GCC" = yes if test "$GCC" = yes
then then
IEEE_CFLAGS="-mieee" IEEE_CFLAGS="-mieee"
else else
IEEE_CFLAGS="-ieee_with_no_inexact" IEEE_CFLAGS="-ieee_with_no_inexact"
fi fi
;; ;;
* ) * )
IEEE_CFLAGS="" IEEE_CFLAGS=""
esac esac
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_CREATE_ORULE, dnl#{{{ AC_DEFUN([JD_CREATE_ORULE], dnl#{{{
[ [
PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
\$(OBJDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$("$1"_O_DEP) \$(OBJDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$(OBJ_O_DEPS) \$("$1"_O_DEP)
cd \$(OBJDIR); \$(COMPILE_CMD) \$("$1"_C_FLAGS) \$(SRCDIR)/$1.c cd \$(OBJDIR) && \$(COMPILE_CMD) \$("$1"_C_FLAGS) \$(SRCDIR)/$1.c
" "
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_CREATE_ELFORULE, dnl#{{{ AC_DEFUN([JD_CREATE_ELFORULE], dnl#{{{
[ [
PROGRAM_ELF_ORULES="$PROGRAM_ELF_ORULES PROGRAM_ELF_ORULES="$PROGRAM_ELF_ORULES
\$(ELFDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$("$1"_O_DEP) \$(ELFDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$(ELF_O_DEPS) \$("$1"_O_DEP)
cd \$(ELFDIR); \$(ELFCOMPILE_CMD) \$("$1"_C_FLAGS) \$(SRCDIR)/$1.c cd \$(ELFDIR) && \$(ELFCOMPILE_CMD) \$("$1"_C_FLAGS) \$(SRCDIR)/$1.c
" "
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_CREATE_EXEC_RULE, dnl#{{{ AC_DEFUN([JD_CREATE_EXEC_RULE], dnl#{{{
[ [
PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES PROGRAM_OBJECT_RULES="$PROGRAM_OBJECT_RULES
$1 : \$(OBJDIR)/$1 $1 : \$(OBJDIR)/$1
@echo $1 created in \$(OBJDIR) @echo $1 created in \$(OBJDIR)
\$(OBJDIR)/$1 : \$(OBJDIR)/$1.o \$("$1"_DEPS) \$(EXECDEPS) \$(OBJDIR)/$1 : \$(OBJDIR)/$1.o \$("$1"_DEPS) \$(EXECDEPS)
\$(CC) -o \$(OBJDIR)/$1 \$(LDFLAGS) \$(OBJDIR)/$1.o \$("$1"_LIBS) \$(EXEC LIBS) \$(CC) -o \$(OBJDIR)/$1 \$(LDFLAGS) \$(OBJDIR)/$1.o \$("$1"_LIBS) \$(EXEC LIBS)
\$(OBJDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$("$1"_O_DEP) \$(OBJDIR)/$1.o : \$(SRCDIR)/$1.c \$(DOT_O_DEPS) \$("$1"_O_DEP)
cd \$(OBJDIR); \$(COMPILE_CMD) \$("$1"_INC) \$(EXECINC) \$(SRCDIR)/$1.c cd \$(OBJDIR) &&; \$(COMPILE_CMD) \$("$1"_INC) \$(EXECINC) \$(SRCDIR)/$1.c
" "
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_CREATE_MODULE_ORULES, dnl#{{{ AC_DEFUN([JD_CREATE_MODULE_ORULES], dnl#{{{
[ [
for program_module in $Program_Modules; do for program_module in $Program_Modules; do
JD_CREATE_ORULE($program_module) JD_CREATE_ORULE($program_module)
JD_CREATE_ELFORULE($program_module) JD_CREATE_ELFORULE($program_module)
done done
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_GET_MODULES, dnl#{{{ AC_DEFUN([JD_GET_MODULES], dnl#{{{
[ [
PROGRAM_HFILES="" PROGRAM_HFILES=""
PROGRAM_OFILES="" PROGRAM_OFILES=""
PROGRAM_CFILES="" PROGRAM_CFILES=""
PROGRAM_OBJECTS="" PROGRAM_OBJECTS=""
PROGRAM_ELFOBJECTS="" PROGRAM_ELFOBJECTS=""
PROGRAM_OBJECT_RULES="" PROGRAM_OBJECT_RULES=""
PROGRAM_ELF_ORULES="" PROGRAM_ELF_ORULES=""
if test -z "$1" if test -z "$1"
then then
skipping to change at line 428 skipping to change at line 473
dnl echo $PROGRAM_HFILES dnl echo $PROGRAM_HFILES
AC_SUBST(PROGRAM_OFILES)dnl AC_SUBST(PROGRAM_OFILES)dnl
AC_SUBST(PROGRAM_CFILES)dnl AC_SUBST(PROGRAM_CFILES)dnl
AC_SUBST(PROGRAM_HFILES)dnl AC_SUBST(PROGRAM_HFILES)dnl
AC_SUBST(PROGRAM_OBJECTS)dnl AC_SUBST(PROGRAM_OBJECTS)dnl
AC_SUBST(PROGRAM_ELFOBJECTS)dnl AC_SUBST(PROGRAM_ELFOBJECTS)dnl
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_APPEND_RULES, dnl#{{{ AC_DEFUN([JD_APPEND_RULES], dnl#{{{
[ [
echo "$PROGRAM_OBJECT_RULES" >> $1 echo "$PROGRAM_OBJECT_RULES" >> $1
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_APPEND_ELFRULES, dnl#{{{ AC_DEFUN([JD_APPEND_ELFRULES], dnl#{{{
[ [
echo "$PROGRAM_ELF_ORULES" >> $1 echo "$PROGRAM_ELF_ORULES" >> $1
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_CREATE_MODULE_EXEC_RULES, dnl#{{{ AC_DEFUN([JD_CREATE_MODULE_EXEC_RULES], dnl#{{{
[ [
for program_module in $Program_Modules; do for program_module in $Program_Modules; do
JD_CREATE_EXEC_RULE($program_module) JD_CREATE_EXEC_RULE($program_module)
done done
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_TERMCAP, dnl#{{{ AC_DEFUN([JD_TERMCAP], dnl#{{{
[ [
AC_MSG_CHECKING(for Terminfo) AC_PATH_PROG(nc5config, ncurses5-config, no)
MISC_TERMINFO_DIRS="$FINKPREFIX/share/terminfo" if test "$nc5config" = "no"
if test ! -d $MISC_TERMINFO_DIRS
then then
AC_PATH_PROG(nc5config, ncursesw5-config, no)
fi
AC_MSG_CHECKING(for terminfo)
if test "$nc5config" != "no"
then
MISC_TERMINFO_DIRS=`$nc5config --terminfo`
else
MISC_TERMINFO_DIRS="" MISC_TERMINFO_DIRS=""
fi fi
JD_Terminfo_Dirs="$MISC_TERMINFO_DIRS \
JD_Terminfo_Dirs="/usr/lib/terminfo \ /usr/lib/terminfo \
/usr/share/terminfo \ /usr/share/terminfo \
/usr/share/lib/terminfo \ /usr/share/lib/terminfo \
/usr/local/lib/terminfo \ /usr/local/lib/terminfo"
$MISC_TERMINFO_DIRS"
TERMCAP=-ltermcap TERMCAP=-ltermcap
for terminfo_dir in $JD_Terminfo_Dirs for terminfo_dir in $JD_Terminfo_Dirs
do do
if test -d $terminfo_dir if test -d $terminfo_dir
then then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
TERMCAP="" TERMCAP=""
break break
fi fi
done done
if test "$TERMCAP"; then if test "$TERMCAP"; then
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_DEFINE(USE_TERMCAP) AC_DEFINE(USE_TERMCAP,1,[Define to use termcap])
fi fi
AC_SUBST(TERMCAP)dnl AC_SUBST(TERMCAP)dnl
AC_SUBST(MISC_TERMINFO_DIRS)dnl AC_SUBST(MISC_TERMINFO_DIRS)dnl
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_ANSI_CC, dnl#{{{ AC_DEFUN([JD_ANSI_CC], dnl#{{{
[ [
AC_PROG_CC
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_ISC_POSIX
AC_AIX AC_AIX
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_GCC_TRADITIONAL])
AC_ISC_POSIX
dnl #This stuff came from Yorick config script dnl #This stuff came from Yorick config script
dnl dnl
dnl # HPUX needs special stuff dnl # HPUX needs special stuff
dnl dnl
AC_EGREP_CPP(yes, AC_EGREP_CPP(yes,
[#ifdef hpux [#ifdef hpux
yes yes
#endif #endif
], [ ], [
AC_DEFINE(_HPUX_SOURCE) AC_DEFINE(_HPUX_SOURCE,1,[Special define needed for HPUX])
if test "$CC" = cc; then CC="cc -Ae"; fi if test "$CC" = cc; then CC="cc -Ae"; fi
])dnl ])dnl
dnl dnl
dnl #Be sure we've found compiler that understands prototypes dnl #Be sure we've found compiler that understands prototypes
dnl dnl
AC_MSG_CHECKING(C compiler that understands ANSI prototypes) AC_MSG_CHECKING(C compiler that understands ANSI prototypes)
AC_TRY_COMPILE([ ],[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
extern int silly (int);], [ extern int silly (int);]])],[
AC_MSG_RESULT($CC looks ok. Good.)], [ AC_MSG_RESULT($CC looks ok. Good.)],[
AC_MSG_RESULT($CC is not a good enough compiler) AC_MSG_RESULT($CC is not a good enough compiler)
AC_MSG_ERROR(Set env variable CC to your ANSI compiler and rerun configure.) AC_MSG_ERROR(Set env variable CC to your ANSI compiler and rerun configure.)
])dnl ])dnl
])dnl ])dnl
dnl#}}} dnl#}}}
AC_DEFUN(JD_ELF_COMPILER, dnl#{{{ AC_DEFUN([JD_ELF_COMPILER], dnl#{{{
[ [
dnl #------------------------------------------------------------------------- dnl #-------------------------------------------------------------------------
dnl # Check for dynamic linker dnl # Check for dynamic linker
dnl #------------------------------------------------------------------------- dnl #-------------------------------------------------------------------------
DYNAMIC_LINK_LIB="" DYNAMIC_LINK_LIB=""
dnl# AH_TEMPLATE([HAVE_DLOPEN],1,[Define if you have dlopen])
AC_CHECK_HEADER(dlfcn.h,[ AC_CHECK_HEADER(dlfcn.h,[
AC_DEFINE(HAVE_DLFCN_H) AC_DEFINE(HAVE_DLFCN_H,1,[Define if you have the dlfcn.h header])
AC_CHECK_LIB(dl,dlopen,[ AC_CHECK_LIB(dl,dlopen,[
DYNAMIC_LINK_LIB="-ldl" DYNAMIC_LINK_LIB="-ldl"
AC_DEFINE(HAVE_DLOPEN) AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
],[ ],[
AC_CHECK_FUNC(dlopen,AC_DEFINE(HAVE_DLOPEN)) AC_CHECK_FUNC(dlopen,AC_DEFINE(HAVE_DLOPEN,[Define if you have dlopen]))
if test "$ac_cv_func_dlopen" != yes if test "$ac_cv_func_dlopen" != yes
then then
AC_MSG_WARN(cannot perform dynamic linking) AC_MSG_WARN(cannot perform dynamic linking)
fi fi
])]) ])])
AC_SUBST(DYNAMIC_LINK_LIB) AC_SUBST(DYNAMIC_LINK_LIB)
if test "$GCC" = yes if test "$GCC" = yes
then then
if test X"$CFLAGS" = X if test X"$CFLAGS" = X
skipping to change at line 558 skipping to change at line 610
dnl #Some defaults dnl #Some defaults
ELFLIB="lib\$(THIS_LIB).so" ELFLIB="lib\$(THIS_LIB).so"
ELFLIB_MAJOR="\$(ELFLIB).\$(ELF_MAJOR_VERSION)" ELFLIB_MAJOR="\$(ELFLIB).\$(ELF_MAJOR_VERSION)"
ELFLIB_MAJOR_MINOR="\$(ELFLIB_MAJOR).\$(ELF_MINOR_VERSION)" ELFLIB_MAJOR_MINOR="\$(ELFLIB_MAJOR).\$(ELF_MINOR_VERSION)"
ELFLIB_MAJOR_MINOR_MICRO="\$(ELFLIB_MAJOR_MINOR).\$(ELF_MICRO_VERSION)" ELFLIB_MAJOR_MINOR_MICRO="\$(ELFLIB_MAJOR_MINOR).\$(ELF_MICRO_VERSION)"
dnl# This specifies the target to use in the makefile to install the shared libr ary dnl# This specifies the target to use in the makefile to install the shared libr ary
INSTALL_ELFLIB_TARGET="install-elf-and-links" INSTALL_ELFLIB_TARGET="install-elf-and-links"
ELFLIB_BUILD_NAME="\$(ELFLIB_MAJOR_MINOR_MICRO)" ELFLIB_BUILD_NAME="\$(ELFLIB_MAJOR_MINOR_MICRO)"
INSTALL_MODULE="\$(INSTALL_DATA)" INSTALL_MODULE="\$(INSTALL)"
SLANG_DLL_CFLAGS="" SLANG_DLL_CFLAGS=""
M_LIB="-lm"
case "$host_os" in case "$host_os" in
*linux*|*gnu*|k*bsd*-gnu ) *linux*|*gnu*|k*bsd*-gnu )
DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic" DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION _SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION _SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS="\$(DL_LIB) -lm -lc" ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
CC_SHARED="\$(CC) \$(CFLAGS) -shared -fPIC" CC_SHARED_FLAGS="-shared -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
;; ;;
*solaris* ) *solaris* )
if test "$GCC" = yes if test "$GCC" = yes
then then
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-ztext -Wl,-h,\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-ztext -Wl,-h,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS="\$(DL_LIB) -lm -lc" ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
CC_SHARED="\$(CC) \$(CFLAGS) -G -fPIC" CC_SHARED_FLAGS="-G -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
else else
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -K PIC" ELF_CFLAGS="\$(CFLAGS) -K PIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -G -h\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -G -h\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS="\$(DL_LIB) -lm -lc" ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
CC_SHARED="\$(CC) \$(CFLAGS) -G -K PIC" CC_SHARED_FLAGS="-G -K PIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
fi fi
;; ;;
# osr5 or unixware7 with current or late autoconf # osr5 or unixware7 with current or late autoconf
*sco3.2v5* | *unixware-5* | *sco-sysv5uw7*) *sco3.2v5* | *unixware-5* | *sco-sysv5uw7*)
if test "$GCC" = yes if test "$GCC" = yes
then then
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-h,\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-h,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS= ELF_DEP_LIBS=
CC_SHARED="\$(CC) \$(CFLAGS) -G -fPIC" CC_SHARED_FLAGS="-G -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
else else
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -K pic" ELF_CFLAGS="\$(CFLAGS) -K pic"
# ELF_LINK="ld -G -z text -h#" # ELF_LINK="ld -G -z text -h#"
ELF_LINK="\$(CC) \$(LDFLAGS) -G -z text -h\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -G -z text -h\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS= ELF_DEP_LIBS=
CC_SHARED="\$(CC) \$(CFLAGS) -G -K pic" CC_SHARED_FLAGS="-G -K pic"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
fi fi
;; ;;
*irix6.5* ) *irix6.5* )
echo "Note: ELF compiler for host_os=$host_os may not be correct" echo "Note: ELF compiler for host_os=$host_os may not be correct"
echo "double-check: 'mode_t', 'pid_t' may be wrong!" echo "double-check: 'mode_t', 'pid_t' may be wrong!"
if test "$GCC" = yes if test "$GCC" = yes
then then
# not tested # not tested
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-h,\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-h,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS= ELF_DEP_LIBS=
CC_SHARED="\$(CC) \$(CFLAGS) -shared -fPIC" CC_SHARED_FLAGS="-shared -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
else else
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS)" # default anyhow ELF_CFLAGS="\$(CFLAGS)" # default anyhow
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -o \$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -o \$(ELFLIB_MAJOR)"
ELF_DEP_LIBS= ELF_DEP_LIBS=
CC_SHARED="\$(CC) \$(CFLAGS) -shared" CC_SHARED_FLAGS="-shared"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
fi fi
;; ;;
*darwin* ) *darwin* )
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fno-common" ELF_CFLAGS="\$(CFLAGS) -fno-common"
ELF_LINK="\$(CC) \$(LDFLAGS) -dynamiclib -install_name \$(install_lib_dir)/ \$(ELFLIB_MAJOR) -compatibility_version \$(ELF_MAJOR_VERSION) -current_version \ $(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERSION)" ELF_LINK="\$(CC) \$(LDFLAGS) -dynamiclib -install_name \$(install_lib_dir)/ \$(ELFLIB_MAJOR) -compatibility_version \$(ELF_MAJOR_VERSION) -current_version \ $(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERSION)"
ELF_DEP_LIBS="\$(LDFLAGS) \$(DL_LIB)" ELF_DEP_LIBS="\$(LDFLAGS) \$(DL_LIB)"
CC_SHARED="\$(CC) -bundle -flat_namespace -undefined suppress \$(CFLAGS) -f CC_SHARED_FLAGS="-bundle -flat_namespace -undefined suppress -fno-common"
no-common" CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
ELFLIB="lib\$(THIS_LIB).dylib" ELFLIB="lib\$(THIS_LIB).dylib"
ELFLIB_MAJOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).dylib" ELFLIB_MAJOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).dylib"
ELFLIB_MAJOR_MINOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERS ION).dylib" ELFLIB_MAJOR_MINOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERS ION).dylib"
ELFLIB_MAJOR_MINOR_MICRO="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINO R_VERSION).\$(ELF_MICRO_VERSION).dylib" ELFLIB_MAJOR_MINOR_MICRO="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINO R_VERSION).\$(ELF_MICRO_VERSION).dylib"
;; ;;
*freebsd* ) *freebsd* )
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
#if test "X$PORTOBJFORMAT" = "Xelf" ; then #if test "X$PORTOBJFORMAT" = "Xelf" ; then
# ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-soname,\$(ELFLIB_MAJOR)" # ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-soname,\$(ELFLIB_MAJOR)"
#else #else
# ELF_LINK="ld -Bshareable -x" # ELF_LINK="ld -Bshareable -x"
#fi #fi
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-soname,\$(ELFLIB_MAJOR)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-soname,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS="\$(DL_LIB) -lm" ELF_DEP_LIBS="\$(DL_LIB) -lm"
CC_SHARED="\$(CC) \$(CFLAGS) -shared -fPIC" CC_SHARED_FLAGS="-shared -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
;; ;;
*cygwin* ) *cygwin* )
DYNAMIC_LINK_FLAGS="" DYNAMIC_LINK_FLAGS=""
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
SLANG_DLL_CFLAGS="-DSLANG_DLL=1" SLANG_DLL_CFLAGS="-DSLANG_DLL=1"
ELF_CFLAGS="\$(CFLAGS) -DBUILD_DLL=1" ELF_CFLAGS="\$(CFLAGS) -DBUILD_DLL=1"
DLL_IMPLIB_NAME="lib\$(THIS_LIB)\$(ELFLIB_MAJOR_VERSION).dll.a" DLL_IMPLIB_NAME="lib\$(THIS_LIB)\$(ELFLIB_MAJOR_VERSION).dll.a"
#ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSIO N_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR) -Wl,--out-implib=\$(DLL_IMPLIB_NAME) -Wl, -export-all-symbols -Wl,-enable-auto-import" #ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSIO N_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR) -Wl,--out-implib=\$(DLL_IMPLIB_NAME) -Wl, -export-all-symbols -Wl,-enable-auto-import"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION _SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR) -Wl,--out-implib=\$(DLL_IMPLIB_NAME)" ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION _SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR) -Wl,--out-implib=\$(DLL_IMPLIB_NAME)"
ELF_DEP_LIBS="\$(DL_LIB) -lm" ELF_DEP_LIBS="\$(DL_LIB) -lm"
CC_SHARED="\$(CC) \$(CFLAGS) -shared -DSLANG_DLL=1" CC_SHARED_FLAGS="-shared -DSLANG_DLL=1"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
dnl# CYGWIN prohibits undefined symbols when linking shared libs dnl# CYGWIN prohibits undefined symbols when linking shared libs
SLANG_LIB_FOR_MODULES="-L\$(ELFDIR) -lslang" SLANG_LIB_FOR_MODULES="-L\$(ELFDIR) -lslang"
INSTALL_MODULE="\$(INSTALL)" INSTALL_MODULE="\$(INSTALL)"
INSTALL_ELFLIB_TARGET="install-elf-cygwin" INSTALL_ELFLIB_TARGET="install-elf-cygwin"
ELFLIB="lib\$(THIS_LIB).dll" ELFLIB="lib\$(THIS_LIB).dll"
ELFLIB_MAJOR="lib\$(THIS_LIB)\$(ELF_MAJOR_VERSION).dll" ELFLIB_MAJOR="cyg\$(THIS_LIB)-\$(ELF_MAJOR_VERSION).dll"
ELFLIB_MAJOR_MINOR="lib\$(THIS_LIB)\$(ELF_MAJOR_VERSION)_\$(ELF_MINOR_VERSIO ELFLIB_MAJOR_MINOR="cyg\$(THIS_LIB)-\$(ELF_MAJOR_VERSION)_\$(ELF_MINOR_VERSI
N).dll" ON).dll"
ELFLIB_MAJOR_MINOR_MICRO="lib\$(THIS_LIB)\$(ELF_MAJOR_VERSION)_\$(ELF_MINOR_ ELFLIB_MAJOR_MINOR_MICRO="cyg\$(THIS_LIB)-\$(ELF_MAJOR_VERSION)_\$(ELF_MINOR
VERSION)_\$(ELF_MICRO_VERSION).dll" _VERSION)_\$(ELF_MICRO_VERSION).dll"
ELFLIB_BUILD_NAME="\$(ELFLIB_MAJOR)" ELFLIB_BUILD_NAME="\$(ELFLIB_MAJOR)"
;; ;;
*haiku* )
M_LIB=""
DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,\$(VERSION
_SCRIPT) -Wl,-soname,\$(ELFLIB_MAJOR)"
ELF_DEP_LIBS="\$(DL_LIB)"
CC_SHARED_FLAGS="-shared -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
;;
* ) * )
echo "Note: ELF compiler for host_os=$host_os may be wrong" echo "Note: ELF compiler for host_os=$host_os may be wrong"
ELF_CC="\$(CC)" ELF_CC="\$(CC)"
ELF_CFLAGS="\$(CFLAGS) -fPIC" ELF_CFLAGS="\$(CFLAGS) -fPIC"
ELF_LINK="\$(CC) \$(LDFLAGS) -shared" ELF_LINK="\$(CC) \$(LDFLAGS) -shared"
ELF_DEP_LIBS="\$(DL_LIB) -lm -lc" ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
CC_SHARED="\$(CC) \$(CFLAGS) -shared -fPIC" CC_SHARED_FLAGS="-shared -fPIC"
CC_SHARED="\$(CC) $CC_SHARED_FLAGS \$(CFLAGS)"
esac esac
AC_SUBST(ELF_CC) AC_SUBST(ELF_CC)
AC_SUBST(ELF_CFLAGS) AC_SUBST(ELF_CFLAGS)
AC_SUBST(ELF_LINK) AC_SUBST(ELF_LINK)
AC_SUBST(ELF_LINK_CMD) AC_SUBST(ELF_LINK_CMD)
AC_SUBST(ELF_DEP_LIBS) AC_SUBST(ELF_DEP_LIBS)
AC_SUBST(DYNAMIC_LINK_FLAGS) AC_SUBST(DYNAMIC_LINK_FLAGS)
AC_SUBST(CC_SHARED_FLAGS)
AC_SUBST(CC_SHARED) AC_SUBST(CC_SHARED)
AC_SUBST(ELFLIB) AC_SUBST(ELFLIB)
AC_SUBST(ELFLIB_MAJOR) AC_SUBST(ELFLIB_MAJOR)
AC_SUBST(ELFLIB_MAJOR_MINOR) AC_SUBST(ELFLIB_MAJOR_MINOR)
AC_SUBST(ELFLIB_MAJOR_MINOR_MICRO) AC_SUBST(ELFLIB_MAJOR_MINOR_MICRO)
AC_SUBST(SLANG_LIB_FOR_MODULES) AC_SUBST(SLANG_LIB_FOR_MODULES)
AC_SUBST(DLL_IMPLIB_NAME) AC_SUBST(DLL_IMPLIB_NAME)
AC_SUBST(INSTALL_MODULE) AC_SUBST(INSTALL_MODULE)
AC_SUBST(INSTALL_ELFLIB_TARGET) AC_SUBST(INSTALL_ELFLIB_TARGET)
AC_SUBST(ELFLIB_BUILD_NAME) AC_SUBST(ELFLIB_BUILD_NAME)
AC_SUBST(SLANG_DLL_CFLAGS) AC_SUBST(SLANG_DLL_CFLAGS)
AC_SUBST(M_LIB)
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_F77_COMPILER, dnl#{{{ AC_DEFUN([JD_F77_COMPILER], dnl#{{{
[ [
case "$host_os" in case "$host_os" in
*linux* ) *linux* )
F77="g77" F77="g77"
F77_LIBS="-lg2c" F77_LIBS="-lg2c"
;; ;;
*solaris*) *solaris*)
F77=f77 F77=f77
#F77_LIBS="-lF77 -lM77 -L/opt/SUNWspro/SC4.0/lib -lsunmath" #F77_LIBS="-lF77 -lM77 -L/opt/SUNWspro/SC4.0/lib -lsunmath"
F77_LIBS="-lF77 -lM77 -lsunmath" F77_LIBS="-lF77 -lM77 -lsunmath"
skipping to change at line 732 skipping to change at line 808
AC_SUBST(F77) AC_SUBST(F77)
AC_SUBST(F77_LIBS) AC_SUBST(F77_LIBS)
]) ])
dnl#}}} dnl#}}}
dnl# This macro process the --with-xxx, --with-xxxinc, and --with-xxxlib dnl# This macro process the --with-xxx, --with-xxxinc, and --with-xxxlib
dnl# command line arguments and returns the values as shell variables dnl# command line arguments and returns the values as shell variables
dnl# jd_xxx_include_dir and jd_xxx_library_dir. It does not perform any dnl# jd_xxx_include_dir and jd_xxx_library_dir. It does not perform any
dnl# substitutions, nor check for the existence of the supplied values. dnl# substitutions, nor check for the existence of the supplied values.
AC_DEFUN(JD_WITH_LIBRARY_PATHS, dnl#{{{ AC_DEFUN([JD_WITH_LIBRARY_PATHS], dnl#{{{
[ [
JD_UPPERCASE($1,JD_ARG1) JD_UPPERCASE($1,JD_ARG1)
jd_$1_include_dir="" jd_$1_include_dir=""
jd_$1_library_dir="" jd_$1_library_dir=""
jd_with_$1_library="" if test X"$jd_with_$1_library" = X
then
jd_with_$1_library=""
fi
AC_ARG_WITH($1, AC_ARG_WITH($1,
[ --with-$1=DIR Use DIR/lib and DIR/include for $1], [ --with-$1=DIR Use DIR/lib and DIR/include for $1],
[jd_with_$1_arg=$withval], [jd_with_$1_arg=unspecified]) [jd_with_$1_arg=$withval], [jd_with_$1_arg=unspecified])
case "x$jd_with_$1_arg" in case "x$jd_with_$1_arg" in
xno) xno)
jd_with_$1_library="no" jd_with_$1_library="no"
;; ;;
x) x)
AC_MSG_ERROR(--with-$1 requires a value-- try yes or no) dnl# AC_MSG_ERROR(--with-$1 requires a value-- try yes or no)
jd_with_$1_library="yes"
;; ;;
xunspecified) xunspecified)
;; ;;
xyes) xyes)
jd_with_$1_library="yes"
;; ;;
*) *)
jd_with_$1_library="yes"
jd_$1_include_dir="$jd_with_$1_arg"/include jd_$1_include_dir="$jd_with_$1_arg"/include
jd_$1_library_dir="$jd_with_$1_arg"/lib jd_$1_library_dir="$jd_with_$1_arg"/lib
;; ;;
esac esac
AC_ARG_WITH($1lib, AC_ARG_WITH($1lib,
[ --with-$1lib=DIR $1 library in DIR], [ --with-$1lib=DIR $1 library in DIR],
[jd_with_$1lib_arg=$withval], [jd_with_$1lib_arg=unspecified]) [jd_with_$1lib_arg=$withval], [jd_with_$1lib_arg=unspecified])
case "x$jd_with_$1lib_arg" in case "x$jd_with_$1lib_arg" in
xunspecified) xunspecified)
;; ;;
xno) xno)
;; ;;
x) x)
AC_MSG_ERROR(--with-$1lib requres a value) AC_MSG_ERROR(--with-$1lib requres a value)
;; ;;
*) *)
jd_with_$1_library="yes"
jd_$1_library_dir="$jd_with_$1lib_arg" jd_$1_library_dir="$jd_with_$1lib_arg"
;; ;;
esac esac
AC_ARG_WITH($1inc, AC_ARG_WITH($1inc,
[ --with-$1inc=DIR $1 include files in DIR], [ --with-$1inc=DIR $1 include files in DIR],
[jd_with_$1inc_arg=$withval], [jd_with_$1inc_arg=unspecified]) [jd_with_$1inc_arg=$withval], [jd_with_$1inc_arg=unspecified])
case "x$jd_with_$1inc_arg" in case "x$jd_with_$1inc_arg" in
x) x)
AC_MSG_ERROR(--with-$1inc requres a value) AC_MSG_ERROR(--with-$1inc requres a value)
;; ;;
xunspecified) xunspecified)
;; ;;
xno) xno)
;; ;;
*) *)
jd_with_$1_library="yes"
jd_$1_include_dir="$jd_with_$1inc_arg" jd_$1_include_dir="$jd_with_$1inc_arg"
;; ;;
esac esac
]) ])
dnl#}}} dnl#}}}
dnl# This function checks for the existence of the specified library $1 with dnl# This function checks for the existence of the specified library $1 with
dnl# header file $2. If the library exists, then the shell variables will dnl# header file $2. If the library exists, then the shell variables will
dnl# be created: dnl# be created:
dnl# jd_with_$1_library=yes/no, dnl# jd_with_$1_library=yes/no,
dnl# jd_$1_inc_file dnl# jd_$1_inc_file
dnl# jd_$1_include_dir dnl# jd_$1_include_dir
dnl# jd_$1_library_dir dnl# jd_$1_library_dir
AC_DEFUN(JD_CHECK_FOR_LIBRARY, dnl#{{{ dnl# If $3 is present, then also look in $3/include+$3/lib
AC_DEFUN([JD_CHECK_FOR_LIBRARY], dnl#{{{
[ [
AC_REQUIRE([JD_EXPAND_PREFIX])dnl AC_REQUIRE([JD_EXPAND_PREFIX])dnl
AC_MSG_CHECKING(for the $1 library and header files $2) AC_REQUIRE([JD_GET_SYS_INCLIBS])dnl
dnl JD_UPPERCASE($1,JD_ARG1) dnl JD_UPPERCASE($1,JD_ARG1)
JD_WITH_LIBRARY_PATHS($1) JD_WITH_LIBRARY_PATHS($1)
if test X"$jd_with_$1_library" = X AC_MSG_CHECKING(for the $1 library and header files $2)
if test X"$jd_with_$1_library" != Xno
then then
jd_$1_inc_file=$2 jd_$1_inc_file=$2
jd_with_$1_library="yes" dnl# jd_with_$1_library="yes"
if test "X$jd_$1_inc_file" = "X" if test "X$jd_$1_inc_file" = "X"
then then
jd_$1_inc_file=$1.h jd_$1_inc_file=$1.h
fi fi
if test X"$jd_$1_include_dir" = X if test X"$jd_$1_include_dir" = X
then then
lib_include_dirs="\ inc_and_lib_dirs="\
$jd_prefix_incdir \ $jd_prefix_incdir,$jd_prefix_libdir \
/usr/local/$1/include \ /usr/local/$1/include,/usr/local/$1/lib \
/usr/local/include/$1 \ /usr/local/include/$1,/usr/local/lib \
/usr/local/include \ /usr/local/include,/usr/local/lib \
/usr/include/$1 \ $JD_SYS_INCLIBS \
/usr/$1/include \ /usr/include/$1,/usr/lib \
/usr/include \ /usr/$1/include,/usr/$1/lib \
/opt/include/$1 \ /usr/include,/usr/lib \
/opt/$1/include \ /opt/include/$1,/opt/lib \
/opt/include" /opt/$1/include,/opt/$1/lib \
/opt/include,/opt/lib"
for X in $lib_include_dirs
do
if test -r "$X/$jd_$1_inc_file"
then
jd_$1_include_dir="$X"
break
fi
done
if test X"$jd_$1_include_dir" = X
then
jd_with_$1_library="no"
fi
fi
if test X"$jd_$1_library_dir" = X
then
lib_library_dirs="\
$jd_prefix_libdir \
/usr/local/lib \
/usr/local/lib/$1 \
/usr/local/$1/lib \
/usr/lib \
/usr/lib/$1 \
/usr/$1/lib \
/opt/lib \
/opt/lib/$1 \
/opt/$1/lib"
case "$host_os" in if test X$3 != X
then
inc_and_lib_dirs="$3/include,$3/lib $inc_and_lib_dirs"
fi
case "$host_os" in
*darwin* ) *darwin* )
exts="dylib so a" exts="dylib so a"
;; ;;
*cygwin* ) *cygwin* )
exts="dll.a so a" exts="dll.a so a"
;; ;;
* ) * )
exts="so a" exts="so a"
esac esac
found=0 xincfile="$jd_$1_inc_file"
for X in $lib_library_dirs xlibfile="lib$1"
do jd_with_$1_library="no"
for E in $exts
do for include_and_lib in $inc_and_lib_dirs
if test -r "$X/lib$1.$E" do
then # Yuk. Is there a better way to set these variables??
jd_$1_library_dir="$X" xincdir=`echo $include_and_lib | tr ',' ' ' | awk '{print [$]1}'`
found=1 xlibdir=`echo $include_and_lib | tr ',' ' ' | awk '{print [$]2}'`
break found=0
fi if test -r $xincdir/$xincfile
done then
if test $found -eq 1 for E in $exts
then do
break if test -r "$xlibdir/$xlibfile.$E"
fi then
done jd_$1_include_dir="$xincdir"
if test X"$jd_$1_library_dir" = X jd_$1_library_dir="$xlibdir"
then jd_with_$1_library="yes"
jd_with_$1_library="no" found=1
fi break
fi
done
fi
if test $found -eq 1
then
break
fi
done
fi fi
fi fi
if test "$jd_with_$1_library" = "yes" if test X"$jd_$1_include_dir" != X -a X"$jd_$1_library_dir" != X
then then
AC_MSG_RESULT(yes: $jd_$1_library_dir and $jd_$1_include_dir) AC_MSG_RESULT(yes: $jd_$1_library_dir and $jd_$1_include_dir)
jd_with_$1_library="yes"
dnl# Avoid using /usr/lib and /usr/include because of problems with dnl# Avoid using /usr/lib and /usr/include because of problems with
dnl# gcc on some solaris systems. dnl# gcc on some solaris systems.
JD_ARG1[]_LIB=-L$jd_$1_library_dir JD_ARG1[]_LIB=-L$jd_$1_library_dir
if test "X$jd_$1_library_dir" = "X/usr/lib" JD_ARG1[]_LIB_DIR=$jd_$1_library_dir
if test "X$jd_$1_library_dir" = "X/usr/lib" -o "X$jd_$1_include_dir" = "X/us
r/include"
then then
JD_ARG1[]_LIB="" JD_ARG1[]_LIB=""
else else
JD_SET_RPATH($jd_$1_library_dir) JD_SET_RPATH($jd_$1_library_dir)
fi fi
JD_ARG1[]_INC=-I$jd_$1_include_dir JD_ARG1[]_INC=-I$jd_$1_include_dir
JD_ARG1[]_INC_DIR=$jd_$1_include_dir
if test "X$jd_$1_include_dir" = "X/usr/include" if test "X$jd_$1_include_dir" = "X/usr/include"
then then
JD_ARG1[]_INC="" JD_ARG1[]_INC=""
fi fi
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
jd_with_$1_library="no"
JD_ARG1[]_INC="" JD_ARG1[]_INC=""
JD_ARG1[]_LIB="" JD_ARG1[]_LIB=""
JD_ARG1[]_INC_DIR=""
JD_ARG1[]_LIB_DIR=""
fi fi
AC_SUBST(JD_ARG1[]_LIB) AC_SUBST(JD_ARG1[]_LIB)
AC_SUBST(JD_ARG1[]_INC) AC_SUBST(JD_ARG1[]_INC)
AC_SUBST(JD_ARG1[]_LIB_DIR)
AC_SUBST(JD_ARG1[]_INC_DIR)
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_WITH_LIBRARY, dnl#{{{ AC_DEFUN([JD_WITH_LIBRARY], dnl#{{{
[ [
JD_CHECK_FOR_LIBRARY($1, $2) JD_CHECK_FOR_LIBRARY($1, $2, $3)
if test "$jd_with_$1_library" = "no" if test "$jd_with_$1_library" = "no"
then then
AC_MSG_ERROR(unable to find the $1 library and header file $jd_$1_inc_file) AC_MSG_ERROR(unable to find the $1 library and header file $jd_$1_inc_file)
fi fi
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_SLANG_VERSION, dnl#{{{ AC_DEFUN([JD_SLANG_VERSION], dnl#{{{
[ [
slang_h=$jd_slang_include_dir/slang.h slang_h=$jd_slang_include_dir/slang.h
AC_MSG_CHECKING(SLANG_VERSION in $slang_h) AC_MSG_CHECKING(SLANG_VERSION in $slang_h)
slang_version=`grep "^#define *SLANG_VERSION " $slang_h | slang_version=`grep "^#define *SLANG_VERSION " $slang_h |
awk '{ print [$]3 }'` awk '{ print [$]3 }'`
slang_major_version=`echo $slang_version | slang_major_version=`echo $slang_version |
awk '{ print int([$]1/10000) }'` awk '{ print int([$]1/10000) }'`
slang_minor_version=`echo $slang_version $slang_major_version | slang_minor_version=`echo $slang_version $slang_major_version |
awk '{ print int(([$]1 - [$]2*10000)/100) }'` awk '{ print int(([$]1 - [$]2*10000)/100) }'`
slang_patchlevel_version=`echo $slang_version $slang_major_version $slang_minor_ version | slang_patchlevel_version=`echo $slang_version $slang_major_version $slang_minor_ version |
awk '{ print ([$]1 - [$]2*10000 - [$]3*100) }'` awk '{ print ([$]1 - [$]2*10000 - [$]3*100) }'`
AC_MSG_RESULT($slang_major_version.$slang_minor_version.$slang_patchlevel_versio n) AC_MSG_RESULT($slang_major_version.$slang_minor_version.$slang_patchlevel_versio n)
AC_SUBST(slang_version) AC_SUBST(slang_version)
AC_SUBST(slang_major_version) AC_SUBST(slang_major_version)
AC_SUBST(slang_minor_version) AC_SUBST(slang_minor_version)
AC_SUBST(slang_patchlevel_version) AC_SUBST(slang_patchlevel_version)
]) ])
#}}} #}}}
AC_DEFUN(JD_SLANG_MODULE_INSTALL_DIR, dnl#{{{ AC_DEFUN([JD_SLANG_MODULE_INSTALL_DIR], dnl#{{{
[ [
AC_REQUIRE([JD_SLANG_VERSION]) AC_REQUIRE([JD_SLANG_VERSION])
if test "X$slang_major_version" = "X1" if test "X$slang_major_version" = "X1"
then then
MODULE_INSTALL_DIR="$libdir/slang/modules" MODULE_INSTALL_DIR="$libdir/slang/modules"
else else
MODULE_INSTALL_DIR="$libdir/slang/v$slang_major_version/modules" MODULE_INSTALL_DIR="$libdir/slang/v$slang_major_version/modules"
fi fi
SL_FILES_INSTALL_DIR=$datadir/slsh/local-packages SL_FILES_INSTALL_DIR=$datadir/slsh/local-packages
AC_SUBST(MODULE_INSTALL_DIR) AC_SUBST(MODULE_INSTALL_DIR)
AC_SUBST(SL_FILES_INSTALL_DIR) AC_SUBST(SL_FILES_INSTALL_DIR)
]) ])
#}}} #}}}
AC_DEFUN(JD_CHECK_LONG_LONG, dnl#{{{ AC_DEFUN([JD_CHECK_LONG_LONG], dnl#{{{
[ [
AC_CHECK_TYPES(long long) AC_CHECK_TYPES(long long)
AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long long)
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_LARGE_FILE_SUPPORTXXX, dnl#{{{ AC_DEFUN([JD_LARGE_FILE_SUPPORTXXX], dnl#{{{
[ [
AC_REQUIRE([JD_CHECK_LONG_LONG]) AC_REQUIRE([JD_CHECK_LONG_LONG])
AC_MSG_CHECKING(whether to explicitly activate long file support) AC_MSG_CHECKING(whether to explicitly activate long file support)
AC_DEFINE(_LARGEFILE_SOURCE, 1) AC_DEFINE(_LARGEFILE_SOURCE, 1)
AC_DEFINE(_FILE_OFFSET_BITS, 64) AC_DEFINE(_FILE_OFFSET_BITS, 64)
jd_large_file_support=no jd_large_file_support=no
if test X$ac_cv_type_long_long = Xyes if test X$ac_cv_type_long_long = Xyes
then then
if test $ac_cv_sizeof_long_long -ge 8 if test $ac_cv_sizeof_long_long -ge 8
then then
skipping to change at line 999 skipping to change at line 1080
if test $jd_large_file_support = yes if test $jd_large_file_support = yes
then then
AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1) AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1)
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
]) ])
dnl#}}} dnl#}}}
AC_DEFUN(JD_LARGE_FILE_SUPPORT, dnl#{{{ AC_DEFUN([JD_LARGE_FILE_SUPPORT], dnl#{{{
[ [
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_FUNC_FSEEKO AC_FUNC_FSEEKO
AC_TYPE_OFF_T AC_TYPE_OFF_T
AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(off_t)
]) ])
#}}} #}}}
AC_DEFUN(JD_HAVE_ISINF, dnl#{{{ AC_DEFUN([JD_HAVE_ISINF], dnl#{{{
[ [
AC_MSG_CHECKING([for isinf]) AC_MSG_CHECKING([for isinf])
AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include <math.h>]], [[isinf (0.0);]])], AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include <math.h>]], [[isinf (0.0);]])],
[AC_MSG_RESULT([yes]) [AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_ISINF, 1)]) AC_DEFINE(HAVE_ISINF, 1)])
]) ])
#}}} #}}}
 End of changes. 95 change blocks. 
161 lines changed or deleted 249 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)