Commit 907d2e9d authored by panne's avatar panne
Browse files

[project @ 2004-09-22 08:36:58 by panne]

* Replace obsolete macro AC_TRY_RUN with AC_RUN_IFELSE
* Same for AC_TRY_LINK and AC_LINK_IFELSE
* Minor cleanup
parent a60e671b
...@@ -199,7 +199,7 @@ case $HostPlatform in ...@@ -199,7 +199,7 @@ case $HostPlatform in
alpha-dec-osf*) fptools_cv_leading_underscore=no;; alpha-dec-osf*) fptools_cv_leading_underscore=no;;
*cygwin32) fptools_cv_leading_underscore=yes;; *cygwin32) fptools_cv_leading_underscore=yes;;
*mingw32) fptools_cv_leading_underscore=yes;; *mingw32) fptools_cv_leading_underscore=yes;;
*) AC_TRY_RUN([#ifdef HAVE_NLIST_H *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H
#include <nlist.h> #include <nlist.h>
struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}}; struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}}; struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
...@@ -216,7 +216,7 @@ char **argv; ...@@ -216,7 +216,7 @@ char **argv;
exit(0); exit(0);
#endif #endif
exit(1); exit(1);
}], [fptools_cv_leading_underscore=yes], [fptools_cv_leading_underscore=no], [fptools_cv_leading_underscore=no]) }]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
;; ;;
esac]); esac]);
AC_SUBST([LeadingUnderscore], [`echo $fptools_cv_leading_underscore | sed 'y/yesno/YESNO/'`]) AC_SUBST([LeadingUnderscore], [`echo $fptools_cv_leading_underscore | sed 'y/yesno/YESNO/'`])
...@@ -711,7 +711,7 @@ AC_CACHE_VAL(AC_CV_NAME, ...@@ -711,7 +711,7 @@ AC_CACHE_VAL(AC_CV_NAME,
[AC_CV_NAME_supported=yes [AC_CV_NAME_supported=yes
fp_check_htype_save_cppflags="$CPPFLAGS" fp_check_htype_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_TRY_RUN([#include <stdio.h> AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
#include <stddef.h> #include <stddef.h>
#if HAVE_SYS_TYPES_H #if HAVE_SYS_TYPES_H
...@@ -782,9 +782,9 @@ main() { ...@@ -782,9 +782,9 @@ main() {
} }
fclose(f); fclose(f);
exit(0); exit(0);
}],AC_CV_NAME=`cat conftestval`, }]])],[AC_CV_NAME=`cat conftestval`],
ifelse([$2], , [AC_CV_NAME=NotReallyAType; AC_CV_NAME_supported=no], AC_CV_NAME=$2), [ifelse([$2], , [AC_CV_NAME=NotReallyAType; AC_CV_NAME_supported=no], [AC_CV_NAME=$2])],
ifelse([$3], , [AC_CV_NAME=NotReallyATypeCross; AC_CV_NAME_supported=no], AC_CV_NAME=$3))]) dnl [ifelse([$3], , [AC_CV_NAME=NotReallyATypeCross; AC_CV_NAME_supported=no], [AC_CV_NAME=$3])])]) dnl
CPPFLAGS="$fp_check_htype_save_cppflags" CPPFLAGS="$fp_check_htype_save_cppflags"
if test "$AC_CV_NAME_supported" = yes; then if test "$AC_CV_NAME_supported" = yes; then
AC_MSG_RESULT($AC_CV_NAME) AC_MSG_RESULT($AC_CV_NAME)
...@@ -1076,7 +1076,7 @@ AC_DEFUN([FP_CHECK_GL_HELPER], ...@@ -1076,7 +1076,7 @@ AC_DEFUN([FP_CHECK_GL_HELPER],
fp_try_lib=`echo $fp_try_lib | sed -e 's/^-l//' -e 's/$/.lib/'` fp_try_lib=`echo $fp_try_lib | sed -e 's/^-l//' -e 's/$/.lib/'`
fi fi
LIBS="$fp_try_lib ${$1_LIBS} $fp_save_LIBS" LIBS="$fp_try_lib ${$1_LIBS} $fp_save_LIBS"
AC_TRY_LINK([$3], [$4], [fp_cv_check_$1_lib="$fp_try_lib ${$1_LIBS}"; break]) AC_LINK_IFELSE([AC_LANG_PROGRAM([$3], [$4])], [fp_cv_check_$1_lib="$fp_try_lib ${$1_LIBS}"; break])
done done
LIBS="$fp_save_LIBS" LIBS="$fp_save_LIBS"
CPPFLAGS="$fp_save_CPPFLAGS"]) CPPFLAGS="$fp_save_CPPFLAGS"])
...@@ -1138,7 +1138,7 @@ else ...@@ -1138,7 +1138,7 @@ else
*-lopengl32*|*opengl32.lib*) ;; *-lopengl32*|*opengl32.lib*) ;;
*) fp_save_LIBS="$LIBS" *) fp_save_LIBS="$LIBS"
LIBS="$LIBS -lopengl32" LIBS="$LIBS -lopengl32"
AC_TRY_LINK([@%:@include <GL/gl.h>], [glEnd()], AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <GL/gl.h>]], [[glEnd()]])],
[GL_LIBS="$GL_LIBS -lopengl32"; GL_LIBS0="$GL_LIBS0 -lopengl32"]) [GL_LIBS="$GL_LIBS -lopengl32"; GL_LIBS0="$GL_LIBS0 -lopengl32"])
LIBS="$fp_save_LIBS" LIBS="$fp_save_LIBS"
;; ;;
...@@ -1209,20 +1209,19 @@ AC_SUBST([GLUT_LIBS]) ...@@ -1209,20 +1209,19 @@ AC_SUBST([GLUT_LIBS])
])# FP_CHECK_GLUT ])# FP_CHECK_GLUT
dnl @synopsis FP_EMPTY_STRUCTS # FP_EMPTY_STRUCTS
dnl # ----------------
dnl Check whether empty structs is accepted by CC. # Define output variable SUPPORTS_EMPTY_STRUCTS if empty structs are accepted by
# CC.
dnl dnl
AC_DEFUN(FP_EMPTY_STRUCTS, AC_DEFUN(FP_EMPTY_STRUCTS,
[AC_CACHE_CHECK(empty struct support, fptools_cv_empty_structs, [AC_CACHE_CHECK(empty struct support, fp_cv_empty_structs,
[AC_TRY_COMPILE([ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[typedef struct { /* empty */ } StgFoo;]],
typedef struct { /*empty*/ } StgFoo; [[int i;]])],
], [fp_cv_empty_structs=yes],
[int i;], [fp_cv_empty_structs=no])])
fptools_cv_empty_structs=yes, if test x"$fp_cv_empty_structs" = xyes; then
fptools_cv_empty_structs=no)]) AC_DEFINE([SUPPORTS_EMPTY_STRUCTS], [1], [Define to 1 if C compiler supports declaration of empty structure types.])
if test "$fptools_cv_empty_structs" = yes; then
AC_DEFINE([SUPPORTS_EMPTY_STRUCTS], [1], [Define to 1 if C compiler supports declaration of empty structure types.])
fi fi
]) ])
......
...@@ -21,7 +21,7 @@ AC_CONFIG_SRCDIR([mk/config.mk.in]) ...@@ -21,7 +21,7 @@ AC_CONFIG_SRCDIR([mk/config.mk.in])
dnl * We require autoconf version 2.52 dnl * We require autoconf version 2.52
dnl We need 2.50 due to the use of AC_SYS_LARGEFILE and AC_MSG_NOTICE. dnl We need 2.50 due to the use of AC_SYS_LARGEFILE and AC_MSG_NOTICE.
dnl We need 2.52 due to the use of AS_TR_CPP and AS_TR_SH. dnl We need 2.52 due to the use of AS_TR_CPP and AS_TR_SH.
AC_PREREQ(2.52) AC_PREREQ([2.52])
dnl * Declare subdirectories that have a private configure script dnl * Declare subdirectories that have a private configure script
dnl dnl
...@@ -1111,16 +1111,16 @@ dnl ** check return type of signal handlers ...@@ -1111,16 +1111,16 @@ dnl ** check return type of signal handlers
dnl Foo: assumes we can use prototypes. dnl Foo: assumes we can use prototypes.
dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)". dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler, dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler,
dnl [AC_TRY_COMPILE([#include <sys/types.h> dnl [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
dnl #include <signal.h> dnl #include <signal.h>
dnl #ifdef signal dnl #ifdef signal
dnl #undef signal dnl #undef signal
dnl #endif dnl #endif
dnl void (*signal (int, void (*)(int)))(int); dnl void (*signal (int, void (*)(int)))(int);
dnl ], dnl ]],
dnl [int i;], dnl [[int i;]])],
dnl ac_cv_type_signal_handler=void_int, dnl [ac_cv_type_signal_handler=void_int],
dnl ac_cv_type_signal_handler=int_void)]) dnl [ac_cv_type_signal_handler=int_void])])
dnl if test "$ac_cv_type_signal_handler" = void_int; then dnl if test "$ac_cv_type_signal_handler" = void_int; then
dnl AC_DEFINE(VOID_INT_SIGNALS) dnl AC_DEFINE(VOID_INT_SIGNALS)
dnl fi dnl fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment