Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b65a48e

Browse files
committed
linux elf shlib; sys/wait.h; don't add -posix for NeXT
1 parent 3c294ca commit b65a48e

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

configure.in

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,11 @@ fi
4949

5050
# checks for UNIX variants that set C preprocessor variables
5151
AC_AIX
52-
AC_ISC_POSIX
5352
AC_MINIX
5453

55-
was_it_defined=no
56-
AC_TRY_RUN([
57-
#ifdef _NEXT_SOURCE
58-
main() { exit(0); }
59-
#endif
60-
], AC_DEFINE(_POSIX_SOURCE)
61-
CC="$CC -posix"; was_it_defined=yes)
62-
AC_MSG_CHECKING(for NeXT)
63-
AC_MSG_RESULT($was_it_defined)
64-
6554
# checks for header files
6655
AC_HEADER_STDC
67-
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h)
56+
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h sys/wait.h)
6857
AC_HEADER_DIRENT
6958

7059
# checks for typedefs
@@ -125,12 +114,13 @@ then
125114
hp*|HP*) LDSHARED="ld -b";;
126115
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
127116
DYNIX/ptx*) LDSHARED="ld -G";;
117+
Linux*) LDSHARED="gcc-elf -shared";;
128118
*) LDSHARED="ld";;
129119
esac
130120
fi
131121
AC_MSG_RESULT($LDSHARED)
132122
# CCSHARED are the C *flags* used to create objects to go into a shared
133-
# library -- this is only needed for HP-UX
123+
# library -- this is only needed for a few systems
134124
AC_MSG_CHECKING(CCSHARED)
135125
if test -z "$CCSHARED"
136126
then
@@ -139,16 +129,18 @@ then
139129
then CCSHARED="-fpic";
140130
else CCSHARED="+z";
141131
fi;;
132+
Linux*) CCSHARED="-fpic";;
142133
esac
143134
fi
144135
AC_MSG_RESULT($CCSHARED)
145136
# LINKFORSHARED are the flags passed to the $(CC) command that links
146-
# the python executable -- this is only needed for HP-UX
137+
# the python executable -- this is only needed for a few systems
147138
AC_MSG_CHECKING(LINKFORSHARED)
148139
if test -z "$LINKFORSHARED"
149140
then
150141
case $ac_sys_system in
151142
hp*|HP*) LINKFORSHARED="-Wl,-E";;
143+
Linux*) LINKFORSHARED="-rdynamic";;
152144
esac
153145
fi
154146
AC_MSG_RESULT($LINKFORSHARED)

0 commit comments

Comments
 (0)