1. libtool 1.2d => 1.3 (should speed up configure checks for it because it

caches the results)
2. aclocal.m4 is automatically generated by aclocal from acinclude.m4
3. fixes to configure for Cygnus compilation (Win32)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-13 22:27:35 +00:00
parent bfac849985
commit a9b5e89f5f
6 changed files with 3698 additions and 2696 deletions

View File

@@ -57,6 +57,11 @@
#undef __DATA_GENERAL__
#undef __EMX__
#undef __WINDOWS__
#undef __WIN95__
#undef __WIN32__
#undef __GNUWIN32__
/* ------------------------------------------------------------------------ */
/* compiler options */
/* ------------------------------------------------------------------------ */

399
acinclude.m4 Normal file
View File

@@ -0,0 +1,399 @@
dnl ---------------------------------------------------------------------------
dnl
dnl Purpose: Cursom macros for autoconf configure script.
dnl Author: Vadim Zeitlin
dnl Created: 26.05.99
dnl Version: $Id$
dnl ---------------------------------------------------------------------------
dnl ===========================================================================
dnl GKT+ version test
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS. Uses variables
dnl gtk_config_prefix and/or gtk_config_exec_prefix if defined.
dnl ---------------------------------------------------------------------------
dnl
AC_DEFUN(AM_PATH_GTK,
[
if test x$gtk_config_exec_prefix != x ; then
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
fi
fi
if test x$gtk_config_prefix != x ; then
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
if test x${GTK_CONFIG+set} != xset ; then
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
fi
fi
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
min_gtk_version=ifelse([$1], ,0.99.7,$1)
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
no_gtk=""
if test "$GTK_CONFIG" != "no" ; then
GTK_CFLAGS=`$GTK_CONFIG --cflags`
GTK_LIBS=`$GTK_CONFIG --libs`
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
dnl
dnl Now check if the installed GTK is sufficiently new. (Also sanity
dnl checks the results of gtk-config to some extent)
dnl
AC_TRY_RUN([
#include <gtk/gtk.h>
#include <stdio.h>
int
main ()
{
int major, minor, micro;
if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
if (gtk_minor_version == 1) return FALSE;
return !((gtk_major_version > major) ||
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)));
}
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
else
no_gtk=yes
fi
if test "x$no_gtk" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
GTK_CFLAGS=""
GTK_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
])
dnl ===========================================================================
dnl macros to find the a file in the list of include/lib paths
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl call WX_PATH_FIND_INCLUDES(search path, header name), sets ac_find_includes
dnl to the full name of the file that was found or leaves it empty if not found
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_PATH_FIND_INCLUDES,
[
ac_find_includes=
for ac_dir in $1;
do
if test -f "$ac_dir/$2"; then
ac_find_includes=$ac_dir
break
fi
done
])
dnl ---------------------------------------------------------------------------
dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_includes
dnl to the full name of the file that was found or leaves it empty if not found
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_PATH_FIND_LIBRARIES,
[
ac_find_libraries=
for ac_dir in $1;
do
for ac_extension in a so sl; do
if test -f "$ac_dir/lib$2.$ac_extension"; then
ac_find_libraries=$ac_dir
break 2
fi
done
done
])
dnl ---------------------------------------------------------------------------
dnl Path to include, already defined
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_INCLUDE_PATH_EXIST,
[
ac_path_to_include=$1
echo "$2" | grep "\-I$1" > /dev/null
result=$?
if test $result = 0; then
ac_path_to_include=""
else
ac_path_to_include="-I$1"
fi
])
dnl ---------------------------------------------------------------------------
dnl Path to link, already defined
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_LINK_PATH_EXIST,
[
echo "$2" | grep "\-L$1" > /dev/null
result=$?
if test $result = 0; then
ac_path_to_link=""
else
ac_path_to_link="-L$1"
fi
])
dnl ===========================================================================
dnl C++ features test
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
dnl or only the old <iostream.h> one - it may be generally assumed that if
dnl <iostream> exists, the other "new" headers (without .h) exist too.
dnl
dnl call WX_CPP_NEW_HEADERS(actiof-if-true, action-if-false-or-cross-compiling)
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_CPP_NEW_HEADERS,
[
if test "$cross_compiling" = "yes"; then
ifelse([$2], , :, [$2])
else
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(iostream)
if test "x$HAVE_IOSTREAM" = x ; then
ifelse([$2], , :, [$2])
else
ifelse([$1], , :, [$1])
fi
AC_LANG_RESTORE
fi
])
dnl ---------------------------------------------------------------------------
dnl WX_CPP_BOOL checks whether the C++ compiler has a built in bool type
dnl
dnl call WX_CPP_BOOL - will define HAVE_BOOL if the compiler supports bool
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_CPP_BOOL,
[
AC_CACHE_CHECK([if C++ compiler supports bool], wx_cv_cpp_bool,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
int main()
{
bool b = true;
return 0;
}
],
[
AC_DEFINE(HAVE_BOOL)
wx_cv_cpp_bool=yes
],
wx_cv_cpp_bool=no,
wx_cv_cpp_bool=no
)
AC_LANG_RESTORE
])
if test "$wx_cv_cpp_bool" = "yes"; then
AC_DEFINE(HAVE_BOOL)
fi
])
dnl ---------------------------------------------------------------------------
dnl WX_CPP_SIZE_T_IS_NOT_INT checks whether size_t and int are different types,
dnl i.e. whether we may overload operator[] on its argument type
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_CPP_SIZE_T_IS_NOT_INT,
[
AC_CACHE_CHECK([if size_t and int are different types], wx_cv_cpp_sizet_not_int,
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
#include <stdlib.h>
class S
{
public:
S(char *s) { m_s = s; }
char operator[](size_t n) const { return m_s[n]; }
char operator[](int n) const { return m_s[n]; }
private:
char *m_s;
};
int main()
{
S s("dummy");
size_t n1 = 2;
int n2 = 3;
return s[n1] == s[n2];
}
],
AC_DEFINE(wxUSE_SIZE_T_STRING_OPERATOR) wx_cv_cpp_sizet_not_int=yes,
wx_cv_cpp_sizet_not_int=no,
wx_cv_cpp_sizet_not_int=no
)
AC_LANG_RESTORE
])
])
dnl ---------------------------------------------------------------------------
dnl a slightly better AC_C_BIGENDIAN macro which allows cross-compiling
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_C_BIGENDIAN,
[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
[ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
if test $ac_cv_c_bigendian = unknown; then
AC_TRY_RUN([main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
long l;
char c[sizeof (long)];
} u;
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes, ac_cv_c_bigendian=unknown)
fi])
if test $ac_cv_c_bigendian = unknown; then
AC_MSG_WARN([Assuming little-endian target machine - this may be overriden by adding the line "ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}" to config.cache file])
fi
if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN)
fi
])
dnl ---------------------------------------------------------------------------
dnl override AC_ARG_ENABLE/WITH to cache the results in .cache file
dnl ---------------------------------------------------------------------------
AC_DEFUN(WX_ARG_CACHE_INIT,
[
wx_arg_cache_file="configarg.cache"
echo "loading argument cache $wx_arg_cache_file"
rm -f ${wx_arg_cache_file}.tmp
touch ${wx_arg_cache_file}.tmp
touch ${wx_arg_cache_file}
])
AC_DEFUN(WX_ARG_CACHE_FLUSH,
[
echo "saving argument cache $wx_arg_cache_file"
mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
])
dnl this macro checks for a command line argument and caches the result
dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
AC_DEFUN(WX_ARG_WITH,
[
AC_MSG_CHECKING("for --with-$1")
no_cache=0
AC_ARG_WITH($1, $2,
[
if test "$withval" = yes; then
ac_cv_use_$1='$3=yes'
else
ac_cv_use_$1='$3=no'
fi
],
[
LINE=`grep "$3" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_$1='$3='$DEFAULT_$3
])
eval "$ac_cv_use_$1"
if test "$no_cache" != 1; then
echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
fi
if test "$$3" = yes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
])
dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name)
AC_DEFUN(WX_ARG_ENABLE,
[
AC_MSG_CHECKING("for --enable-$1")
no_cache=0
AC_ARG_ENABLE($1, $2,
[
if test "$enableval" = yes; then
ac_cv_use_$1='$3=yes'
else
ac_cv_use_$1='$3=no'
fi
],
[
LINE=`grep "$3" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_$1='$3='$DEFAULT_$3
])
eval "$ac_cv_use_$1"
if test "$no_cache" != 1; then
echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
fi
if test "$$3" = yes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
])

1064
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ dnl ---------------------------------------------------------------------------
dnl initialization
dnl ---------------------------------------------------------------------------
dnl the file passed to AC_INIT should be speicific to our package
dnl the file passed to AC_INIT should be specific to our package
AC_INIT(wx-config.in)
AC_CANONICAL_HOST
@@ -179,11 +179,22 @@ case "${host}" in
AC_DEFINE(__SVR4__)
DEFAULT_DEFAULT_wxUSE_MOTIF=1
;;
*-*-cygwin32* )
USE_UNIX=0
AC_DEFINE(__WIN32__)
AC_DEFINE(__WIN95__)
AC_DEFINE(__WINDOWS__)
AC_DEFINE(__GNUWIN32__)
DEFAULT_DEFAULT_wxUSE_MSW=1
;;
*-pc-os2_emx )
AC_DEFINE(__EMX__)
;;
*)
AC_MSG_ERROR(unknown system type $(host).)
AC_MSG_ERROR(unknown system type ${host}.)
esac
if test "$USE_UNIX" = 1 ; then
@@ -199,16 +210,6 @@ if test "$USE_LINUX" = 1; then
AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2))
fi
dnl TODO cross-compiling for Windows not yet supported
AC_DEFINE(__UNIX__)
dnl if eval "test $USE_CYGWIN != 1 -a $USE_MINGW32 != 1"; then
dnl AC_DEFINE(__UNIX__)
dnl else
dnl AC_DEFINE(__WINDOWS__)
dnl DEFAULT_wxUSE_MSW=1
dnl fi
dnl ---------------------------------------------------------------------------
dnl command line options for configure
dnl ---------------------------------------------------------------------------
@@ -416,13 +417,6 @@ dnl ============================
dnl external package dependecies
dnl ============================
dnl TODO should support these options!
dnl
dnl AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=PFX prefix where GTK is installed],
dnl gtk_config_prefix="$withval", gtk_config_prefix="")
dnl AC_ARG_WITH(gtk-exec-prefix,
dnl [ --with-gtk-exec-prefix=PFX exec prefix where GTK is installed], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
dnl these options use AC_ARG_WITH and not WX_ARG_WITH on purpose - we cache
dnl these values manually
for toolkit in `echo $ALL_TOOLKITS`; do
@@ -440,6 +434,11 @@ AC_ARG_WITH(wine, [ --with-wine use WINE], [wxUSE_WINE="$w
AC_ARG_WITH(cygwin, [ --with-cygwin use Cygwin for MS-Windows], [wxUSE_CYGWIN="$withval" CACHE_CYGWIN=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(mingw, [ --with-mingw use GCC Minimal MS-Windows], [wxUSE_MINGW="$withval" CACHE_MINGW=1 TOOLKIT_GIVEN=1])
AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=PFX Prefix where GTK is installed],
gtk_config_prefix="$withval", gtk_config_prefix="")
AC_ARG_WITH(gtk-exec-prefix, [ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (www.letters.com/dmalloc)], wxUSE_DMALLOC)
WX_ARG_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB)
WX_ARG_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
@@ -829,7 +828,11 @@ AM_PROG_LEX
dnl needed for making link to setup.h
AC_PROG_LN_S
dnl libtool checks (disable static libs by default, this takes too much time...)
dnl without this (which just means that we use WXDLLEXPORT) libtool won't build
dnl DLLs under Win32.
AC_LIBTOOL_WIN32_DLL
dnl disable static libs by default, this takes too much time...
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
@@ -889,6 +892,7 @@ SEARCH_INCLUDE="\
/usr/include/qt \
/usr/local/include/qt \
\
/usr/include/windows \
/usr/include/wine \
/usr/local/include/wine \
\
@@ -915,8 +919,6 @@ dnl search for toolkit (widget sets)
dnl ----------------------------------------------------------------
TOOLKIT=
TOOLKIT_DEF=
TOOLKIT_DIR=
TOOLKIT_INCLUDE=
GUI_TK_LIBRARY=
@@ -926,6 +928,21 @@ WXGTK12=
WXWINE=
if test "$wxUSE_CYGWIN" = 1; then
AC_MSG_CHECKING(for Windows headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found $ac_find_includes)
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
fi
TOOLKIT=MSW
fi
if test "$wxUSE_GTK" = 1; then
dnl avoid calling AM_PATH_GTK twice, so check first for the newer version and
dnl only then, if it wasn't found, for an older one
@@ -978,6 +995,7 @@ if test "$wxUSE_WINE" = 1; then
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
WXWINE=1
TOOLKIT=MSW
LTLIBOBJS="$LTLIBOBJS winestub.lo"
fi
if test "$wxUSE_MOTIF" = 1; then
@@ -1174,9 +1192,11 @@ dnl flush the cache
AC_CACHE_SAVE
dnl ---------------------------------------------------------------------------
dnl thread support
dnl thread support for Unix (always available under Win32)
dnl ---------------------------------------------------------------------------
if test "$wxUSE_UNIX" = 1; then
dnl the code below:
dnl defines THREADS_OBJ which contains the object files to build
dnl defines THREADS_LINK which contains the thread library to link with
@@ -1213,24 +1233,15 @@ if test "$wxUSE_THREADS" = "yes"; then
])
])
])
if test "$THREADS_LINK" != ""; then
AC_DEFINE(wxUSE_THREADS)
else
AC_MSG_WARN(No thread support on this system)
fi
fi
if test -z "$THREADS_OBJ"; then
wxUSE_THREADS=no
AC_MSG_WARN(No thread support on this system)
fi
dnl do other tests only if we are using threads
if test "$wxUSE_THREADS" = "yes"; then
dnl must define _REENTRANT for multithreaded code
CFLAGS="${CFLAGS} -D_REENTRANT"
CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
dnl LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ"
dnl define autoconf macro to check for given function in both pthread and
@@ -1294,6 +1305,18 @@ dnl LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ"
THREADS_LINK="-l$THREADS_LINK"
fi
fi
if test "$wxUSE_THREADS" = "yes"; then
AC_DEFINE(wxUSE_THREADS)
dnl must define _REENTRANT for multithreaded code
CFLAGS="${CFLAGS} -D_REENTRANT"
CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
fi
if test "$WXGTK12" = 1 ; then
AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
fi
@@ -1302,6 +1325,10 @@ if test "$WXWINE" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -D__WXWINE__"
fi
if test "$wxUSE_CYGWIN" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -D__WIN95__"
fi
WXDEBUG=
if test "$wxUSE_DEBUG_GDB" = "yes" ; then
wxUSE_DEBUG_INFO=yes
@@ -1696,11 +1723,19 @@ if test "$wxUSE_CLIPBOARD" = "yes"; then
fi
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
if test "$WXGTK12" = 1 ; then
if test "$wxUSE_GTK" = 1; then
if test "$WXGTK12" != 1; then
AC_MSG_WARN([Drag and drop is only supported under wxGTK 2.1])
fi
fi
if test "$wxUSE_MOTIF" = 1; then
AC_MSG_WARN([Drag and drop is not yet supported under Motif])
fi
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
AC_DEFINE(wxUSE_DRAG_AND_DROP)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
else
AC_MSG_WARN([Drag and drop is only supported under wxGTK 2.1])
fi
fi
@@ -1999,6 +2034,13 @@ AC_OUTPUT([
wx-config
Makefile
src/Makefile
dnl just for testing, will remove soon (VZ)
dnl src/msw/Makefile
dnl include/Makefile include/wx/Makefile include/wx/generic/Makefile
dnl include/wx/msw/Makefile
dnl samples/Makefile samples/minimal/Makefile
src/gtk/Makefile
src/motif/Makefile
src/msw/Makefile

1567
ltconfig

File diff suppressed because it is too large Load Diff

1635
ltmain.sh

File diff suppressed because it is too large Load Diff