📄 ntcbase.m4
字号:
dnl ######################################################################dnldnl File: ntcbase.m4dnldnl Purpose: The base configure.in used for ntcdata and ntcphys.dnldnl Version: $Id: ntcbase.m4,v 1.15 2003/08/30 00:03:27 johan Exp $dnldnl Copyright Tech-X Corporation, 2001. Redistribution allowed provideddnl this copyright statement remains intact.dnldnl ######################################################################dnl ######################################################################dnldnl Make needed subdirectoriesdnldnl ######################################################################echo Making top level docs directoriesif test ! -d docs; then mkdir docs; fiif test ! -d docs/idlapi; then mkdir docs/idlapi; fiif test ! -d docs/cxxapi; then mkdir docs/cxxapi; fiif test ! -d docs/javaapi; then mkdir docs/javaapi; fi# if test ! -d classes; then mkdir classes; fidnl ######################################################################dnldnl Set up compiler: select and set default flagsdnldnl ####################################################################### if test -z "$CXX"; thenAC_ARG_WITH(CXX,[ --with-CXX=<compiler> to use <compiler> (CC, cxx, KCC) instead of g++],CXX="$withval",CXX=g++)# fiecho CXX = $CXX# Compare with g++ to see if we use g77CXXTMP=`echo $CXX | sed 's/ .*$//'`CXXBASE=`basename $CXXTMP`CXXDIR=`dirname $CXXTMP`case $CXXBASE in g++ | c++) case $CXXDIR in . | "") CC=gcc ;; *) CC=${CXXDIR}/gcc ;; esac ;; mpiCC) CC=$CXXDIR/mpicc MPI_CXXFLAGS="-DMPI_PYTHON" ;; aCC) CC=gcc ;; *) CC=cc ;;esac# echo After compiler setting: pwd = $PWDecho ... Using C++ compiler $CXX, C compiler $CCexport CXXexport CCecho Touching .depend in C++ subdirectoriesfor i in $CXXSUBDIRS; do touch $i/.dependdonednl ######################################################################dnldnl Check for Java and Java-dependent packagesdnldnl ######################################################################builtin(include,config/java.m4)# echo After java setting: pwd = $PWDbuiltin(include,config/jchart.m4)# echo After jchart setting: pwd = $PWDbuiltin(include,config/netcdf.m4)builtin(include,config/hdf5.m4)dnl ######################################################################dnldnl Auxiliary compilation flagsdnldnl ####################################################################### Determine BSD compatible nmbuiltin(include,config/nm.m4)# Add compilie flagsbuiltin(include,config/flags.m4)CXXFLAGS="$CXXFLAGS $OPTIFLAGS"CFLAGS="$CFLAGS $C_OPTIFLAGS"# Add link flagsbuiltin(include,config/libs.m4)dnl ######################################################################dnldnl Allow for extra flagsdnldnl ####################################################################### Check for extra flagsAC_ARG_WITH(EXTRA_CXXFLAGS,[ --with-EXTRA_CXXFLAGS=<flags> to add <flags> to c++ compilation], EXTRA_CXXFLAGS="$withval",EXTRA_CXXFLAGS="")CXXFLAGS="$CXXFLAGS $EXTRA_CXXFLAGS"AC_ARG_WITH(EXTRA_LDFLAGS,[ --with-EXTRA_LDFLAGS=<flags> to add <flags> to linking], EXTRA_LDFLAGS="$withval",EXTRA_LDFLAGS="")LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"dnl ######################################################################dnldnl Check for CORBA stuff and remove unneeded directoriesdnldnl ######################################################################USEOB3=truebuiltin(include,config/corba.m4)builtin(include,config/jcorba.m4)rm -f classes/org classes/comdnl ######################################################################dnldnl Check for Python stuffdnldnl ######################################################################builtin(include,config/python.m4)builtin(include,config/numpy.m4)builtin(include,config/fnorb.m4)dnl ######################################################################dnldnl Check for MDS plusdnldnl ######################################################################builtin(include,config/mdsplus.m4)dnl ######################################################################dnldnl Select libs and flags for linkingdnldnl ######################################################################dnl ######################################################################dnldnl Check for header filesdnldnl ######################################################################dnl AC_CHECK_HEADERS(stdlib.h stddef.h unistd.h)dnl AC_CHECK_HEADERS(strings.h bstring.h)AC_LANG_SAVEAC_LANG_CPLUSPLUSAC_CHECK_HEADERS(iostream strstream fstream sstream)dnl AC_CHECK_HEADERS(exception exception.h terminate.h unexpected.h)AC_LANG_RESTOREdnl ######################################################################dnldnl Check for typedefs, structures, and compiler characteristicsdnldnl ######################################################################AC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TMdnl ######################################################################dnldnl Check for library functionsdnldnl ######################################################################dnl NOT USEDdnl AC_CHECK_FUNCS(strerror)dnl ######################################################################dnldnl Find out what the library suffix isdnldnl ######################################################################AC_MSG_CHECKING(what the library suffix is)AC_SUBST(LIBEXT)if test -z "$LIBEXT"then LIBEXT=".a"fiAC_MSG_RESULT($LIBEXT)dnl ######################################################################dnldnl Find out how to create librariesdnldnl ######################################################################AC_MSG_CHECKING(how to build libraries)if test -z "$AR"; then AR="ar cr"fiif test -z "$AR_FLAGS"; then AR_FLAGS="cr"fiAC_MSG_RESULT(with $AR $AR_FLAGS)AC_SUBST(AR)AC_SUBST(AR_FLAGS)dnl ######################################################################dnldnl Find out how to install librariesdnldnl ######################################################################AC_MSG_CHECKING(how to install libraries)AC_SUBST(INSTALL_LIBRARY)if test -z "$INSTALL_LIBRARY"then if test "$LIBEXT" = ".sl" # HP needs executable shared libs then INSTALL_LIBRARY="$INSTALL_PROGRAM" else INSTALL_LIBRARY="$INSTALL_DATA" fielse INSTALL_LIBRARY="$INSTALL_DATA"fiAC_MSG_RESULT(with $INSTALL_LIBRARY)dnl ######################################################################dnldnl C++ compiler capabilitiesdnldnl ######################################################################builtin(include,config/macros.m4)builtin(include,config/cxx.m4)dnl ######################################################################dnldnl Find doxygen documentation programsdnldnl ######################################################################AC_PATH_PROGS(DOXYGEN, doxygen, "")if test -z "$DOXYGEN"; then AC_MSG_WARN(The doxygen utility was not found in your path. Combined C++ documentation will not be made.)fiAC_SUBST(DOXYGEN)dnl ######################################################################dnldnl Set permissions on directoriesdnldnl ######################################################################echo Setting permission on directorieschmod a+rx docschmod a+rx docs/imageschmod a+rx html chmod a+rx html/imageschmod -R a+r docschmod -R a+r htmldnl ######################################################################dnldnl Check for web links to this project areadnldnl ######################################################################AC_MSG_CHECKING(for web accessible area)if test ! -d $HOME/public_html; then AC_MSG_RESULT(not found. $HOME/public_html created.) mkdir $HOME/public_html chmod 755 $HOME/public_htmlelse AC_MSG_RESULT(found.)fihomebase=`basename $HOME`reldir=`pwd | sed "s/^.*${homebase}\///"`thisdir=$PWDif test -d $HOME/public_html; then chmod 755 $PWD docs html cd $HOME/public_html rm -f $HTMLDOCSDIR ln -s ../$reldir/docs $HTMLDOCSDIR rm -f $PACKAGE ln -s ../$reldir/html $PACKAGE echo Docs and html linked to public_html. cd $thisdirfidnl ######################################################################dnldnl Fix up netscape's securitydnldnl ######################################################################preffile=$HOME/.netscape/preferences.jsecho $ac_n "Adding necessary lines to $preffile... " $ac_cif test ! -f $preffile; then echo $preffile not found!else hasline=`grep signed.applets.local_classes_have_30_powers $preffile` if test -z "$hasline"; then netscaperunning=`ps -u $USER 2>/dev/null | grep netscape` if test -n "$netscaperunning"; then "cannot because netscape is running. Quit netscape and redo if you need to add necessary lines to netscape's preferences." else echo 'user_pref("signed.applets.codebase_principal_support", true);' \ >> $preffile echo 'user_pref("signed.applets.local_classes_have_30_powers", true);' \ >> $preffile echo 'user_pref("signed.applets.low_security_for_local_classes", true);' \ >> $preffile echo done. fi else echo lines already present. fifi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -