remove empty dir
[reactos.git] / rosapps / net / ncftp / sio / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 AC_INIT(SWrite.c)
4
5 AC_CONFIG_HEADER(config.h)
6
7 no_signals=yes
8 AC_ARG_ENABLE(signals,[ --enable-signals allow use of signal handling],[no_signals=no])
9
10 wi_OS_VAR
11
12 SFLAG='-s'
13
14 case "$OS" in
15 macosx*)
16 SFLAG='-Wl,-x'
17 ;;
18 esac
19
20 AC_PROG_CC
21 wi_CFLAGS
22 AC_PROG_RANLIB
23
24 dnl Needed to build the samples.
25 wi_NET_LIBS
26
27 AC_SUBST(CC)
28 AC_SUBST(CFLAGS)
29 AC_SUBST(CPPFLAGS)
30 AC_SUBST(LDFLAGS)
31 AC_SUBST(LIBS)
32 AC_SUBST(DEFS)
33 AC_SUBST(SFLAG)
34
35 AC_C_CONST
36
37 AC_HEADER_STDC
38 AC_CHECK_HEADERS(unistd.h sys/un.h)
39 wi_HEADER_SYS_SELECT_H
40 AC_FUNC_SELECT_ARGTYPES
41 wi_STRUCT_CMSGHDR
42 wi_MSGHDR_CONTROL
43 wi_MSGHDR_ACCRIGHTS
44 wi_SOCKADDR_UN_SUN_LEN
45 AC_TYPE_SIZE_T
46
47
48 AC_CHECK_FUNCS(sigaction)
49 wi_FUNC_SIGSETJMP
50
51 changequote(<<, >>)dnl
52
53 if test "$no_signals" = no ; then
54 dv1='# if 0'
55 dv2='#if 0'
56 else
57 dv1='# if 1'
58 dv2='#if 1'
59 fi
60
61 if sed "s!^.*/. %config1!${dv1} /* %config1!;s!^.*/. %config2!${dv2} /* %config2!" sio.h > temp.h ; then
62 mv temp.h sio.h
63 chmod a+r sio.h
64 fi
65
66 if sed "s!^.*/. %config1!${dv1} /* %config1!;s!^.*/. %config2!${dv2} /* %config2!" usio.h > temp.h ; then
67 mv temp.h usio.h
68 chmod a+r usio.h
69 fi
70
71 patterns1=""
72 if [ "$SYS" = solaris ] ; then
73 patterns1='s!/. %configure%.*!#define SAccept SAcceptS!'
74 patterns2='s!/. %configure%.*!#define UAccept UAcceptS!'
75 fi
76
77 if [ "$patterns1" != "" ] ; then
78 sed "$patterns1" < sio.h > tmpfile
79 if [ $? -eq 0 ] ; then
80 mv tmpfile sio.h
81 chmod 644 sio.h
82 else
83 /bin/rm tmpfile
84 fi
85 fi
86
87 if [ "$patterns2" != "" ] ; then
88 sed "$patterns2" < usio.h > tmpfile
89 if [ $? -eq 0 ] ; then
90 mv tmpfile usio.h
91 chmod 644 usio.h
92 else
93 /bin/rm tmpfile
94 fi
95 fi
96
97 changequote([, ])dnl
98
99 LIBS=`echo "$LIBS" | sed 's/^ *//;s/ *$//;s/ */ /g'`
100 LDFLAGS=`echo "$LDFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'`
101 CPPFLAGS=`echo "$CPPFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'`
102 CFLAGS=`echo "$CFLAGS" | sed 's/^ *//;s/ *$//;s/ */ /g'`
103 DEFS=`echo "$DEFS" | sed 's/^ *//;s/ *$//;s/ */ /g'`
104
105 AC_OUTPUT([Makefile ucase_c/Makefile ucase_s/Makefile time_c/Makefile time_s/Makefile srltest/Makefile sendmessage/Makefile])