📄 configure.in
字号:
dnl psqlodbc standalone configuration.dnl Process this file with autoconf to produce a configure script.dnl Confirm that this is being run from the ODBC source directory,dnl and halt if not...AC_INIT(bind.c)AC_PREFIX_DEFAULT(/usr/local)echo "*** configuring psqlodbc ***"if test -d ../../interfacesthen echo "psqlodbc can be configured either standalone or integrated" echo "into the Postgres main distribution." echo "It appears that you are running the standalone configure" echo "from within the main distribution. The recommended (and required)" echo "procedure is to configure ODBC using the integrated configuration" echo "procedure using the --with-odbc option." exitfiTEMPLATEDIR=./templateif test "$prefix" = "NONE"then if test -d "/share" then ODBCINST=/share/odbcinst.ini else ODBCINST=/etc/odbcinst.ini fielse ODBCINST=$prefix/odbcinst.inifiAC_CANONICAL_HOSTcase "$host_os" in solaris*) case "$host_cpu" in sparc) os=solaris_sparc ;; i386) os=solaris_i386 ;; esac ;; sunos*) os=sunos4 ;; aux*) os=aux ;; linux*) os=linux ;; bsdi*) os=bsdi ;; freebsd*|netbsd*|openbsd*) os=bsd ;; dgux*) os=dgux ;; aix*) os=aix ;;nextstep*) os=nextstep ;; ultrix*) os=ultrix4 ;; irix*) os=irix5 ;; hpux*) os=hpux ;; osf*) os=alpha ;; sco*) os=sco ;; machten*) os=machten ;; cygwin*) os=win ;; sysv4.2*) case "$host_vendor" in univel) os=univel ;; *) os=unknown ;; esac ;; sysv4*) os=svr4 ;;*) echo "" echo "*************************************************************" echo "configure does not currently recognize your operating system," echo "therefore you must do a manual configuration of:" echo "$host_os" echo "Please contact scrappy@hub.org to see about rectifying this, " echo "including the above 'checking host system type...' line " echo "*************************************************************" echo "" exit;;esacPORTNAME=${os}AC_LINK_FILES(makefiles/Makefile.${os}, Makefile.port)echo "checking echo setting..."if echo '\c' | grep -s c >/dev/null 2>&1then ECHO_N="echo -n" ECHO_C=""else ECHO_N="echo" ECHO_C='\c'fidnl cat <<EOTdnl **************************************************************dnl Postodbc v0.0250 Installation Programdnl dnl Welcome to the new improved Postodbc installation program.dnl This configuration program is for version 0.0250 of thednl Postodbc software.dnl dnl EOTdnl this part selects the template from the one in thednl template directory. dnl if test "X$with_template" != "X"dnl thendnl TEMPLATE=template/$with_templatednl elsednl TEMPLATE=DO_NOT_CHANGE_THIS_INVALID_FILENAMEdnl fiAC_MSG_CHECKING(setting template to)AC_ARG_WITH(template, [ --with-template=TEMPLATE use operating system template file; see template directory], [ TEMPLATE=$withval ], [ host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` GUESS=`grep "$host_no_ver" $TEMPLATEDIR/.similar | sed 's/.*=//' | tail -1` if test "$GUESS" then TEMPLATE="$GUESS" else TEMPLATE=`uname -s | tr A-Z a-z` fi ])AC_MSG_RESULT($TEMPLATE)if test ! -d "$TEMPLATEDIR"then cat << EOT**************************************************************You seem to be missing the template directory needed byconfigure. If you just copied the source from the Postgresdistribution you should instead have issued the command'make standalone' which would have built a distributioncontaining the necessary template directory. The otheroption is that your trying to build from the sourcewhich is meant to be placed in the Postgres distributiondirectory 'interfaces/odbc'. Depending on your case either get thestandalone source from the following Web site: www.insightdist.com/psqlodbc/or issue the 'make standalone' command from the'interfaces/odbc' directory of your Postgres Distribution,or copy the distribution file you have to your Postgresdistribution's 'interfaces/odbc' directory and tryagain.If neither of these is the case than please complainkindly to the maintainers; their e-mail addresses canbe found in the Readme files.*************************************************************EOTexitelseif test ! -f "$TEMPLATEDIR/$TEMPLATE"then cat <<EOTPlease select a template from the ones listed below. If notemplate is available, then select the 'generic' one andconsider emailling scrappy@hub.org with the above line whichstarts 'checking host system type...'**************************************************************EOT TEMPLATE=generic GUESS=`grep "^$host_no_ver=" $TEMPLATEDIR/.similar 2>/dev/null` if test ! "$GUESS" then host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` GUESS=`grep "$host_no_ver" $TEMPLATEDIR/.similar 2>/dev/null` fi if test "$GUESS" then TEMPLATE=`echo $GUESS | sed 's/.*=//'` fi export TEMPLATE ls $TEMPLATEDIR echo "**************************************************************" $ECHO_N "Appropriate template file { $TEMPLATE }: $ECHO_C" read a if test "$a." != "." then TEMPLATE=$a fi if test ! -f $TEMPLATEDIR/$TEMPLATE then echo "You must choose an appropriate template file." exit fififiTEMPLATE=$TEMPLATEDIR/$TEMPLATE export TEMPLATEecho ""AROPT=`grep '^AROPT:' $TEMPLATE | awk -F: '{print $2}'`SHARED_LIB=`grep '^SHARED_LIB:' $TEMPLATE | awk -F: '{print $2}'`CFLAGS=`grep '^CFLAGS:' $TEMPLATE | awk -F: '{print $2}'`SRCH_INC=`grep '^SRCH_INC:' $TEMPLATE | awk -F: '{print $2}'`SRCH_LIB=`grep '^SRCH_LIB:' $TEMPLATE | awk -F: '{print $2}'`DLSUFFIX=`grep '^DLSUFFIX:' $TEMPLATE | awk -F: '{print $2}'`DL_LIB=`grep '^DL_LIB:' $TEMPLATE | awk -F: '{print $2}'`CC=`grep '^CC:' $TEMPLATE | awk -F: '{print $2}'`LIBS=`grep '^LIBS:' $TEMPLATE | awk -F: '{print $2}'`a=$SRCH_INCCPPFLAGS=`echo "$a" | sed 's@ *@ @g; s@^\([[^ ]]\)@-I\1@; s@ \([[^ ]]\)@ -I\1@g'`export CPPFLAGSecho "- setting CPPFLAGS=$CPPFLAGS"a=$SRCH_LIBLDFLAGS=`echo "$a" | sed 's@ *@ @g; s@^\([[^ ]]\)@-L\1@; s@ \([[^ ]]\)@ -L\1@g'`export LDFLAGSecho "- setting LDFLAGS=$LDFLAGS"dnl Allow for overriding the default location of the odbcinst.inidnl file which is normally ${prefix}/share or ${prefix} if this isdnl being compiled inside the postgres distribution.AC_MSG_CHECKING(setting ODBCINST)AC_ARG_WITH( odbcinst, [ --with-odbcinst=<pathname> change default directory for odbcinst.ini ], AC_DEFINE_UNQUOTED(ODBCINST, ${with_odbcinst}) AC_MSG_RESULT($with_odbcinst), AC_DEFINE_UNQUOTED(ODBCINST, /etc/odbcinst.ini) AC_MSG_RESULT(${ODBCINST}))AC_SUBST(ODBCINST)if test "X$with_compiler" != "X"then CC=$with_compilerelse AC_PROG_CCfiAC_CONFIG_HEADER(config.h)dnl Checks for programs.AC_PROG_CPPAC_SUBST(PORTNAME)AC_SUBST(LDFLAGS)AC_SUBST(CPPFLAGS)AC_SUBST(AROPT)AC_SUBST(SHARED_LIB)AC_SUBST(CFLAGS)AC_SUBST(DLSUFFIX)AC_SUBST(DL_LIB)INSTALLPATH="`echo /usr/ucb:$PATH | sed 's/:/ /g'`"AC_PATH_PROGS(INSTALL, ginstall installbsd bsdinst scoinst install, NONE, $INSTALLPATH )if test $INSTALL = "NONE"then echo "- No Install Script found - aborting." exit 0;fiINSTLOPTS="-m 444"INSTL_EXE_OPTS="-m 555"INSTL_LIB_OPTS="-m 644"INSTL_SHLIB_OPTS="-m 644"dnl HPUX wants shared libs to be mode 555.case "$host_os" in hpux*) INSTL_SHLIB_OPTS="-m 555" ;;esacdnl These flavors of install need -c to install by copy rather than move.dnl install by move is fatal because it removes stuff from the source tree!case "`basename $INSTALL`" in install|installbsd|scoinst|install-sh) INSTLOPTS="-c $INSTLOPTS" INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS" INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS" INSTL_SHLIB_OPTS="-c $INSTL_SHLIB_OPTS";;esacecho "- Using $INSTALL"AC_SUBST(INSTALL)AC_SUBST(INSTLOPTS)AC_SUBST(INSTL_LIB_OPTS)AC_SUBST(INSTL_SHLIB_OPTS)AC_SUBST(INSTL_EXE_OPTS)dnl Check the option to echo to inhibit newlines.ECHO_N_OUT=`echo -n "" | wc -c`ECHO_C_OUT=`echo "\c" | wc -c`if test "$ECHO_N_OUT" -eq 0; then DASH_N='-n' BACKSLASH_C=else if test "ECHO_C_OUT" -eq 0; then DASH_N= BACKSLASH_C='\\\\c' else AC_MSG_ERROR("echo behaviour undetermined") fifiAC_SUBST(DASH_N)AC_SUBST(BACKSLASH_C)AC_PROG_LN_SAC_PROG_MAKE_SETAC_PROG_RANLIBAC_PATH_PROG(find, find)AC_PATH_PROG(tar, tar)AC_PATH_PROG(split,split)AC_CHECK_LIB(c, main)AC_CHECK_LIB(m, main)AC_CHECK_LIB(dl, main)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(sys/param.h pwd.h)dnl Checks for typedefs, structures, and compiler characteristics.dnl Check for any "odd" conditionsdnl Checks for library functions.AC_CHECK_FUNCS(stricmp)dnl Check for X librariesdnl Check for X libraryAC_OUTPUT(GNUmakefile Makefile.global)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -