| 1 | From |
| 2 | |
| 3 | https://github.com/openembedded/openembedded-core/tree/master/meta/recipes-extended/screen/screen |
| 4 | |
| 5 | diff -u -r ../screen-4.4.0/configure.ac ./configure.ac |
| 6 | --- ../screen-4.4.0/configure.ac 2016-06-19 15:41:03.000000000 -0400 |
| 7 | +++ ./configure.ac 2016-11-07 18:05:24.132420605 -0500 |
| 8 | @@ -48,31 +48,6 @@ |
| 9 | AC_ISC_POSIX |
| 10 | AC_USE_SYSTEM_EXTENSIONS |
| 11 | |
| 12 | -AC_TRY_RUN(main(){exit(0);},,[ |
| 13 | -if test $CC != cc ; then |
| 14 | -AC_NOTE(Your $CC failed - restarting with CC=cc) |
| 15 | -AC_NOTE() |
| 16 | -CC=cc |
| 17 | -export CC |
| 18 | -exec $0 $configure_args |
| 19 | -fi |
| 20 | -]) |
| 21 | - |
| 22 | -AC_TRY_RUN(main(){exit(0);},, |
| 23 | -exec 5>&2 |
| 24 | -eval $ac_link |
| 25 | -AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) |
| 26 | -AC_NOTE($ac_compile) |
| 27 | -AC_MSG_ERROR(Can't run the compiler - sorry)) |
| 28 | - |
| 29 | -AC_TRY_RUN([ |
| 30 | -main() |
| 31 | -{ |
| 32 | - int __something_strange_(); |
| 33 | - __something_strange_(0); |
| 34 | -} |
| 35 | -],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) |
| 36 | - |
| 37 | AC_PROG_AWK |
| 38 | |
| 39 | AC_PROG_INSTALL |
| 40 | @@ -110,7 +85,7 @@ |
| 41 | dnl |
| 42 | dnl **** special unix variants **** |
| 43 | dnl |
| 44 | -if test -n "$ISC"; then |
| 45 | +if test "$cross_compiling" = no && test -n "$ISC" ; then |
| 46 | AC_DEFINE(ISC) LIBS="$LIBS -linet" |
| 47 | fi |
| 48 | |
| 49 | @@ -121,10 +96,11 @@ |
| 50 | dnl fi |
| 51 | dnl fi |
| 52 | |
| 53 | -if test -f /sysV68 ; then |
| 54 | +if test "$cross_compiling" = no && test -f /sysV68 ; then |
| 55 | AC_DEFINE(sysV68) |
| 56 | fi |
| 57 | |
| 58 | +if test "$cross_compiling" = no ; then |
| 59 | AC_CHECKING(for MIPS) |
| 60 | if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then |
| 61 | oldlibs="$LIBS" |
| 62 | @@ -148,6 +124,7 @@ |
| 63 | )) |
| 64 | fi |
| 65 | fi |
| 66 | +fi |
| 67 | |
| 68 | |
| 69 | AC_CHECKING(for Ultrix) |
| 70 | @@ -157,7 +134,7 @@ |
| 71 | #endif |
| 72 | ], ULTRIX=1) |
| 73 | |
| 74 | -if test -f /usr/lib/libpyr.a ; then |
| 75 | +if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then |
| 76 | oldlibs="$LIBS" |
| 77 | LIBS="$LIBS -lpyr" |
| 78 | AC_CHECKING(Pyramid OSX) |
| 79 | @@ -373,7 +350,8 @@ |
| 80 | exit(0); |
| 81 | } |
| 82 | ], AC_NOTE(- your fifos are usable) fifo=1, |
| 83 | -AC_NOTE(- your fifos are not usable)) |
| 84 | +AC_NOTE(- your fifos are not usable), |
| 85 | +AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1) |
| 86 | rm -f /tmp/conftest* |
| 87 | |
| 88 | if test -n "$fifo"; then |
| 89 | @@ -421,7 +399,8 @@ |
| 90 | exit(0); |
| 91 | } |
| 92 | ], AC_NOTE(- your implementation is ok), |
| 93 | -AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) |
| 94 | +AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1, |
| 95 | +AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok)) |
| 96 | rm -f /tmp/conftest* |
| 97 | fi |
| 98 | |
| 99 | @@ -483,7 +462,9 @@ |
| 100 | exit(0); |
| 101 | } |
| 102 | ], AC_NOTE(- your sockets are usable) sock=1, |
| 103 | -AC_NOTE(- your sockets are not usable)) |
| 104 | + |
| 105 | +AC_NOTE(- your sockets are not usable), |
| 106 | +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1) |
| 107 | rm -f /tmp/conftest* |
| 108 | |
| 109 | if test -n "$sock"; then |
| 110 | @@ -522,7 +503,8 @@ |
| 111 | } |
| 112 | ],AC_NOTE(- you are normal), |
| 113 | AC_NOTE(- unix domain sockets are not kept in the filesystem) |
| 114 | -AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) |
| 115 | +AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1, |
| 116 | +AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal)) |
| 117 | rm -f /tmp/conftest* |
| 118 | fi |
| 119 | |
| 120 | @@ -649,7 +631,8 @@ |
| 121 | exit(0); |
| 122 | } |
| 123 | ],AC_NOTE(- select is ok), |
| 124 | -AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) |
| 125 | +AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN), |
| 126 | +AC_NOTE(- skipping check because we are cross compiling; assuming select is ok)) |
| 127 | |
| 128 | dnl |
| 129 | dnl **** termcap or terminfo **** |
| 130 | @@ -691,24 +674,29 @@ |
| 131 | { |
| 132 | exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); |
| 133 | }], AC_NOTE(- you use the termcap database), |
| 134 | -AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) |
| 135 | +AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO), |
| 136 | +AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO)) |
| 137 | AC_CHECKING(ospeed) |
| 138 | AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) |
| 139 | |
| 140 | dnl |
| 141 | dnl **** PTY specific things **** |
| 142 | dnl |
| 143 | +if test "$cross_compiling" = no ; then |
| 144 | AC_CHECKING(for /dev/ptc) |
| 145 | if test -r /dev/ptc; then |
| 146 | AC_DEFINE(HAVE_DEV_PTC) |
| 147 | fi |
| 148 | +fi |
| 149 | |
| 150 | +if test "$cross_compiling" = no ; then |
| 151 | AC_CHECKING(for SVR4 ptys) |
| 152 | sysvr4ptys= |
| 153 | if test -c /dev/ptmx ; then |
| 154 | AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) |
| 155 | sysvr4ptys=1]) |
| 156 | fi |
| 157 | +fi |
| 158 | |
| 159 | AC_CHECK_FUNCS(getpt) |
| 160 | |
| 161 | @@ -718,6 +706,7 @@ |
| 162 | [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) |
| 163 | fi |
| 164 | |
| 165 | +if test "$cross_compiling" = no ; then |
| 166 | AC_CHECKING(for ptyranges) |
| 167 | if test -d /dev/ptym ; then |
| 168 | pdir='/dev/ptym' |
| 169 | @@ -741,6 +730,7 @@ |
| 170 | AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") |
| 171 | AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") |
| 172 | fi |
| 173 | +fi |
| 174 | |
| 175 | dnl **** pty mode/group handling **** |
| 176 | dnl |
| 177 | @@ -826,7 +816,8 @@ |
| 178 | else |
| 179 | AC_NOTE(- can't determine - assume ptys are world accessable) |
| 180 | fi |
| 181 | - ] |
| 182 | + ], |
| 183 | + AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable) |
| 184 | ) |
| 185 | rm -f conftest_grp |
| 186 | fi |
| 187 | @@ -887,14 +878,16 @@ |
| 188 | dnl |
| 189 | dnl **** loadav **** |
| 190 | dnl |
| 191 | +if test "$cross_compiling" = no ; then |
| 192 | AC_CHECKING(for libutil(s)) |
| 193 | test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" |
| 194 | test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" |
| 195 | +fi |
| 196 | |
| 197 | AC_CHECKING(getloadavg) |
| 198 | AC_TRY_LINK(,[getloadavg((double *)0, 0);], |
| 199 | AC_DEFINE(LOADAV_GETLOADAVG) load=1, |
| 200 | -if test -f /usr/lib/libkvm.a ; then |
| 201 | +if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then |
| 202 | olibs="$LIBS" |
| 203 | LIBS="$LIBS -lkvm" |
| 204 | AC_CHECKING(getloadavg with -lkvm) |
| 205 | @@ -910,7 +903,7 @@ |
| 206 | #endif |
| 207 | ], load=1) |
| 208 | fi |
| 209 | -if test -z "$load" ; then |
| 210 | +if test -z "$load" && test "$cross_compiling" = no ; then |
| 211 | AC_CHECKING(for kernelfile) |
| 212 | for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do |
| 213 | if test -f $core || test -c $core; then |
| 214 | @@ -1103,7 +1096,7 @@ |
| 215 | #endif |
| 216 | exit(0); |
| 217 | } |
| 218 | -],,AC_DEFINE(SYSVSIGS)) |
| 219 | +],,AC_DEFINE(SYSVSIGS),:) |
| 220 | |
| 221 | fi |
| 222 | |
| 223 | @@ -1112,13 +1105,17 @@ |
| 224 | dnl |
| 225 | |
| 226 | AC_CHECKING(for crypt and sec libraries) |
| 227 | +if test "$cross_compiling" = no ; then |
| 228 | test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" |
| 229 | +fi |
| 230 | oldlibs="$LIBS" |
| 231 | LIBS="$LIBS -lcrypt" |
| 232 | AC_CHECKING(crypt) |
| 233 | AC_TRY_LINK(,,,LIBS="$oldlibs") |
| 234 | +if test "$cross_compiling" = no ; then |
| 235 | test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" |
| 236 | test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" |
| 237 | +fi |
| 238 | oldlibs="$LIBS" |
| 239 | LIBS="$LIBS -lsun" |
| 240 | AC_CHECKING(IRIX sun library) |
| 241 | @@ -1183,7 +1180,7 @@ |
| 242 | if (strncmp(buf, "cdedef", 6)) |
| 243 | exit(1); |
| 244 | exit(0); /* libc version works properly. */ |
| 245 | -}], AC_DEFINE(USEBCOPY)) |
| 246 | +}], AC_DEFINE(USEBCOPY),,:) |
| 247 | |
| 248 | AC_TRY_RUN([ |
| 249 | #define bcopy(s,d,l) memmove(d,s,l) |
| 250 | @@ -1198,7 +1195,8 @@ |
| 251 | if (strncmp(buf, "cdedef", 6)) |
| 252 | exit(1); |
| 253 | exit(0); /* libc version works properly. */ |
| 254 | -}], AC_DEFINE(USEMEMMOVE)) |
| 255 | +}], AC_DEFINE(USEMEMMOVE),, |
| 256 | + AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE)) |
| 257 | |
| 258 | |
| 259 | AC_TRY_RUN([ |
| 260 | @@ -1214,7 +1212,7 @@ |
| 261 | if (strncmp(buf, "cdedef", 6)) |
| 262 | exit(1); |
| 263 | exit(0); /* libc version works properly. */ |
| 264 | -}], AC_DEFINE(USEMEMCPY)) |
| 265 | +}], AC_DEFINE(USEMEMCPY),,:) |
| 266 | |
| 267 | AC_SYS_LONG_FILE_NAMES |
| 268 | |
| 269 | @@ -1300,8 +1298,6 @@ |
| 270 | dnl Ptx bug workaround -- insert -lc after -ltermcap |
| 271 | test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" |
| 272 | |
| 273 | -AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) |
| 274 | - |
| 275 | ETCSCREENRC= |
| 276 | AC_MSG_CHECKING(for the global screenrc file) |
| 277 | AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ]) |