OSDN Git Service

Fix bugs of simultaneous connection.
[ffftp/ffftp.git] / putty / MKAUTO.SH
1 #! /bin/sh\r
2 # This script makes the autoconf mechanism for the Unix port work.\r
3 # It's separate from mkfiles.pl because it won't work (and isn't needed)\r
4 # on a non-Unix system.\r
5 \r
6 # It's nice to be able to run this from inside the unix subdir as\r
7 # well as from outside.\r
8 test -f unix.h && cd ..\r
9 \r
10 # Persuade automake to give us a copy of its install-sh. This is a\r
11 # pain because I don't actually want to have to _use_ automake.\r
12 # Instead, I construct a trivial unrelated automake project in a\r
13 # temporary subdirectory, run automake so that it'll copy\r
14 # install-sh into that directory, then copy it back out again.\r
15 # Hideous, but it should work.\r
16 \r
17 mkdir automake-grievous-hack\r
18 cat > automake-grievous-hack/hello.c << EOF\r
19 #include <stdio.h>\r
20 int main(int argc, char **argv)\r
21 {\r
22     printf("hello, world\n");\r
23     return 0;\r
24 }\r
25 EOF\r
26 cat > automake-grievous-hack/Makefile.am << EOF\r
27 bin_PROGRAMS = hello\r
28 hello_SOURCES = hello.c\r
29 EOF\r
30 cat > automake-grievous-hack/configure.ac << EOF\r
31 AC_INIT\r
32 AM_INIT_AUTOMAKE(hello, 1.0)\r
33 AC_CONFIG_FILES([Makefile])\r
34 AC_PROG_CC\r
35 AC_OUTPUT\r
36 EOF\r
37 echo Some news > automake-grievous-hack/NEWS\r
38 echo Some text > automake-grievous-hack/README\r
39 echo Some people > automake-grievous-hack/AUTHORS\r
40 echo Some changes > automake-grievous-hack/ChangeLog\r
41 rm -f install-sh # this won't work if we accidentally have one _here_\r
42 (cd automake-grievous-hack && autoreconf -i && \\r
43   cp install-sh ../unix/install-sh)\r
44 rm -rf automake-grievous-hack\r
45 \r
46 # That was the hard bit. Now run autoconf on our real configure.in.\r
47 (cd unix && autoreconf && rm -rf aclocal.m4 autom4te.cache)\r