Annotation of OpenXM_contrib/pari-2.2/Configure, Revision 1.1.1.1
1.1 noro 1: #! /bin/sh
2: #
3: # This file is part of the PARI/GP package.
4: #
5: # PARI/GP is free software; you can redistribute it and/or modify it under the
6: # terms of the GNU General Public License as published by the Free Software
7: # Foundation. It is distributed in the hope that it will be useful, but WITHOUT
8: # ANY WARRANTY WHATSOEVER.
9: #
10: # Check the License for details. You should have received a copy of it, along
11: # with the package; see the file 'COPYING'. If not, write to the Free Software
12: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
13:
14: # Configuration file for GP/PARI. (K.B & Ptitboul).
15: #
16: # Run Configure -help for Usage.
17: #
18: # The Configure included in Perl distribution (written by Larry Wall), as
19: # well as GNU autoconfig package were of much help in writing these config
20: # files.
21:
22: TOP=`pwd`
23: dflt_conf_file=dft.Config.in
24:
25: # Directories
26: config_dir=config
27: data_dir=data
28: doc_dir=doc
29: emacs_dir=emacs
30: examples_dir=examples
31: misc_dir=misc
32: src_dir=src
33:
34: extract_dir_list="$doc_dir $emacs_dir $misc_dir"
35:
36: # Version number and patch level.
37: . $config_dir/version
38: version=$VersionMajor.$VersionMinor
39: if test `expr $VersionMinor % 2` = 1; then
40: echo "Configuring pari-$version.$patch (STABLE)"
41: libpari_base=pari
42: else
43: echo "Configuring pari-$version.$patch (DEVELOPMENT VERSION)"
44: libpari_base=pari-$version
45: fi
46:
47: cd $config_dir
48:
49: ####################### CONFIGURE - OPTIONS #################################
50: #
51: # Processing Options
52: #
53: fastread=yes
54: config_file=
55: optimization=full
56: prefix=/usr/local
57: share_prefix=
58: target_host=
59: which_graphic_lib=none
60: test -n "$GP_INSTALL_PREFIX" && prefix=$GP_INSTALL_PREFIX
61: while test $# -gt 0; do
62: case "$1" in
63: -l|-load) shift; initfile=$1;
64: cd $TOP
65: PATH=.:$PATH; export PATH
66: if test -z "$1";then
67: tmp_host=`$config_dir/arch-osname`
68: arch=`echo "$tmp_host" | sed -e 's/\(.*\)-.*/\1/'`
69: osname=`echo "$tmp_host" | sed -e 's/.*-\(.*\)/\1/'`
70: objdir=O$osname-$arch;
71: initfile=$objdir/$dflt_conf_file;
72: fi
73: if test -r "$initfile"; then
74: . $initfile
75: if test ! -d $objdir; then mkdir $objdir; fi
76: . $config_dir/extract_files
77: exit 0
78: else
79: echo "Cannot read config file \"$initfile\"." >&2
80: exit 1
81: fi;;
82: -p|-prefix) shift; prefix=$1;;
83: --prefix=*|--prefi=*|--pref=*|--pre=*|--pr=*|--p=*)
84: prefix=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
85: --share-prefix=*)
86: share_prefix=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
87: --bindir=*) dfltbindir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
88: --libdir=*) dfltlibdir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
89: --mandir=*) dfltmandir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
90: --miscdir=*) dfltmiscdir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
91: --datadir=*) dfltdatadir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
92: --includedir=*) dfltincludedir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
93: --host=*)
94: target_host=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
95: --disable-kernel) kernel=no;;
96: -a|-ask|--ask) fastread=no;;
97: -g) optimization=debugging;;
98: -pg) optimization=profiling;;
99: -rdll) DYNRELOC=yes;;
100: -h|-help|--help|-\?)error=true;;
101: -v|-verbhelp|--verbhelp)error=verb;;
102: -s|--static) static=y;;
103: -graphic|--graphic) shift; which_graphic_lib=$1; graph_cmd=yes ;;
104: --graphic=*|--graphi=*|--graph=*|--grap=*|--gra=*|--gr=*|--g=*)
105: graph_cmd=yes
106: which_graphic_lib=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
107: *) echo "*** Unrecognized option $1." >&2; error=true;;
108: esac
109: shift
110: done
111:
112: case "$error" in
113: true) cat >&2 <<EOT
114: Usage: Configure [-ask|-help|-g|-pg] [ -load <filename> ] [ --prefix=<dir> ]
115:
116: Options: some names can be abbreviated to one character (e.g -h = -help)
117: -a, --ask interactive configuration
118: -h, --help this message
119: -l, --load skip Configure and specify a default config file
120: -s, --static build static GP binary only
121: -v, --verbhelp a longer help message
122: Build Options:
123: --host=<arch-osname> target achitecture
124: --graphic=<gr> graphic library used (default X11) (none X11 gnuplot)
125: Additional developer options:
126: -g creates debugging version (in Oxxx.dbg)
127: -pg creates profiling version (in Oxxx.prf)
128: -rdll creates relocatable DLL (Cygwin32 only)
129:
130: Installation directories:
131: --prefix=<dir> install files in <dir> (default $prefix)
132: --share-prefix=<dir> as 'prefix', for architecture independant files
133: --bindir=<dir> for binaries
134: --libdir=<dir> for libraries
135: --mandir=<dir> for manual pages
136: --miscdir=<dir> for documentation, examples and emacs macros
137: --datadir=<dir> for precomputed data (Galois resolvents for polgalois)
138: --includedir=<dir> for C header files
139: EOT
140: exit 1
141: ;;
142: verb) cat >&2 <<EOT
143: Architecture, operating system and asm kernel.
144: Configure tries to detect what is the architecture of the machine (CPU type)
145: and what operating system it is running. Then, it decides whether an asm
146: kernel exists and should be used. You can override this with Configure -ask.
147: Which compiler will be used ?
148: Depending on the machine (architecture and operating system) and on what is
149: found in the path, a compiler is automatically chosen. If you set the
150: environment variable CC before typing Configure, it will be used instead.
151: Typeset the installation help ('tex INSTALL.tex') for more details.
152: EOT
153: exit 1
154: ;;
155: esac
156:
157: test "$fastread" = yes || cat <<EOT
158: ==========================================================================
159: Beginning configuration questions for GP/PARI.
160:
161: You will be asked some questions about your system. Most of the time, a list
162: of acceptable answers will be supplied as well as a default between brackets.
163: Type a carriage return ('Enter') to accept these defaults.
164:
165: Though the present script strives to prevent any fatal mistake on your part,
166: there is currently no easy way out if you make one. Your best bet is to press
167: Ctrl-C, then start again. Another possibility is to wait till the questions
168: end, edit the file "Oxxx/$dflt_conf_file", then run
169:
170: Configure -load Oxxx/$dflt_conf_file
171:
172: (which can be abbreviated to simply "Configure -l", provided your architecture
173: is correctly detected)
174: ==========================================================================
175: EOT
176:
177: ####################### CONFIGURE - SHELL ###################################
178: if test -z "$OS2_SHELL"; then dir_sep=':' ; else dir_sep=';' ; fi
179:
180: #
181: # Proper PATH setting
182: #
183: pth="\
184: /bin\
185: /usr/bin\
186: /usr/locateal/bin\
187: /usr/ucb\
188: /usr/locateal\
189: /usr/lbin\
190: /usr/5bin\
191: /etc\
192: /usr/etc\
193: /usr/gnu/bin\
194: /usr/new\
195: /usr/new/bin\
196: /usr/nbin\
197: /sys5.3/bin\
198: /sys5.3/usr/bin\
199: /bsd4.3/bin\
200: /bsd4.3/usr/ucb\
201: /bsd4.3/usr/bin\
202: /usr/bsd\
203: /bsd43/bin\
204: /opt/ansic/bin\
205: /usr/ccs/bin\
206: /usr/lib\
207: /usr/ucblib\
208: /lib\
209: /usr/ccs/lib\
210: /sbin\
211: /usr/sbin\
212: /usr/libexec\
213: /usr/openwin/bin\
214: /usr/local/bin\
215: "
216: # /usr/openwin/bin added for xmkmf
217:
218: for p in $pth
219: do
220: case "$dir_sep$PATH$dir_sep" in
221: *$dir_sep$p$dir_sep*) ;;
222: *) test -d $p && PATH=$PATH$dir_sep$p ;;
223: esac
224: done
225: PATH=.$dir_sep$PATH; export PATH
226:
227: echo "Checking echo to see how to suppress newlines..."
228:
229: if (echo "hi\c"; echo " ") | grep c >/dev/null 2>&1 ; then
230: echo "...using -n."; n=-n; c=
231: else
232: cat <<EOM
233: ...using \c
234: EOM
235: n=; c='\c'
236: fi
237: if test "$fastread" != yes; then
238: echo $n ..."The star should be here-->$c"; echo '*'
239: fi
240:
241: #
242: # We might need the following :
243: #
244: echo Looking for some tools first ...
245: list='ld zcat gzip ranlib perl emacs'
246: pathspace=`echo $PATH | sed -e "s/$dir_sep/ /g" | sed -e 's,\\\\,/,g'`
247:
248: for file in $list; do
249: x=`./locate $file '' $pathspace`
250: eval $file=$x
251: case $x in
252: # support also DOS filesystems (hard drive prepended)
253: ?:/*|/*) echo ..."$file is $x";;
254: *) echo ..."I could not find $file." >&2;;
255: esac
256: done
257: if test -z "$zcat" -a -n "$gzip"; then zcat="$gzip -dc"; fi
258:
259: ####################### CONFIGURE - ARCHITECTURE ############################
260: #
261: # Testing Architectures. Try uname to provide a default, then ask user.
262: #
263: if test -z "$target_host"; then
264: target_host=`./arch-osname`
265: fi
266: arch=`echo "$target_host" | sed -e 's/\(.*\)-.*/\1/'`
267: osname=`echo "$target_host" | sed -e 's/.*-\(.*\)/\1/'`
268:
269: if test "$fastread" != yes; then
270: cat << EOM
271: ==========================================================================
272: Currently supported architectures:
273: EOM
274: rep='none sparcv7 sparcv8_super sparcv8_micro sparcv9
275: m68k ix86 i386 i486 i586 i686 hppa alpha mips fx2800'
276: . ./display
277: echo $n ..."Which of these apply, if any ? $c"
278: dflt=$arch; . ./myread; arch=$ans
279: fi
280:
281: #
282: # Test OS, using the info uname provided.
283: #
284: if test "$fastread" != yes; then
285: cat << EOM
286: ==========================================================================
287: I know of the following Operating Systems
288: EOM
289: rep='os2 freebsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix';
290: . ./display
291: echo $n ..."Any of these apply ? $c"
292: dflt=$osname; . ./myread
293: osname=$ans
294: fi
295:
296: #
297: # A pretty name for the architecture
298: # The asm file used (if any)
299: #
300: case "$arch" in
301: sparc) asmarch=sparcv8_micro; pretty=Sparc ;;
302: sparcv7) asmarch=$arch; pretty=SparcV7 ;;
303: sparcv8_micro) asmarch=$arch; pretty=MicroSparc ;;
304: sparcv8_super) asmarch=$arch; pretty=SuperSparc ;;
305: sparcv9) asmarch=sparcv8_micro; pretty=UltraSparc ;;
306: m68k) asmarch=$arch; pretty="MC680x0, x>=2" ;;
307: i?86) asmarch=ix86 ; pretty=$arch ;;
308: hppa) asmarch=none ; pretty=HP
309: case "$osname-`uname -r`" in
310: hpux-?.09.*) asmarch=none ;;
311: hpux-?.10.*) asmarch=$arch ;;
312: esac ;;
313: alpha) asmarch=$arch; pretty=Alpha ;;
314: mips) asmarch=none; pretty=Mips ;;
315: fx2800) asmarch=none; pretty="Alliant FX/2800" ;;
316: none) asmarch=none; pretty="unknown" ;;
317: *) asmarch=none; pretty=$arch
318: echo " Warning ! architecture $arch not tested";;
319: esac
320:
321: #
322: # Modifications for pretty name and asm file
323: #
324: case "$osname" in
325: cygwin*|linux|freebsd|os2) pretty="$pretty running $osname";;
326: nextstep) pretty="$pretty running $osname";
327: if test "$arch" = m68k; then asmarch=none; fi ;;
328: esac
329:
330: if test "$kernel" = no; then
331: asmarch=none;
332: echo "assembler micro kernel disabled"
333: else
334: if test "$fastread" != yes; then
335: cat << EOM
336: ==========================================================================
337: An optimized Pari kernel is available for these architectures
338: ("none" means that we will use the portable C version of GP/PARI)
339: EOM
340: rep='none sparcv7 sparcv8_super sparcv8_micro m68k ix86 alpha hppa'
341: . ./display
342: echo $n ..."Which of these apply, if any ? $c"
343: dflt=$asmarch; . ./myread; asmarch=$ans
344: cat << EOM
345: ==========================================================================
346: EOM
347: fi
348: fi
349: case "$asmarch" in
350: none) prettyk="C portable";;
351: sparcv7) prettyk=SparcV7;;
352: sparcv8_super) prettyk=SuperSparc;;
353: sparcv8_micro) prettyk=MicroSparc;;
354: m68k) prettyk="MC680x0, x>=2";;
355: ix86) prettyk=ix86;;
356: hppa) prettyk=HPPA;;
357: alpha) prettyk=Alpha;;
358: ppc) prettyk=PPC;;
359: *) prettyk="$asmarch";;
360: esac
361: # 'i386 (running ix86 kernel)' looks ugly
362: if test "$arch" != "$asmarch" -a \( "$arch" != "i386" -o "$asmarch" != "ix86" \)
363: then
364: pretty="$pretty ($prettyk kernel)"
365: fi
366: echo "Building for architecture: $pretty"
367:
368: #
369: # Which copy, SHELL ?
370: #
371: case "$osname-$arch" in
372: os2-*) ln_s=cp; make_sh=sh; exe_suff=.exe; extraflag="-Zexe" ;;
373: cygwin*) ln_s="ln -s"; make_sh="/bin/sh"; exe_suff=.exe; extraflag="" ;;
374: *) ln_s="ln -s"; make_sh="/bin/sh"; exe_suff=; extraflag="" ;;
375: esac
376:
377: ####################### CONFIGURE - LIBRARIES ###############################
378: #
379: # Looking for libraries now
380: #
381: case "$osname" in
382: cygwin*) ver=`uname -r | cut -d. -f1`
383: cygtop=/cygdrive/c
384: if test ! -d $cygtop; then
385: cygtop=/Cygnus/cygwin/B$ver
386: if test ! -d $cygtop; then
387: cygtop=/Cygnus/cygwin-B$ver
388: if test ! -d $cygtop; then
389: cygtop=/usr/${arch}-pc-cygwin
390: if test ! -d $cygtop; then
391: echo ..."I could not find Cygwin top directory" >&2
392: fi
393: fi
394: fi
395: fi;;
396: esac
397: readline_enabledp="nil"
398: if test "$optimization" != profiling; then
399: # First, construct the PATHs
400: case "$osname" in
401: cygwin*) if test "$cygtop" = /cygdrive/c; then
402: # cygnus for version 1.*
403: libpth="
404: /usr/local/lib\
405: /lib\
406: "
407: cygtop=/
408: else
409: # cygnus for version 0.*
410: libpth="
411: $cygtop/H-${arch}-cygwin32/lib\
412: $cygtop/H-${arch}-cygwin32/${arch}-cygwin32/lib\
413: "
414: fi;;
415: os2) libpth=`echo $LIBRARY_PATH | sed 's/;/ /g' | sed 's,\\\\,/,g'`;;
416: *) libpth="\
417: /usr/local/lib\
418: /lib\
419: /usr/lib\
420: /opt/lib\
421: /opt/local/lib\
422: /opt/gnu/lib\
423: /lib/pa1.1\
424: /usr/lib/large\
425: /lib/large\
426: /usr/lib/small\
427: /lib/small\
428: /usr/ccs/lib\
429: /usc/ucblib\
430: /usr/shlib\
431: .\
432: ";;
433: esac
434:
435: if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
436: eval `make gp-X11 2> /dev/null | grep -v make`
437: rm -f Makefile Makefile.bak
438: x11pth="$usrlibdir $libdir";
439: fi
440:
441: # We want these libraries:
442: #
443: echo Checking for optional libraries and headers...
444: # LIB: X11
445: pth=$x11pth
446: lib=X11; . ./locatelib
447: if test -f $Xincroot/X11/Xos.h -a -z "$graph_cmd"; then
448: which_graphic_lib=X11
449: test -n "$extralib" && echo ..."Extra Libraries are $extralib"
450: echo ..."Found X11 header files in $Xincroot/X11"
451: fi
452:
453: pth=$libpth
454: # LIB: gnuplot
455: opth="$pth"
456: pth="$TOP/gnuplot-$osname-$arch $TOP/gnuplot $TOP/../gnuplot-$osname-$arch $TOP/../gnuplot $TOP/../../gnuplot-$osname-$arch $TOP/../../gnuplot $pth"
457: gpth="$pth"
458: lib=gnuplot; . ./locatelib
459: gnuplot_fullpath="$try"
460: pth="$opth"
461: gnuplot_libs=
462: case $gnuplot in
463: /*|[c-z]:/*)
464: addgnuplot=gnuplot
465: for lib in vga vesa jmgraph linuxvga gd png z
466: do
467: . ./locatelib
468: eval "elib=\$$lib"
469: case $elib in
470: /*|[c-z]:/*) gnuplot_libs="$gnuplot_libs -l$lib";;
471: esac
472: done
473: if test "$which_graphic_lib" = gnuplot; then
474: if test -z "$gnuplot_libs"; then
475: echo "...I expect that no libraries are needed for gnuplot"
476: else
477: echo "...I expect that libraries $gnuplot_libs are needed for gnuplot"
478: fi
479: fi
480: ;;
481: *)
482: if test "$which_graphic_lib" = gnuplot; then
483: echo "###"
484: echo "### Could not find gnuplot library in:"
485: echo "### ./gnuplot-$osname-$arch ./gnuplot"
486: echo "### ../gnuplot-$osname-$arch ../gnuplot"
487: echo "### ../../gnuplot-$osname-$arch ../../gnuplot"
488: echo "### $pth"
489: echo "###"
490: case "$osname" in
491: os2) tlib=gnuplot.a ;;
492: *) tlib=libgnuplot.a ;;
493: esac
494: echo "### You may need to execute"
495: echo "### ar cr $tlib version.o util.o term.o bitmap.o stdfn.o"
496: echo "### In the build directory of gnuplot-3.7, and move"
497: echo "### $tlib to ./gnuplot-$osname-$arch or ./gnuplot subdirs"
498: echo "### or to similarly-named directories up the directory tree."
499: echo "###"
500: fi
501: ;;
502: esac
503:
504: # LIB: GNU ReadLine
505: readline_add="$GP_READLINE $TOP/readline-$osname-$arch $TOP/readline"
506: pth="$readline_add $pth"
507: lib=readline; . ./locatelib
508: rl_fullname=$try
509:
510: if test -n "$readline"; then
511: # Readline -- TermCap
512: lib=$rl_fullname; sym=tgetent; . ./locatesymbol
513: if test -n "$try"; then # tgetent needed
514: lib=ncurses; . ./locatelib
515: if test -n "$try"; then # ncurses found. Does it contain tgetent ?
516: lib=$try; . ./locatesymbol
517: fi
518: if test -n "$try"; then
519: rl_ncurses=$ncurses
520: else
521: lib=termcap; . ./locatelib
522: rl_termcap=$termcap
523: fi
524: fi
525: # Readline -- Allocation
526: lib=$rl_fullname; sym=alloca; . ./locatesymbol
527: if test -n "$try"; then # alloca needed
528: lib=iberty; . ./locatelib
529: rl_liberty="$try"
530: fi
531: # Readline -- Headers
532: case "$osname" in
533: os2) incpth=`echo $C_INCLUDE_PATH | sed -e 's/\([^;]\)$/\1;/g' -e 's%;%/readline %g' -e 's,\\\\,/,g'` ;;
534: cygwin*) incpth="\
535: $cygtop/usr/local/include/readline\
536: $cygtop/usr/local/include\
537: $cygtop/usr/include/readline\
538: $cygtop/usr/include\
539: $cygtop/H-${arch}-cygwin32/${arch}-cygwin32/include\
540: ";;
541: *) incpth="\
542: /usr/local/include/readline\
543: /usr/include/readline\
544: /opt/include/readline\
545: /opt/local/include/readline\
546: /opt/gnu/include/readline\
547: /usr/unsupported/include/readline\
548: /usr/local/include\
549: /usr/include\
550: /opt/include\
551: /opt/local/include\
552: /opt/gnu/include\
553: ";;
554: esac
555: pth="$readline_add $incpth"
556: x=`./locate 'readline.h' '' $pth`
557: CPPF_defined=
558: case $x in
559: ?:/*|/*) rl_include=`echo $x | sed 's,/readline.h,,'`
560: if (grep CPPFunction $x > /dev/null 2>&1); then CPPF_defined=yes; fi
561: if (grep rl_message $x > /dev/null 2>&1); then rl_message=yes; fi
562: if (grep rl_completion_matches $x > /dev/null 2>&1); then
563: rl_completion_matches=yes;
564: fi
565: if (grep rl_completion_func_t $x > /dev/null 2>&1); then
566: rl_completion_func_t=yes;
567: fi
568: if (grep "rl_refresh_line *()" $x > /dev/null 2>&1); then
569: rl_refresh_line_oldproto=yes
570: fi
571: if (grep rl_completion_append_character $x > /dev/null 2>&1); then
572: rl_appendchar=yes
573: fi
574: if (grep rl_generic_bind $x > /dev/null 2>&1); then
575: rl_genericbind=yes
576: fi
577: if (grep rl_save_prompt $x > /dev/null 2>&1); then
578: rl_save_prompt=yes;
579: else
580: lib=$rl_fullname; sym=rl_save_prompt; . ./locatesymbol
581: _rl_save_prompt=$try
582: fi;;
583: *) echo ..."But no header file has been found"
584: readline=;;
585: esac
586: fi
587:
588: if test -n "$readline"; then
589: echo ..."Found GNU readline header in $rl_include"
590: if (echo $rl_include | grep "readline$" > /dev/null); then
591: rl_include=`echo $rl_include | sed 's,/readline$,,'`
592: RLINCLUDE="-I$rl_include"
593: else
594: # in case headers are not installed correctly
595: RLINCLUDE="-I$rl_include -DREADLINE_LIBRARY"
596: fi
597: RLLIBS="-L$readline -lreadline"
598: if test -n "$rl_ncurses"; then
599: echo ..."Library ncurses needed by readline"
600: RLLIBS="$RLLIBS -lncurses"
601: fi
602: if test -n "$rl_termcap"; then
603: echo ..."Library termcap needed by readline"
604: RLLIBS="$RLLIBS -ltermcap"
605: fi
606: if test -n "$rl_liberty"; then
607: echo ..."Library liberty needed by readline"
608: RLLIBS="$RLLIBS -liberty"
609: fi
610: if test -z "$rl_appendchar"; then
611: echo ..."Library readline does not have completion_append_char"
612: fi
613: if test -z "$rl_genericbind"; then
614: echo ..."Library readline does not have rl_generic_bind"
615: fi
616: if test -z "$rl_save_prompt"; then
617: echo ..."Library readline does not have rl_save_prompt"
618: if test -n "$_rl_save_prompt"; then
619: echo ......"but it has _rl_save_prompt"
620: fi
621: fi
622:
623: if test "$fastread" != yes; then
624: cat << EOM
625: ==========================================================================
626: EOM
627: echo $n "Do you want to use GNU readline library within GP ? $c"
628: rep='y n'; dflt=y; . ./myread
629: case $ans in
630: n) readline=;;
631: esac
632: fi
633: fi
634:
635: if test -n "$readline"; then readline_enabledp="t"; fi
636:
637: # Graphic libs now.
638: #
639: if test "$fastread" != yes; then
640: if test -n "$X11"; then addX11=X11; fi
641: cat << EOT
642: ==========================================================================
643: GP contains high resolution plotting functions. Choose among
644: none $addX11 $addgnuplot
645: EOT
646: echo $n ..."Use which graphic library (\"none\" means no hi-res plot) ? $c"
647: rep="none $addX11 $addgnuplot";
648: dflt=$which_graphic_lib; . ./myread
649: which_graphic_lib=$ans
650:
651: case "$which_graphic_lib" in
652: X11)
653: gnuplot=;
654: # If xmkmf did not give the right answer
655: # X11 -- Headers
656: if test ! -f $Xincroot/X11/Xos.h; then
657: x11pth="\
658: /usr/openwin/share/lib\
659: /usr/openwin/lib\
660: /usr/X11R6/lib\
661: /usr/X11R5/lib\
662: /usr/X11R4/lib\
663: /usr/lib/X11R6\
664: /usr/lib/X11R5\
665: /usr/lib/X11R4\
666: /usr/local/X11R6/lib\
667: /usr/local/X11R5/lib\
668: /usr/local/X11R4/lib\
669: /usr/local/lib/X11R6\
670: /usr/local/lib/X11R5\
671: /usr/local/lib/X11R4\
672: /usr/X11/lib\
673: /usr/lib/X11\
674: /usr/local/X11/lib\
675: /usr/local/lib/X11\
676: /usr/X386/lib\
677: /usr/x386/lib\
678: /usr/XFree86/lib/X11\
679: /usr/lib\
680: /usr/local/lib\
681: /usr/unsupported/lib\
682: /usr/athena/lib\
683: /usr/local/x11r5/lib\
684: /usr/lpp/Xamples/lib\
685: ";
686: pth=`echo $x11pth | s,/lib,/include,g`
687: x=`./locate X11/Xos.h '' $pth`
688: case $x in
689: /*) Xincroot=`echo $x | sed 's,/X11/Xos.h,,'`;;
690: *) Xincroot=;;
691: esac
692: if test -n "$Xincroot"; then
693: echo ..."Found X11 header files in $Xincroot/X11"
694: fi
695: fi
696: # X11 -- Lib
697: if test -f $Xincroot/X11/Xos.h -a -z "$X11"; then
698: pth=$x11pth;
699: lib=X11; . ./locatelib
700: fi ;;
701: gnuplot);;
702: *)gnuplot=;;
703: esac
704: else # fastread = yes
705: if test "$which_graphic_lib" = none -a -z "$graph_cmd" -a -n "$gnuplot"; then
706: which_graphic_lib=gnuplot
707: fi
708: if test -z "$X11" -a -z "$gnuplot" -a -z "$readline"; then
709: echo ...none
710: fi
711: fi
712: fi
713:
714: ####################### CONFIGURE - COMPILATION #############################
715: #
716: # Which optimization ?
717: #
718: if test "$fastread" != yes; then
719: cat << EOT
720: ==========================================================================
721: The default is to fully optimize the compilation. You may choose to build
722: an executable for debugging or profiling instead. Choose among :
723: full debugging profiling
724: EOT
725: echo $n ..."Which optimization do you prefer ? $c"
726: dflt=$optimization; rep='full debugging profiling'; . ./myread
727: optimization=$ans
728: fi
729:
730: #
731: # Which Compiler ?
732: #
733: if test -z "$CC"; then
734: echo Looking for the compilers ...
735: # Native Compilers
736: cc=`./locate cc '' $pathspace`
737: case "$osname" in
738: hpux) if test "$cc" = /usr/ccs/bin/cc -a -f /opt/ansic/bin/cc; then
739: cc=/opt/ansic/bin/cc; fi ;; # This is a better compiler
740: esac
741: case "$cc" in ?:/*|/*) echo ..."cc is $cc";;
742: *) echo ..."I could not find cc.";; esac
743: # GNU Compilers
744: gcc=`./locate gcc '' $pathspace`
745: if test -z "$gcc"; then
746: exe=$osname-$arch-gnu$$
747: $cc $extraflag -o $exe gnu.c
748: if $exe; then gcc=$cc; fi; rm -f $exe
749: fi
750: case "$gcc" in
751: ?:/*|/*) echo ..."gcc is $gcc";;
752: *) echo ..."I could not find gcc."; gcc=;;
753: esac
754: if test -n "$gcc"; then
755: __gnuc__=`$gcc -v 2>&1 | sed -n 's/.*version //p'`
756: if test -z "$__gnuc__"; then __gnuc__=unknown; fi
757: echo GNU compiler version $__gnuc__
758: fi
759: case "$osname" in
760: aix) __gnuc__=;; # Native compilers are faster
761: hpux) __gnuc__=;; # versions older than 2.7 cannot build PIC code
762: # gp built with recent versions has bugs
763: concentrix) case "$__gnuc__" in 2.[78].*);; *)
764: __gnuc__=;; esac;;
765: esac
766: # Choosing the compiler
767: if test -n "$__gnuc__"; then CC=$gcc; else CC=$cc; fi
768: fi
769:
770: if test "$which_graphic_lib" = gnuplot -a -z "$gcc"; then
771: lib=$gnuplot_fullpath; sym=_eprintf; . ./locatesymbol
772: if test -n "$try"; then
773: echo "...Looks like gcc-compiled gnuplot. I add -lgcc to graphic libraries"
774: _ogcc="$gcc"
775: opth="$pth"
776: pth="$pth /opt/local/gnu/lib /usr/local/gnu/lib"
777: gcclibspec="`gcc -v 2>&1 | grep specs | sed 's/.*specs from //'`"
778: if test -n "$gcclibspec"; then
779: pth="`dirname $gcclibspec` $pth"
780: fi
781: lib=gcc; . ./locatelib
782: if test -n "$gcc"; then
783: gnuplot_libs="$gnuplot_libs -L$gcc"
784: else
785: echo "...### I did not find -lgcc library in $pth."
786: echo "...### You may need to manually add something like -L/opt/gnu/lib to the "
787: echo "...### PLOTLIBS = ..."
788: echo "...### line in your architecture-Makefile."
789: fi
790: pth="$opth"
791: gcc="$_ogcc"
792: gnuplot_libs="$gnuplot_libs -lgcc"
793: fi
794: fi
795:
796:
797: if test "$fastread" != yes; then
798: cat << EOT
799: ==========================================================================
800: Only ANSI C and C++ compilers are supported. Choosing the GNU compiler
801: gcc/g++ enables the inlining of kernel routines (about 20% speedup; if you
802: use a recent g++, it is a good idea to include the -fpermissive flag).
803: If you choose not to use gcc, the C++ version of Pari will be a little
804: faster because of general inlining, but can be used in library mode only
805: with C++ programs (we **really** recommand using gcc all the way through).
806: EOT
807: echo $n ..."Which C compiler shall I use ? $c"
808: dflt=$CC; rep=; . ./myread
809: CC=$ans
810: fi
811:
812: #
813: # Which Flags for Compiler ?
814: #
815: if test "$CC" != "$gcc"; then __gnuc__=; fi
816: if test -z "$__gnuc__"; then
817: exe=$osname-$arch-gnu$$
818: $CC $extraflag -o $exe gnu.c
819: if $exe; then __gnuc__=yes; fi
820: rm -f $exe
821: fi
822:
823: if test -n "$__gnuc__"; then
824: __GNUC__="-D__GNUC__"
825: warn="-Wall -Wno-implicit"
826: OPTFLAGS="-O3 -DGCC_INLINE $warn"
827: DBGFLAGS="-g $warn"
828: # Some architectures need -fPIC for building dynamic lib
829: case "$osname-$arch" in hpux-*) DLCFLAGS=-fPIC;; esac
830: # Specific optimisations for some architectures
831: case "$osname-$arch" in
832: linux-i?86|cygwin*) OPTFLAGS="$OPTFLAGS \
833: -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
834: os2-*) cflags=-Zmt;;
835: *-sparcv8*) cflags=-mv8;;
836: esac
837: # omit-frame-pointer incompatible with -pg
838: PRFFLAGS="-pg $OPTFLAGS"
839: case "$optimization" in
840: full) OPTFLAGS="$OPTFLAGS -fomit-frame-pointer";;
841: esac
842: else
843: cflags=
844: DBGFLAGS="-g"
845: PRFFLAGS="-pg"
846: case "$osname-$arch" in
847: hpux-*) # -Aa is for ANSI C, +z for PIC code (for commercial HPUX compilers)
848: OPTFLAGS=-O; cflags=-Aa; DLCFLAGS=+z;;
849: # best tuning option, even for PPC604:
850: aix-*) OPTFLAGS=-O2; cflags='-qlanglvl=ansi -qtune=601';;
851: cygwin*|linux-i?86|freebsd-i?86)
852: OPTFLAGS=-O2; cflags=-m486;;
853: osf1-*) OPTFLAGS='-O4 -migrate -ifo -Olimit 9999';;
854: sunos-*) OPTFLAGS=-fast; PRFFLAGS='-pg -Bstatic';;
855: solaris-*) OPTFLAGS=-fast; PRFFLAGS=-xpg;;
856: concentrix-*) OPTFLAGS=-Ogi;;
857: *) OPTFLAGS=-O;;
858: esac
859: PRFFLAGS="$PRFFLAGS $OPTFLAGS"
860: fi
861: cflags="$cflags $DLCFLAGS"
862:
863: case "$osname" in
864: nextstep) cflags="-traditional-cpp $cflags";;
865: esac
866:
867: case "$optimization" in
868: full) suffix=; cflags="$OPTFLAGS $cflags";;
869: profiling) suffix=.prf; cflags="$PRFFLAGS $cflags";;
870: debugging) suffix=.dbg; cflags="-DMEMSTEP=1048576 $DBGFLAGS $cflags";;
871: esac
872:
873: if test "$fastread" != yes; then
874: echo $n ..."With which flags ? $c"
875: dflt=${CFLAGS:-cflags}; rep=; . ./myread
876: cflags=$ans
877: fi
878:
879: # Here we should check it is an ANSI compiler...
880: echo "C compiler is $CC $cflags"
881:
882: #
883: # Which Assembler ?
884: #
885: if test -z "$AS"; then
886: echo Looking for an assembler ...
887: if test "$osname" = hpux
888: then AS=`./locate as '' /usr/ccs/bin /bin` # We don't want GNU as
889: else AS=`./locate as '' $pathspace`
890: fi
891: case "$AS" in ?:/*|/*) echo ..."as is $AS";;
892: *) echo ..."I could not find as." ;; esac
893: fi
894: gnuas=no
895: if (echo | $AS --version 2>&1 | grep GNU > /dev/null); then
896: gnuas=yes
897: else
898: if (echo | $AS -v 2>&1 | grep GNU > /dev/null); then
899: gnuas=yes
900: fi
901: fi
902: if test "$gnuas" = yes; then
903: echo "...Hum, this looks like GNU as"
904: case "$osname-$asmarch" in
905: solaris-sparc*) KERNELCPPFLAGS="-DNO_UNDERSCORE $__GNUC__";;
906: esac
907: else
908: case "$osname-$asmarch" in
909: osf1-alpha) ASFLAGS="-O1";;
910: sunos-sparc*) ASFLAGS="-P -I. $__GNUC__";;
911: solaris-sparc*) ASFLAGS="-P -I. $__GNUC__ -T";;
912: hpux-hppa) ASFLAGS="+DA1.1";;
913: *) ASFLAGS=;;
914: esac
915: fi
916: echo "Assembler is $AS $ASFLAGS"
917:
918: #
919: # Which C PreProcessor ?
920: #
921: case "$osname" in
922: nextstep) cppfl="-traditional-cpp" ;;
923: freebsd)
924: if test $PORTOBJFORMAT = "elf"; then
925: cppfl="-DUSE_ELF"
926: FREEBSD_ELF=1
927: else
928: FREEBSD_ELF=0
929: fi ;;
930: esac
931: CPP="$CC $cppfl -E -I."
932:
933: echo "C PreProcessor is $CPP"
934:
935: #
936: # Which Executable Linker ?
937: #
938: LIBS=-lm
939: case "$osname" in
940: darwin) LIBS= ;;
941: esac
942: case "$osname-$arch" in
943: linux-*|cygwin*)
944: LD=$CC; LDFLAGS="$cflags -Xlinker -export-dynamic"
945: runpathprefix='-Xlinker -rpath -Xlinker ';;
946: osf1-alpha)
947: LD=$ld; LIBS="$LIBS -lots -lc"; runpathprefix='-rpath '
948: LDFLAGS='-std0 -call_shared /usr/lib/cmplrs/cc/crt0.o'
949: case "$optimization" in
950: full|profiling) LDFLAGS="-g0 -O4 $LDFLAGS";;
951: esac;;
952: solaris-*) LD=$CC; LDFLAGS=$cflags; runpathprefix=-R ;;
953: os2-*) LD=$CC; LDFLAGS="$cflags -Zexe"
954: case "$optimization" in
955: full) LDFLAGS="$LDFLAGS -s";;
956: esac;;
957: *) LD=$CC; LDFLAGS=$cflags ;;
958: esac
959:
960: if test "$fastread" != yes; then
961: echo $n ..."Which linker for building executables ? $c"
962: dflt=$LD; rep=; . ./myread
963: LD=$ans
964: fi
965:
966: #
967: # Which Flags for Executable Linker?
968: #
969: if test "$fastread" != yes; then
970: echo $n ..."With which flags ? $c"
971: dflt=$LDFLAGS; rep=; . ./myread
972: LDFLAGS=$ans
973: fi
974:
975: echo "Executable linker is $LD $LDFLAGS"
976:
977: if test "$optimization" = profiling; then DLLD=; else
978: DLLD=${DLLD-ld}
979: DLSUFFIX=so
980: # Which suffix for Dynamic Lib?
981: # Some linkers (SunOS 4) need minor and major lib version numbers.
982: # Some others (SunOS 5) need a link from a .so
983: # Some others (HPUX 09) do not want version numbers.
984: #
985: soname=$soname_num
986: case "$osname-$arch" in
987: # aix-*) DLSUFFIX=a ;; dynamic linking does not work!
988: sunos-*) sodest=$VersionMajor$VersionMinor.$patch
989: soname=$sodest;;
990: *-alpha|solaris-*|linux-*|freebsd-*)
991: case $libpari_base in
992: pari) sodest=$version.$patch;; # released versions
993: *) sodest=$patch.0.0;; # unstable versions
994: esac ;;
995: cygwin*) soname= ; sodest= ; DLSUFFIX=dll;;
996: hpux-*) soname= ; sodest= ; DLSUFFIX=sl;;
997: irix-*) soname= ; sodest= ;;
998: *) DLLD=;;
999: esac
1000: fi
1001:
1002: if test -n "$DLLD"; then
1003: # Which Dynamic Lib Linker?
1004: #
1005: if test $DLLD = ld -a -n "$ld"; then
1006: DLLD=$ld;
1007: fi
1008: if test "$fastread" != yes; then
1009: echo $n ..."Which linker for building dynamic libs? $c"
1010: dflt=$DLLD; rep=; . ./myread
1011: DLLD=$ans
1012: fi
1013:
1014: # Which Flags for Dynamic Lib Linker ?
1015: #
1016: if ($DLLD -v 2>&1 | grep GNU > /dev/null); then
1017: echo "...Hum, this looks like GNU ld"
1018: DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)"
1019: else
1020: # not GNU ld
1021: case "$osname-$arch" in
1022: aix-*) DLLDFLAGS="-r" ;;
1023: hpux-*) DLLDFLAGS="-b -E" ;;
1024: freebsd-*) DLLDFLAGS="-Bshareable -x" ;;
1025: linux-*) DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
1026: irix-*) DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
1027: *-alpha) DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
1028: case "$optimization" in
1029: full) DLLDFLAGS="$DLLDFLAGS -O3" ;;
1030: esac;;
1031: sunos-*) DLLDFLAGS="-assert nodefinitions" ;;
1032: solaris-*) DLLDFLAGS="-G -h \$(LIBPARI_SONAME)" ;;
1033: *) DLLD=;;
1034: esac
1035: fi
1036:
1037: if test "$fastread" != yes; then
1038: echo $n ..."Which flags for linker? $c"
1039: dflt=$DLLDFLAGS; rep=; . ./myread
1040: DLLDFLAGS=$ans
1041: fi
1042: fi
1043:
1044: if test -z "$DLLD"; then
1045: echo "No Dynamic Lib"
1046: static=y
1047: else
1048: echo "Dynamic Lib linker is $DLLD $DLLDFLAGS"
1049: static=${static-n}
1050: fi
1051:
1052: if test "$fastread" != yes; then
1053: cat << EOT
1054: ==========================================================================
1055: Should you change your mind, you only need to modify the lines
1056: CC="$CC"
1057: CFLAGS="$cflags"
1058: LD="$LD"
1059: LDFLAGS="$LDFLAGS"
1060: DLLD="$DLLD"
1061: DLLDFLAGS="$DLLDFLAGS"
1062: in the Makefile
1063: ==========================================================================
1064: EOT
1065: fi
1066:
1067: ####################### CONFIGURE - READLINE VERSION ########################
1068: if test -n "$readline"; then
1069: exe=$osname-$arch-rlv$$
1070: $CC $extraflag $RLINCLUDE -o $exe rl_version.c $RLLIBS 2>/dev/null
1071: if test -r $exe; then readline=`$exe`; else readline=1.0; fi
1072: rm -f $exe $exe$exe_suff
1073: fi
1074:
1075: ####################### CONFIGURE - LIBC ####################################
1076: #
1077: # Long integer ?
1078: #
1079: endian=4321;
1080: exe=$osname-$arch-endian$$
1081: if ($CC $extraflag endian.c -o $exe 2>/dev/null); then
1082: endian=`$exe`;
1083: fi
1084: rm -f $exe $exe$exe_suff
1085:
1086: if test "$fastread" != yes; then
1087: cat << EOT
1088: Determining sizeof(long) and endianness. If your hardware supports different
1089: size of longs (e.g SGI/MIPS), you can decide to use a particular word size
1090: by specifying endianness (e.g answer 4321 instead of the proposed 87654321).
1091: You'll probably have to specify some exotic compilation flag (e.g -o32,-n32)
1092: ============================================================================
1093: EOT
1094: echo $n "What is the internal byte representation of long integer ? $c"
1095: dflt=$endian; rep='12345678 87654321 1234 4321'; . ./myread
1096: endian=$ans
1097: fi
1098: echo "The internal byte representation of your long integers is $endian."
1099:
1100: case $endian in
1101: *8|8*) sizeof_long=8; pretty="$pretty 64-bit version";;
1102: *) sizeof_long=4; pretty="$pretty 32-bit version";;
1103: esac
1104:
1105:
1106: #
1107: # Looking in C lib for some functions.
1108: #
1109: exe=$osname-$arch-tmp$$
1110: echo Checking some common types...
1111: list=ulong; . ./look
1112: echo Looking in C lib for some symbols...
1113: extra_flags=
1114: list=exp2; . ./look
1115: list=strftime; . ./look
1116: case "$arch" in
1117: alpha) list='times ftime';; # gp-dyn has problems with getrusage
1118: *) case "$osname" in
1119: *cygwin*) list='times ftime';; # getrusage based timer always returns 0
1120: *) list='getrusage times ftime';;
1121: esac;;
1122: esac; . ./look
1123: list='sigrelse sigsetmask'; . ./look
1124: list=TIOCGWINSZ; . ./look
1125: list=getrlimit; . ./look
1126: list=opendir; . ./look
1127:
1128: # For install(). Do we need libdl.so?
1129: # on irix and osf1 -ldl not needed
1130: extra_flags=
1131: list=dlopen; . ./look
1132: if test "$has_dlopen" = no; then
1133: echo "Try again, with -ldl this time..."
1134: extra_flags=-ldl; . ./look
1135: if test "$has_dlopen" = yes; then
1136: LIBS="-ldl $LIBS"
1137: fi
1138: fi
1139:
1140: ####################### CONFIGURE - MAKE ####################################
1141: dflt=$prefix; rep=
1142: test "$fastread" = yes || cat <<EOT
1143: ==========================================================================
1144: By default, gp will be installed in $dflt/bin, manual pages under
1145: $dflt/man, etc..., with $dflt as prefix for all installation directories.
1146: If you wish to have binaries under /bin but manual pages under
1147: /usr/local/man, that's ok: you will be prompted separately for each of the
1148: installation directories, the prefix being only used to set the defaults.
1149: (You will be prompted before the actual installation is done.)
1150: The names of executables and libraries contain their version number $version.
1151: A symbolic link to gp or libpari.[a/so] will point to the most recent
1152: installation of GP/PARI.
1153: EOT
1154: echo $n "Installation prefix ? $c"
1155: . ./myread; prefix=$ans
1156:
1157: echo $n "...for architecture-independant files (share-prefix) ? $c"
1158: dflt=$share_prefix; . ./myread; share_prefix=$ans
1159:
1160: if test -z "$share_prefix"; then
1161: dfltman=$prefix/man/man1
1162: dfltall=$prefix/lib/pari
1163: else
1164: dfltman=$share_prefix/man/man1
1165: dfltall=$share_prefix/doc/pari
1166: fi
1167:
1168: echo $n ..."\"gp\" executable ? $c"
1169: dflt=${dfltbindir:-$prefix/bin}; . ./myread; bindir=$ans
1170:
1171: echo $n ..."\"pari\" library ? $c"
1172: dflt=${dfltlibdir:-$prefix/lib}; . ./myread; libdir=$ans
1173:
1174: echo $n ..."include files ? $c"
1175: dflt=${dlftincludedir:-$prefix/include/pari}; . ./myread; includedir=$ans
1176:
1177: echo $n ..."manual pages ? $c"
1178: dflt=${dfltmandir:-$dfltman}; . ./myread; mandir=$ans
1179:
1180: echo $n ..."documentation, examples, and emacs macros ? $c"
1181: dflt=${dfltmiscdir:-$dfltall}; . ./myread; miscdir=$ans
1182:
1183: if test -z "$share_prefix"; then
1184: dfltdat=$miscdir/galdata
1185: else
1186: dfltdat=$share_prefix/pari/galdata
1187: fi
1188:
1189: echo $n ..."miscellaneous data (galois resolvents) ? $c"
1190: dflt=${dfltdatadir:-$dfltdat}; . ./myread; datadir=$ans
1191:
1192: if test "$optimization" = debugging; then static=y; fi
1193: if test "$fastread" != yes; then
1194: if test -z "$DLLD"; then
1195: cat <<EOT
1196: ==========================================================================
1197: We cannot build a dynamic executable. We will build the static version.
1198: EOT
1199: else
1200: cat <<EOT
1201: ==========================================================================
1202: By default, we will try to build the shared library and gp will be an
1203: executable dynamically linked with it. Do you prefer to have the static
1204: archive libpari.a and a statically linked executable (which is a bit
1205: faster, but takes more disk place) ?
1206: You can always type "make all" in case you want both later.
1207: EOT
1208: echo $n "Do you want static executable and library ? $c"
1209: dflt=$static; rep='y n'; . ./myread; static=$ans
1210: fi
1211: fi
1212: case "$static" in
1213: y) echo "Default is static executable and archive library, graphic=$which_graphic_lib" ;;
1214: n) echo "Default is dynamic executable and shared library, graphic=$which_graphic_lib" ;;
1215: esac
1216:
1217: #
1218: # Target directory
1219: #
1220: pre=O
1221: case "$optimization" in
1222: full) objdir=$pre$osname-$arch ;;
1223: debugging) objdir=$pre$osname-$arch.dbg ;;
1224: profiling) objdir=$pre$osname-$arch.prf ;;
1225: esac
1226: if test "$fastread" != yes; then
1227: cat << EOT
1228: ==========================================================================
1229: This is the name of the directory where all the object files will be :
1230: EOT
1231: echo $n ..."Enter dir name : $c"
1232: dflt=$objdir; rep=; . ./myread
1233: objdir=$ans
1234: fi
1235:
1236: #
1237: # For dynamic linking, before and after installing
1238: #
1239: case "$osname" in
1240: *cygwin*) LDDYN="-L$libdir -lpari_dll" ; runpath="$libdir" ;
1241: DYNLIBS=-lpari_dll ; DYNFLAGS=-Dlibpari_USE_DLL ;;
1242: *) LDDYN="-L$libdir -l$libpari_base" ; runpath="$libdir" ;;
1243: esac
1244:
1245: cat << EOT
1246: ==========================================================================
1247: EOT
1248:
1249: ####################### CONFIGURE - SPIT ####################################
1250: #
1251: # Now spit out the results
1252: #
1253: cd $TOP
1254: if test ! -d $objdir; then mkdir -p $objdir; fi
1255: dflt_conf_file=$objdir/$dflt_conf_file
1256:
1257: cat > $dflt_conf_file << EOT
1258: # Config file for Pari $release -- $pretty
1259:
1260: EOT
1261: case "$osname" in
1262: os2) shell_q='"'; echo "shell_q='\"'" >> $dflt_conf_file;;
1263: *) shell_q="'"; echo "shell_q=\"'\"" >> $dflt_conf_file;;
1264: esac
1265:
1266: for variable in\
1267: libpari_base version TOP config_dir src_dir emacs_dir doc_dir\
1268: bindir includedir mandir miscdir libdir datadir\
1269: optimization objdir static suffix\
1270: arch asmarch osname pretty prefix share_prefix\
1271: __gnuc__ gnuas CPP AS ASFLAGS CC cflags DBGFLAGS OPTFLAGS LD LDFLAGS\
1272: DLLD DLSUFFIX soname sodest KERNELCPPFLAGS DLLDFLAGS EXTRADLLDFLAGS\
1273: runpath runpathprefix LDDYN LIBS DYNLIBS DYNFLAGS DYNRELOC\
1274: ranlib gzip zcat emacs perl ln_s make_sh exe_suff\
1275: readline readline_enabledp CPPF_defined rl_refresh_line_oldproto\
1276: rl_appendchar rl_genericbind rl_save_prompt _rl_save_prompt rl_message\
1277: rl_completion_matches rl_completion_func_t\
1278: RLINCLUDE RLLIBS\
1279: sizeof_long endian has_exp2\
1280: has_getrusage has_times has_ulong has_ftime has_strftime has_opendir\
1281: has_sigrelse has_sigsetmask has_dlopen has_TIOCGWINSZ has_getrlimit\
1282: gnuplot extralib X11 Xincroot which_graphic_lib gnuplot_libs\
1283: ; do
1284: eval "echo $variable=\'"'$'"$variable\'" \>\> $dflt_conf_file
1285: done
1286:
1287: . $config_dir/extract_files
1288:
1289: #
1290: # Building...
1291: #
1292: cat << EOT
1293: ==========================================================================
1294: EOT
1295:
1296: echo $n "Shall we try to build pari $version.$patch ($status) now (y/n)? $c"
1297: dflt=n; rep='y n'; . $config_dir/myread
1298:
1299: case $ans in
1300: y) if (make gp); then
1301: echo $n "Shall we install the files where they belong (y/n)? $c"
1302: dflt=n; rep='y n'; . $config_dir/myread
1303: case $ans in
1304: y) make install;;
1305: n) echo "Ok. Type \"make install\" when you are ready";;
1306: esac
1307: fi;;
1308: n) echo "Ok. Type \"make install\" when you are ready";;
1309: esac
1310: echo 'Bye !'
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>