2 ### Copyright (C) 1991, 1992, Cygnus Support
3 ### All Rights Reserved.
5 ### This really needs to nestle up snuggly to the Release notes. If you change
6 ### this script, please be sure the release notes get coordinated too.
10 ### this is our version number.
11 VERSION=cygnus-sol2-||RELNO||
13 ### this is the default installation repository. We use this to test whether or
14 ### not GCC_EXEC_PREFIX should be set when doing "Install test comp-tools".
15 #INSTALLDIR_DEFAULT=/giga/rich/tmp/installdir
17 INSTALLDIR_DEFAULT=${INSTALLDIR_REAL}
18 ### this is where we install into. (useful for testing).
19 INSTALLDIR=${INSTALLDIR_DEFAULT}
21 ### where to write the log files
22 LOGDIR=${INSTALLDIR}/${VERSION}
24 ### who to call in bad situations
25 HOTLINE="the Cygnus Support Hotline at +1 415 322 7836"
27 ### what the release doc is called and a few sections thereof
28 NOTES="the Installation Notes"
29 CHANGING_PATHS="\"Changing the Paths\""
30 NO_ACCESS="\"No Access to ${INSTALLDIR}\?\""
31 MIGHT_WRONG="\"Some Things that Might go Wrong\""
32 WHY_FIXINCLUDES="Why Convert System Header Files\?"
33 ANOTHER_TAPE="\"Steps to install with another machine\'s tape drive\""
36 #PATH=/bin:/usr/bin ; export PATH
38 ### default the tape device
46 ### clear and/or initialize some variables
59 ### where the binaries are in the release
60 #EXECDIR=${VERSION}/H-${INSTALLHOST}
63 ### some tool defaults
64 ### perhaps these should be hard coded to absolute paths instead?
70 ### trigger words on the command line are:
75 ### extract, fixincludes, test-installation, remove
80 -tape=* | --tape=* | --tap=* | --ta=* | --t=*)
81 TAPE=`echo ${arg} | ${SED} 's/-*t[a-z]*=//'`
84 -installdir=* | --installdir=* | --installdi=* | --installd=* | --install=* | --instal=* | --insta=* | --inst=* | --ins=* | --in=* | --i=*)
85 INSTALLDIR=`echo ${arg} | ${SED} 's/-*i[a-z]*=//'`
86 # we will make it an absolute path shortly.
90 *remove* | rm | -rm | --rm) ACTIONS="${ACTIONS} rm" ;;
91 *extract*) ACTIONS="${ACTIONS} extract" ;;
92 *fix*) ACTIONS="${ACTIONS} fix" ;;
93 *test*) ACTIONS="${ACTIONS} test" ;;
95 *src* | *sour*) ARCH="${ARCH} src" ;;
96 *bin*) ARCH="${ARCH} bin" ;;
99 *emacs*) TOOLS="${TOOLS} emacs" ;;
100 *comp*) TOOLS="${TOOLS} comp" ;;
101 *help*) ERROR=true ;;
103 echo '***' I do not understand the option \"${arg}\".
111 ### check for a myriad of sins
115 if [ ! -d "${INSTALLDIR}" ] ; then
116 echo '*** ' Can not cd to \"${INSTALLDIR}\" because it does not exist.
117 echo '*** ' Try creating it with \"mkdir ${INSTALLDIR}\" and then try running Install again.
120 if (cd "${INSTALLDIR}") ; then
123 echo '*** ' Can not cd to \"${INSTALLDIR}\" because I do not have execute permission.
124 ls -lad ${INSTALLDIR}
125 echo '*** ' Please fix this and then try running Install again.
127 fi # ! cd ${INSTALLDIR}
128 fi # ! -d ${INSTALLDIR}
130 # Make INSTALLDIR absolute (parts below might need it that way).
131 # FIXME, do they really?
132 # FIXME, handle pwd failure from upper dir permission
133 INSTALLDIR=`cd ${INSTALLDIR} ; pwd`
134 LOGDIR=${INSTALLDIR}/${VERSION}
140 "") TOOLS="||BUNDLE||" ;;
146 ### decide where we are: try arch first.
147 if (arch) > /dev/null 2>&1 ; then
154 sun3) INSTALLHOST=${MAYBE}
158 if (uname > /dev/null) 2>&1 ; then
159 UNAME=`echo \`uname -s\`\`uname -m\`\`uname -r\``
161 UNAME="machine without a uname command (type of machine unknown)"
164 ### map into names we recognize
170 ULTRIXRISC) INSTALLHOST=decstation ;;
171 SunOSsun4*5*) INSTALLHOST=sparc-sun-solaris2 ;;
172 SunOSsun4*) INSTALLHOST=sun4 ;;
173 SunOSsun3*) INSTALLHOST=sun3 ;;
174 IRIX*) INSTALLHOST=iris4 ;;
175 *) INSTALLHOST=unknown ;;
182 "") ARCH="bin src" ;;
190 case "${FTPRELEASE}" in
191 "yes") ACTIONS="test" ;;
192 "no" ) ACTIONS="extract test" ;;
196 ### fixincludes only if comp-tools
197 for tool in ${TOOLS} ; do
200 if echo ${ARCH} | grep bin > /dev/null 2>&1 ; then
201 ACTIONS="${ACTIONS} fix"
206 done # for tool in ${TOOLS}
216 ### if binaries are not intended for this machine
217 case "${INSTALLHOST}" in
218 "||HOSTstr||") ### binaries are intended for this machine
219 for action in ${ACTIONS} ; do
222 for tool in ${TOOLS} ; do
223 OURWD=`(cd ${INSTALLDIR}; pwd) 2>/dev/null`
224 DEFAULTWD=`(cd ${INSTALLDIR_REAL}; pwd) 2>/dev/null`
230 echo '***' If you want to use the compilation tools in an alternate
231 echo '*** ' directory, GCC_EXEC_PREFIX must be set. You probably
232 echo '*** ' want to set it with:
233 echo GCC_EXEC_PREFIX=${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/ ; export GCC_EXEC_PREFIX
234 GCC_EXEC_PREFIX=${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/ ; export GCC_EXEC_PREFIX
235 echo '*** ' This is what I will use for the installation tests.
236 # skip C++ msg on Solaris
237 case "${INSTALLHOST}" in
238 sparc-sun-solaris2) ;;
240 echo '*** ' And for g++ I will use the options:
241 echo '*** ' -I${INSTALLDIR}/${EXECDIR}/lib/g++-include
242 echo '*** ' -L${INSTALLDIR}/${EXECDIR}/lib
244 esac # ${INSTALLHOST}
245 echo '*** ' For further help, please refer to ${CHANGING_PATHS}
246 echo '*** ' in ${NOTES}.
248 GPLUSOPTIONS="-I${INSTALLDIR}/${EXECDIR}/lib/g++-include -L${INSTALLDIR}/${EXECDIR}/lib"
256 echo '***' I cannot test Emacs.
257 echo '*** ' The provided Emacs binary can only run from the default
258 echo '*** ' installation directory. If you wish to run emacs, please
259 echo '*** ' refer to ${CHANGING_PATHS} in ${NOTES}.
266 done # for tool in ${TOOLS}
270 done # for action in ${ACTIONS}
274 for action in ${ACTIONS} ; do
276 rm | extract) true ;;
278 if echo ${TOOLS} | grep comp > /dev/null ; then
279 NOTFIXED="fixincludes"
280 if echo ${ACTIONS} | grep test > /dev/null ; then
286 # echo '***' If you only install Emacs you do not need to run fixincludes.
291 test) NOTTESTED="the installation tests" ;;
293 done # for action in ${ACTIONS}
295 esac # ${INSTALLHOST}
300 if [ -n "${NOTFIXED}" -o -n "${NOTTESTED}" ] ; then
301 case "${INSTALLHOST}" in
304 echo '*** ' This machine appears to be a \"${INSTALLHOST}\".
305 echo '*** ' You may still run \"$0 -extract ...\" on this machine and then
306 echo '*** ' run the other steps on the machine on which you wish to install.
307 echo '*** ' You will need to do these steps separately.
308 echo '*** ' For more information, please refer to
309 echo '*** ' ${ANOTHER_TAPE} in ${NOTES}.
312 esac # ${INSTALLHOST}
313 fi # [ -n ${NOTFIXED -o -n ${NOTTESTED} ]
315 ### if we can't read the tape drive...
318 if [ ! -d "${LOGDIR}" ] ; then
319 if mkdir ${LOGDIR}; then
322 echo '*** ' Can not write logs to \"${LOGDIR}\" because it does not exist.
323 echo '*** ' Try creating it with \"mkdir ${LOGDIR}\" and then try running Install again.
327 if [ ! -w "${LOGDIR}" ] ; then
328 echo '*** ' Can not write logs to \"${LOGDIR}\" because I do not have write permission.
330 echo '*** ' Please fix this and then try running Install again.
338 ### There is a window here that I don't know how to handle gracefully from
339 ### shell. If the directory DID exist and WAS executable but dissappeared
340 ### before we could cd into it, we're kinda hosed. If you get a call about
341 ### this, make sure the directory exists, is readable, is executable, is the
342 ### either the default installation directory or the -installdir=directory
343 ### given on the command line. Then ask them to just try again. A few times.
344 ### If you get the same error every time, we've got a very strange bug. I
347 if [ "$?" != "0" ] ; then
348 echo '***' Cannot cd to \"${INSTALLDIR}\". This is a problem.
349 echo '*** ' For further help, please refer to
350 echo '*** ' ${NO_ACCESS} in ${NOTES} or call
351 echo '*** ' ${HOTLINE}
355 if echo ${ACTIONS} | grep extract > /dev/null ; then
356 if [ -z "${ERROR}" -a ! -r "${TAPE}" ] ; then
357 ### try checking for a relative tape path
358 if [ -r ${popdir}/${TAPE} ] ; then
359 TAPE=${popdir}/${TAPE}
360 echo '***' Using TAPE device \"${TAPE}\".
362 echo '***' Can not read from TAPE device, \"${TAPE}\".
363 cd ${popdir} ; ls -lasd ${TAPE}
364 echo '*** ' Try using \"./Install -tape=/dev/something ...\" to name your tape
365 echo '*** ' drive or refer to ${MIGHT_WRONG} in
366 echo '*** ' ${NOTES}.
368 fi # ! -r ${popdir}/${TAPE}
370 fi # extract in ${ACTIONS}
380 You may supply at least one format on the command line. Recognized formats
382 binaries for binaries
383 source for source code
384 The default is both source and binaries.
386 You may also supply actions. Recognized actions are:
387 extract read the appropriate files from tape
388 fixincludes build a directory of corrected header files for comp-tools
389 test run a very brief verification of your installation
390 Default actions are extract, fixincludes, and test, although fixincludes is not
393 There are two other options:
394 -tape=DEVICE asks Install to read the necessary files from DEVICE. The
395 default DEVICE is ||DEVdflt||, the ||TAPdflt||, cartridge tape
396 drive on most ||HOSTstr||s.
397 -installdir=DIRECTORY asks Install to install files into DIRECTORY.
398 The default DIRECTORY is ${INSTALLDIR_DEFAULT}.
399 No action has been taken.
408 ### build a file list
409 ### (easy this round because we have only one package).
415 for arch in ${ARCH} ; do
418 FILE_LIST="${FILE_LIST} \
427 for tool in ${TOOLS} ; do
429 comp) TRIGGERS="${TRIGGERS} ${EXECDIR}/bin/gcc" ;;
430 emacs) TRIGGERS="${TRIGGERS} ${EXECDIR}/bin/emacs" ;;
432 echo '***' Oops. Sanity failure on triggers for binaries for ${tool}.
439 FILE_LIST="${FILE_LIST} \
443 for tool in ${TOOLS} ; do
445 comp) TRIGGERS="${TRIGGERS} ${VERSION}/src/gcc/gcc.c" ;;
446 emacs) TRIGGERS="${TRIGGERS} ${VERSION}/src/emacs/src/emacs.c" ;;
448 echo '***' Oops. Sanity failure on triggers for source for ${tool}.
455 echo '***' Oops. Sanity failure on triggers for arch ${arch}.
466 if echo ${ACTIONS} | grep rm > /dev/null 2>&1 ; then
467 if [ ! -d "${INSTALLDIR}" ] ; then
468 echo '***' Cannot remove anything from \"${INSTALLDIR}\" because it does not exist.
469 echo '*** ' You probably do not need to remove anything.
472 if [ ! -d "${INSTALLDIR}" ] ; then
473 echo '***' Can not cd to \"${INSTALLDIR}\" because it does not exist.
474 echo '*** ' You probably do not need to remove anything.
477 if [ ! -r "${INSTALLDIR}" ] ; then
478 echo '***' Can not cd to \"${INSTALLDIR}\" because I do not have execute permission.
479 ls -lad ${INSTALLDIR}
480 echo '*** ' Please fix this and then try running Install again. For
481 echo '*** ' more information, please refer to ${NO_ACCESS}
482 echo '*** ' in ${NOTES}.
489 ### see also the above note about the timing window.
491 if [ "$?" != "0" ] ; then
492 echo '***' Cannot cd to \"${INSTALLDIR}\". This is a problem.
493 echo '*** ' For further help, please refer to
494 echo '*** ' ${NO_ACCESS} in ${NOTES} or call
495 echo '*** ' ${HOTLINE}
501 if [ ! -d "${VERSION}" ] ; then
502 echo '***' Cannot remove anything from \"${INSTALLDIR}/${VERSION}\" because it does not exist.
503 echo '*** ' You probably do not need to remove anything.
509 echo Removing from \"${INSTALLDIR}\"...
511 if rm -rf ${FILE_LIST} ; then
512 # if neither binaries nor source are installed, remove installdir
513 if [ -d ${INSTALLDIR}/${EXECDIR} \
514 -o -d ${INSTALLDIR}/${VERSION}/src ] ; then
517 if rm -rf "${INSTALLDIR}/${VERSION}" ; then
520 if [ ! -w "${INSTALLDIR}" ] ; then
521 echo '***' I can not remove ${INSTALLDIR}/${VERSION}
522 echo '*** ' because I do not have write access to \"${INSTALLDIR}\"
523 echo '*** ' Please fix this and try running Install again. For more information
524 echo '*** ' please refer to ${NO_ACCESS} in ${NOTES}.
527 echo '***' I do not know why I can not remove ${INSTALLDIR}/${VERSION}. This is
528 echo '*** ' probably not a problem.
536 echo '***' There appears to have been a removal error.
537 echo '*** ' Chances are that this is not a problem, but you might try removing
542 echo Cygnus Support software distribution removed!
553 if echo ${ACTIONS} | grep extract > /dev/null 2>&1 ; then
554 if [ ! -d "${INSTALLDIR}" ] ; then
555 echo Trying to create \"${INSTALLDIR}\"...
556 if mkdir ${INSTALLDIR} ; then
557 echo Created \"${INSTALLDIR}\".
559 echo '***' I can not make directory, \"${INSTALLDIR}\".
561 ### attempt to diagnose...
563 DIR=`echo ${INSTALLDIR} | ${SED} -e 's:/[^/]*$::'`
564 if [ ! -d "${DIR}" ] ; then
565 echo '*** ' It looks as though \"${DIR}\" does not even exist.
568 if [ ! -w "${DIR}" ] ; then
569 echo '*** ' It looks as though you do not have write access to \"${DIR}\".
570 echo '*** ' Please fix this and try running Install again. For more information
571 echo '*** ' please refer to ${NO_ACCESS} in ${NOTES}.
574 echo '*** ' I do not know why I can not create \"${INSTALLDIR}\". This is a problem.
575 echo '*** ' Please call ${HOTLINE}
579 fi # mkdir ${INSTALLDIR}
582 fi # ! -d ${INSTALLDIR}
586 if [ "$?" = "0" ] ; then
587 for trigger in ${TRIGGERS} ; do
588 if [ -r "${trigger}" ] ; then
589 echo '***' \"${INSTALLDIR}/${trigger}\" exists and I will not overwrite it.
590 echo '*** ' If you really want to install it again, please remove it first.
597 echo '***' I can not cd to \"${INSTALLDIR}\".
599 ### attempt to diagnose...
601 if [ ! -r "${INSTALLDIR}" ] ; then
602 echo '*** ' It looks as though you do not have execute permission to \"${INSTALLDIR}\".
605 fi # ! -r ${INSTALLDIR}
607 echo '*** ' For further help, please refer to
608 echo '*** ' ${NO_ACCESS} in ${NOTES}.
613 ### remove redundant names from the list
614 echo ${FILE_LIST} ${COMMONS} ${EMACSHIBIN} | tr ' ' '
615 ' | sort | uniq > ${LOGDIR}/extract_list
617 echo It will take some time for me to read the tape.
618 echo Verbose output will be saved in ${LOGDIR}/tar.log
619 echo Extracting into \"${INSTALLDIR}\"...
621 ### make sure things come off the tape as they were written, but minus what could be a security hole.
624 ### using the no rewind device, so rewind and fsf to be sure.
626 if ${MT} -f ${TAPE} rewind > /dev/null 2>&1 ; then
627 if ${MT} -f ${TAPE} fsf 1 ; then
630 echo '***' Could not forward space tape device \"${TAPE}\".
634 if test -r ${TAPE} ; then
637 echo '***' Could not rewind tape device \"${TAPE}\".
640 fi # mt ${TAPE} rewind
642 if dd if=${TAPE} bs=124b | compress -d | ${TAR} ${TARKEYS} `cat ${LOGDIR}/extract_list` > ${LOGDIR}/tar.log 2>&1 && test -d ${VERSION} ; then
643 if [ -d ${INSTALLDIR}/${EXECDIR}/bin ] ; then
646 echo '***' The extraction has failed. The directory
647 echo '***' ${INSTALLDIR}/${EXECDIR}/bin was not extracted.
648 echo '*** ' The output from the tar command has been logged in ${LOGDIR}/tar.log
649 echo '*** ' I do not know how to continue until this problem has been
650 echo '*** ' corrected. If you do not know how to fix it either, please
651 echo '*** ' call ${HOTLINE}.
655 if (${MT} -f ${TAPE} rewind > /dev/null 2>&1) ; then
661 echo '***' There appears to have been an extraction error.
662 echo '*** ' The output from the tar command has been logged in ${LOGDIR}/tar.log
663 echo '*** ' I do not know how to continue until this problem has been
664 echo '*** ' corrected. If you do not know how to fix it either, please
665 echo '*** ' call ${HOTLINE}.
667 fi # dd | compress | tar ....
669 rm -f ${LOGDIR}/extract_list
670 echo Cygnus Support software distribution extracted!
673 fi # extraction in actions
681 if echo ${ACTIONS} | grep fix > /dev/null 2>&1 ; then
682 echo Running fixincludes for ${INSTALLHOST}.
683 echo Verbose output will be stored in ${LOGDIR}/fixincludes.log
684 echo This will take some time.
685 LIB=${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include ; export LIB
687 if mkdir ${LIB}/tmpdir && mv ${LIB}/*.h ${LIB}/tmpdir ; then
688 if ${INSTALLDIR}/${VERSION}/lib/fixincludes ${LIB} /usr/include ${INSTALLDIR}/${VERSION}/src/gcc > ${LOGDIR}/fixincludes.log ; then
689 mv ${LIB}/tmpdir/* ${LIB} && rmdir ${LIB}/tmpdir
690 echo Finished with fixincludes.
692 echo '***' There seems to have been a problem with fixincludes.
693 echo '*** ' The verbose output from the fixincludes script has been logged in
694 echo '*** ' ${INSTALLDIR}/${VERSION}/fixincludes.log.
695 echo '*** ' I do not know how to continue until this problem has been
696 echo '*** ' corrected. If you do not know how to fix it either, please
697 echo '*** ' call ${HOTLINE}.
698 mv ${LIB}/tmpdir/* ${LIB} && rmdir ${LIB}/tmpdir
702 echo '***' Not able to create the temporary include dir
703 echo '*** ' Please ensure that write permissions for
704 echo '*** ' ${LIB} are allowed.
705 echo '*** ' Or call ${HOTLINE} for more information.
708 echo Fixed include files installed!
715 ### testing the installation
719 if echo ${ACTIONS} | grep test > /dev/null 2>&1 && echo ${ARCH} | grep bin > /dev/null 2>&1 ; then
722 for tool in ${TOOLS} ; do
725 if [ -f ${INSTALLDIR}/${EXECDIR}/bin/gcc ] ; then
726 cat > ${LOGDIR}/hello.c <<'e!o!f'
731 int main(int argc, char **argv) {
732 (void) printf("hello: The compilation tools appear to be installed correctly on your %s.\n",
737 if ${INSTALLDIR}/${EXECDIR}/bin/gcc -Wall -O -g \
738 -DMACHINE=\"${INSTALLHOST}\" ${LOGDIR}/hello.c -o ${LOGDIR}/hello ; then
739 if ${LOGDIR}/hello ; then
742 echo '***' Hello.c fails to run. This is a problem.
743 echo '*** ' Please call ${HOTLINE}
747 echo '***' Hello.c fails to compile. This is a problem.
748 echo '*** ' Please call ${HOTLINE}
752 ### now check for fixed includes.
753 cat > ${LOGDIR}/test-ioctl.c << 'e!o!f'
754 #include <sys/types.h>
755 #include <sys/stat.h>
759 double atof(const char *);
762 #include <sys/filio.h>
770 int main(int argc, char **argv) {
776 if ((fd = open("/dev/tty", O_RDONLY)) == -1) {
777 (void) perror("test-ioctl: can't open /dev/null");
779 } else if ((retval = ioctl(fd, FIONREAD, &l)) != 0) {
780 (void) perror("test-ioctl: ioctl failed");
781 (void) printf("test-ioctl: Most likely, you have not run \"Install fixincludes\" on this machine.\n");
786 printf("test-ioctl: Ansi versions of the system header files, (the fixed includes),\n");
787 printf("test-ioctl: appear to be installed correctly.\n");
789 /* that's right. If closing /dev/tty fails, I don't want to know about it. */
795 case "||HOSTstr||" in
796 sun3 | sun4 | decstation)
797 if ${INSTALLDIR}/${EXECDIR}/bin/gcc -Wall -O -g \
798 -DMACHINE=\"${INSTALLHOST}\" ${LOGDIR}/test-ioctl.c -o ${LOGDIR}/test-ioctl ; then
799 if ${LOGDIR}/test-ioctl ; then
804 echo '***' test-ioctl.c fails to read /dev/tty. If you were running Install
805 echo '*** ' in batch or from a daemon, please try running it again interactively.
806 echo '*** ' If not, please call ${HOTLINE}
810 echo '***' test-ioctl.c fails to ioctl.
811 echo '*** ' Most likely you need to run \"Install fixincludes\".
812 echo '*** ' Please run \"Install fixincludes\" and
813 echo '*** ' then try this test again. For an explanation see
814 echo '*** ' ${WHY_FIXINCLUDES} in ${NOTES}.
818 echo '***' test-ioctl.c fails to run. This is a problem.
819 echo '*** ' Please call ${HOTLINE}
826 ### this presupposes that hello.c DID compile.
827 echo '***' test-ioctl.c fails to compile. This is a problem.
828 echo '*** ' Please call ${HOTLINE}
833 if [ ! -f ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/sys/cfeiroute.h ]
835 echo '***' You seem to be missing ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/sys/cfeiroute.h.
836 echo '*** ' Most likely you need to run \"Install fixincludes\".
837 echo '*** ' Please run \"Install fixincludes\" and
838 echo '*** ' then try this test again. For an explanation see
839 echo '*** ' ${WHY_FIXINCLUDES} in ${NOTES}.
841 fi # test fixincluded file
844 if [ ! -f ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/ieeefp.h ]
846 echo '***' You seem to be missing ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/ieeefp.h.
847 echo '*** ' Most likely you need to run \"Install fixincludes\".
848 echo '*** ' Please run \"Install fixincludes\" and
849 echo '*** ' then try this test again. For an explanation see
850 echo '*** ' ${WHY_FIXINCLUDES} in ${NOTES}.
856 if [ ! -f ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/piostruct.h ]
858 echo '***' You seem to be missing ${INSTALLDIR}/${EXECDIR}/lib/gcc-lib/||HOSTstr||/||GCCvn||/include/piostruct.h.
859 echo '*** ' Most likely you need to run \"Install fixincludes\".
860 echo '*** ' Please run \"Install fixincludes\" and
861 echo '*** ' then try this test again. For an explanation see
862 echo '*** ' ${WHY_FIXINCLUDES} in ${NOTES}.
864 fi # test fixincluded file
869 fi # test if gcc present
871 ### now check for g++.
872 if [ -f ${INSTALLDIR}/${EXECDIR}/bin/g++ ] ; then
873 cat > ${LOGDIR}/hello.C << 'e!o!f'
874 #include <iostream.h>
876 int main(int argc, char**argv)
878 char *machine = MACHINE;
879 cout << "hello: g++ appears to be installed correctly on your "
884 if ${INSTALLDIR}/${EXECDIR}/bin/gcc ${GPLUSOPTIONS} -Wall -O -g \
885 -DMACHINE=\"${INSTALLHOST}\" ${LOGDIR}/hello.C -o ${LOGDIR}/Hello -lg++ ; then
886 if ${LOGDIR}/Hello ; then
889 echo '***' hello.C fails to run. This is a problem.
890 echo '*** ' Please call ${HOTLINE}
894 ### this presupposes that hello.c DID compile.
895 echo '***' hello.C fails to compile. This is a problem.
896 echo '*** ' Please call ${HOTLINE}
900 ### now check for static initialization.
901 cat > ${LOGDIR}/static-init.C << 'e!o!f'
902 #include <iostream.h>
906 Foo(int i) { Three = i; }
911 int main(int argc, char**argv)
914 cout << "static-init: static initialization fails.\n";
918 cout << "static-init: static initialization appears to work.\n";
922 if ${INSTALLDIR}/${EXECDIR}/bin/gcc ${GPLUSOPTIONS} -Wall -O -g \
923 -DMACHINE=\"${INSTALLHOST}\" ${LOGDIR}/static-init.C -o ${LOGDIR}/static-init -lg++ ; then
924 if ${LOGDIR}/static-init ; then
927 echo '***' Static initialization is not working. This is a problem.
928 echo '*** ' Please call ${HOTLINE}
932 ### this presupposes that it DID compile.
933 echo '***' static-init.c fails to compile. This is a problem.
934 echo '*** ' Please call ${HOTLINE}
937 else # no g++, so don't test it
942 cat > ${LOGDIR}/hello.el <<'e!o!f'
944 (message "Emacs appears to be installed correctly.")
947 if ${INSTALLDIR}/${EXECDIR}/bin/emacs -batch -l ${LOGDIR}/hello.el ; then
950 echo '***' Emacs fails to run. This is a problem.
951 echo '*** ' Please call ${HOTLINE}
955 src) # if anyone can tell me how to test the installation of source...
959 echo '***' I do not know how to test for tool \"${tool}\" because I have never
960 echo '*** ' heard of it. This is a problem. Please call ${HOTLINE}.
965 rm -f hello* test-ioctl* static-init* Hello*
967 echo Cygnus Support software distribution tested!
978 ### comment-column: 0