commit 56e24485466db4b38b69185f0cfd15d9416f356d
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Fri Sep 6 11:12:09 2013 +0200
Fix compilation on Solaris 11.1 (bug #8783)
Make sure that the configure script only checks features using the C++
compiler.
Also get rid of our last C files, since they are not compiled nor
distributed anyway.
diff --git a/configure.ac b/configure.ac
index b85c4c1..75e74ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,11 +61,9 @@ done
AM_PATH_PYTHON(2.4.0,, :)
AC_PROG_RANLIB
-### we need to know the byte order for unicode conversions
-AC_C_BIGENDIAN
-
### Check for a C++ compiler
LYX_PROG_CXX
+AC_LANG(C++)
### Objective-C compiler
AC_PROG_OBJC
@@ -97,6 +95,9 @@ AC_CHECK_LIB(gdi32, main)
LYX_USE_INCLUDED_BOOST
LYX_USE_INCLUDED_MYTHES
+### we need to know the byte order for unicode conversions
+AC_C_BIGENDIAN
+
# Needed for our char_type
AC_CHECK_SIZEOF(wchar_t)
@@ -181,7 +182,7 @@ AC_FUNC_SELECT_ARGTYPES
LYX_CHECK_SPELL_ENGINES
lyx_client_subdir=true
-AC_LANG_PUSH(C)
+dnl AC_LANG_PUSH(C)
dnl LIBS already contains some X extra libs that may interfere.
save_LIBS="$LIBS"
LIBS=
@@ -194,7 +195,7 @@ AC_CHECK_FUNCS(fcntl,
AC_SUBST(SOCKET_LIBS,$LIBS)
LIBS="$save_LIBS"
AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir)
-AC_LANG_POP(C)
+dnl AC_LANG_POP(C)
lyx_win_res=false;
case ${host} in
diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt
index efda205..9e748f8 100644
--- a/src/support/CMakeLists.txt
+++ b/src/support/CMakeLists.txt
@@ -27,8 +27,6 @@ list(REMOVE_ITEM support_sources
${TOP_SRC_DIR}/src/support/os_unix.cpp
${TOP_SRC_DIR}/src/support/os_cygwin.cpp
${TOP_SRC_DIR}/src/support/os_os2.C
- ${TOP_SRC_DIR}/src/support/atexit.c
- ${TOP_SRC_DIR}/src/support/strerror.c
${TOP_SRC_DIR}/src/support/gettext.cpp)
if(APPLE)
diff --git a/src/support/atexit.c b/src/support/atexit.c
deleted file mode 100644
index 4331809..0000000
--- a/src/support/atexit.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * \file atexit.c
- * Wrapper to implement ANSI C's atexit using SunOS's on_exit.
- *
- * This function is in the public domain. --Mike Stump.
- */
-
-#include <config.h>
-
-#ifndef NEED_on_exit
-int atexit(void (*f)())
-{
- /* If the system doesn't provide a definition for atexit, use on_exit
- if the system provides that. */
- on_exit (f, 0);
- return 0;
-}
-#endif
diff --git a/src/support/strerror.c b/src/support/strerror.c
deleted file mode 100644
index b678dda..0000000
--- a/src/support/strerror.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*****************************************************
- * provides strerror()
- * author Stephan Witt <[email protected]>
- *****************************************************/
-
-#include <config.h>
-
-/* $Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp $ */
-
-#if !defined(lint) && !defined(WITH_WARNINGS)
-static char vcid[] = "$Id: strerror.c,v 1.3 2000/08/04 13:12:30 lasgouttes Exp
$";
-#endif /* lint */
-
-extern int sys_nerr ;
-extern char * sys_errlist [] ;
-
-char * strerror (int errnum)
-{
- static char * errtext = "unknown errno" ;
-
- if ( errnum < sys_nerr )
- return sys_errlist [errnum] ;
- return errtext ;
-}