📄 configur
字号:
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_SYS_TYPES_H
EOF
cat > conftest.$ac_ext <<EOF
#line 888 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "size_t" >/dev/null 2>&1; then
rm -rf conftest*
ijg_size_t_ok="size_t is in sys/types.h"
else
rm -rf conftest*
ijg_size_t_ok=no
fi
rm -f conftest*
else
echo "$ac_t""no" 1>&6
ijg_size_t_ok=no
fi
echo "$ac_t""$ijg_size_t_ok" 1>&6
if test "$ijg_size_t_ok" = no; then
echo Type size_t is not defined in any of the usual places.
echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
fi
fi
echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 915 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
unsigned char un_char;
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_UNSIGNED_CHAR
EOF
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
fi
rm -f conftest*
echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 937 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
unsigned short un_short;
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_UNSIGNED_SHORT
EOF
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
fi
rm -f conftest*
echo $ac_n "checking for type void""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 959 "configure"
#include "confdefs.h"
/* Caution: a C++ compiler will insist on valid prototypes */
typedef void * void_ptr; /* check void * */
#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */
typedef void (*void_func) (int a, int b);
#else
typedef void (*void_func) ();
#endif
#ifdef HAVE_PROTOTYPES /* check void function result */
void test3function (void_ptr arg1, void_func arg2)
#else
void test3function (arg1, arg2)
void_ptr arg1;
void_func arg2;
#endif
{
char * locptr = (char *) arg1; /* check casting to and from void * */
arg1 = (void *) locptr;
(*arg2) (1, 2); /* check call of fcn returning void */
}
int main() { return 0; }
int t() {
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
rm -rf conftest*
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define void char
EOF
fi
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1005 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
/* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
ac_cv_c_const=yes
else
rm -rf conftest*
ac_cv_c_const=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
cat >> confdefs.h <<\EOF
#define const
EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
ijg_cv_inline=""
cat > conftest.$ac_ext <<EOF
#line 1077 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
} inline int foo() { return 0; }
int bar() { return foo();
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
ijg_cv_inline="inline"
else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 1092 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
} __inline__ int foo() { return 0; }
int bar() { return foo();
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
ijg_cv_inline="__inline__"
else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
#line 1107 "configure"
#include "confdefs.h"
int main() { return 0; }
int t() {
} __inline int foo() { return 0; }
int bar() { return foo();
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
ijg_cv_inline="__inline"
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
echo "$ac_t""$ijg_cv_inline" 1>&6
cat >> confdefs.h <<EOF
#define INLINE $ijg_cv_inline
EOF
echo $ac_n "checking for broken incomplete types""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 1133 "configure"
#include "confdefs.h"
typedef struct undefined_structure * undef_struct_ptr;
int main() { return 0; }
int t() {
; return 0; }
EOF
if eval $ac_compile; then
rm -rf conftest*
echo "$ac_t""ok" 1>&6
else
rm -rf conftest*
echo "$ac_t""broken" 1>&6
cat >> confdefs.h <<\EOF
#define INCOMPLETE_TYPES_BROKEN
EOF
fi
rm -f conftest*
echo $ac_n "checking for short external names""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
#line 1155 "configure"
#include "confdefs.h"
int possibly_duplicate_function () { return 0; }
int possibly_dupli_function () { return 1; }
int main() { return 0; }
int t() {
; return 0; }
EOF
if eval $ac_link; then
rm -rf conftest*
echo "$ac_t""ok" 1>&6
else
rm -rf conftest*
echo "$ac_t""short" 1>&6
cat >> confdefs.h <<\EOF
#define NEED_SHORT_EXTERNAL_NAMES
EOF
fi
rm -f conftest*
echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6
if test "$cross_compiling" = yes; then
echo Assuming that char is signed on target machine.
echo If it is unsigned, this will be a little bit inefficient.
else
cat > conftest.$ac_ext <<EOF
#line 1186 "configure"
#include "confdefs.h"
#ifdef HAVE_PROTOTYPES
int is_char_signed (int arg)
#else
int is_char_signed (arg)
int arg;
#endif
{
if (arg == 189) { /* expected result for unsigned char */
return 0; /* type char is unsigned */
}
else if (arg != -67) { /* expected result for signed char */
printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
printf("I fear the JPEG software will not work at all.\n\n");
}
return 1; /* assume char is signed otherwise */
}
char signed_char_check = (char) (-67);
main() {
exit(is_char_signed((int) signed_char_check));
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define CHAR_IS_UNSIGNED
EOF
else
echo "$ac_t""yes" 1>&6
fi
fi
rm -fr conftest*
echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6
if test "$cross_compiling" = yes; then
echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1227 "configure"
#include "confdefs.h"
#ifdef HAVE_PROTOTYPES
int is_shifting_signed (long arg)
#else
int is_shifting_signed (arg)
long arg;
#endif
/* See whether right-shift on a long is signed or not. */
{
long res = arg >> 4;
if (res == -0x7F7E80CL) { /* expected result for signed shift */
return 1; /* right shift is signed */
}
/* see if unsigned-shift hack will fix it. */
/* we can't just test exact value since it depends on width of long... */
res |= (~0L) << (32-4);
if (res == -0x7F7E80CL) { /* expected result now? */
return 0; /* right shift is unsigned */
}
printf("Right shift isn't acting as I expect it to.\n");
printf("I fear the JPEG software will not work at all.\n\n");
return 0; /* try it with unsigned anyway */
}
main() {
exit(is_shifting_signed(-0x7F7E80B1L));
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define RIGHT_SHIFT_IS_UNSIGNED
EOF
else
echo "$ac_t""yes" 1>&6
fi
fi
rm -fr conftest*
echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6
if test "$cross_compiling" = yes; then
echo "$ac_t""Assuming that it does." 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1274 "configure"
#include "confdefs.h"
#include <stdio.h>
main() {
if (fopen("conftestdata", "wb") != NULL)
exit(0);
exit(1);
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
echo "$ac_t""yes" 1>&6
else
echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define DONT_USE_B_MODE
EOF
fi
fi
rm -fr conftest*
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -