37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
AC_SUBST(SHOBJLDFLAGS)
DC_CHK_OS_INFO
AC_MSG_CHECKING(how to create shared objects)
if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS" -a -z "$SHOBJCPPFLAGS"; then
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -mimpure-text], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -mimpure-text], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -Wl,-G], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib], [
AC_MSG_RESULT(cant)
AC_MSG_ERROR([We are unable to make shared objects.])
])
])
])
])
])
])
])
])
])
])
])
fi
AC_MSG_RESULT($SHOBJCPPFLAGS $SHOBJFLAGS $SHOBJLDFLAGS)
DC_SYNC_SHLIBOBJS
|
<
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
AC_SUBST(SHOBJLDFLAGS)
DC_CHK_OS_INFO
AC_MSG_CHECKING(how to create shared objects)
if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS" -a -z "$SHOBJCPPFLAGS"; then
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -mimpure-text], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -Wl,-G], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib -flat_namespace -undefined suppress], [
DC_TEST_SHOBJFLAGS([-fPIC], [-DPIC], [-dynamiclib], [
AC_MSG_RESULT(cant)
AC_MSG_ERROR([We are unable to make shared objects.])
])
])
])
])
])
])
])
])
])
fi
AC_MSG_RESULT($SHOBJCPPFLAGS $SHOBJFLAGS $SHOBJLDFLAGS)
DC_SYNC_SHLIBOBJS
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
AC_LANG_POP(C)
unset tryrpath
])
LDFLAGS="$OLD_LDFLAGS"
unset OLD_LDFLAGS
ADDLDFLAGS=""
for opt in $LDFLAGS $LIBS; do
if echo "$opt" | grep '^-L' >/dev/null; then
rpathdir="`echo "$opt" | sed 's@^-L *@@'`"
ADDLDFLAGS="$ADDLDFLAGS $rsk_cv_link_set_rpath -Wl,$rpathdir"
fi
done
unset opt
LDFLAGS="$LDFLAGS $ADDLDFLAGS"
unset ADDLDFLAGS
fi
])
AC_DEFUN([DC_CHK_OS_INFO], [
AC_CANONICAL_HOST
AC_SUBST(SHOBJEXT)
AC_SUBST(SHOBJFLAGS)
|
>
|
|
|
|
|
|
|
|
|
|
>
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
AC_LANG_POP(C)
unset tryrpath
])
LDFLAGS="$OLD_LDFLAGS"
unset OLD_LDFLAGS
if test -n "$rsk_cv_link_set_rpath"; then
ADDLDFLAGS=""
for opt in $LDFLAGS $LIBS; do
if echo "$opt" | grep '^-L' >/dev/null; then
rpathdir="`echo "$opt" | sed 's@^-L *@@'`"
ADDLDFLAGS="$ADDLDFLAGS $rsk_cv_link_set_rpath -Wl,$rpathdir"
fi
done
unset opt
LDFLAGS="$LDFLAGS $ADDLDFLAGS"
unset ADDLDFLAGS
fi
fi
])
AC_DEFUN([DC_CHK_OS_INFO], [
AC_CANONICAL_HOST
AC_SUBST(SHOBJEXT)
AC_SUBST(SHOBJFLAGS)
|
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
*)
SHOBJEXT="sl"
;;
esac
;;
mingw32|mingw32msvc*)
SHOBJEXT="dll"
AREXT='lib'
CFLAGS="$CFLAGS -mms-bitfields"
CPPFLAGS="$CPPFLAGS -mms-bitfields"
SHOBJCPPFLAGS="-DPIC"
SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
;;
msvc)
SHOBJEXT="dll"
|
<
|
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
*)
SHOBJEXT="sl"
;;
esac
;;
mingw32|mingw32msvc*)
SHOBJEXT="dll"
CFLAGS="$CFLAGS -mms-bitfields"
CPPFLAGS="$CPPFLAGS -mms-bitfields"
SHOBJCPPFLAGS="-DPIC"
SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a'
;;
msvc)
SHOBJEXT="dll"
|