LINUX.ORG.RU

Сообщения GhostPPP

 

Выполнить скрипт\собрать библиоткеку xerces

Форум — General

Здраствуйте!

Пытаюсь собрать библиотеку Xerces2.8 из исходников.

в документации сказано, что нужно запускать скрипт runConfigure с определенными ключами, например так (из текущего каталога):

./runConfigure -plinux -cgcc -xg++

что задает целевую платформу Linux, использовать gcc в качетсве С компилятора и g++ в качестве С++ компилятора.

но не тут-то было. Дело в том, что это самый скрипт runConfigure написан на таком-то странном языке, немного отличающийся от обычных bash скриптов. В этом скрипте есть определение функции usage(), которая выводит информации об использовании данного скрипта (ключи)

usage() { echo "...." ... и так далее.

Так вот, мой bash ругается на объявление этой самой usage(), мол, неизвестная команда. (Для этого использовал bash --verbose ./runConfigure)

Также использовал другие интерпретаторы sh, bsh, zsh, tcsh, csh - нет результата.

Да, я новичок в Линуксе, использую дистрибутив Mandriva 2008.0.

Планирую разрабатывать софт под Линукс, а то все Windows, да Windows. Точнее портирую одну программу, написанную на С++(Windows). ДА, на Mandriva не было компилятора C++ - g++, пришлось собирать его руками - собрал и установил:) Даже работает. Я несколько программ им уже скомпилировал.

Основной мой вопрос касается скрипта: Таким его интерпретатором запускать?

Вот начало злополучного скрипта: #!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # # # $Id: runConfigure 570389 2007-08-28 11:52:07Z cargilld $ #

# # runConfigure: # This script will run the "configure" script for the appropriate # platform. Only supported platforms are recognized. # # The following variables are defined and exported at the end of this # script. # # THREADS # BITSTOBUILD # TRANSCODER # MESSAGELOADER # NETACCESSOR # CC # CXX # CXXFLAGS # CFLAGS # LDFLAGS # LIBS #

usage() { echo "runConfigure: Helper script to run \"configure\" for one of the supported platforms" echo "Usage: runConfigure \"options\"" echo " where options may be any of the following:" echo " -p <platform> (accepts 'aix', 'beos', 'linux', 'freebsd', 'netbsd', 'solaris', 'hp-10', 'hp-11', 'openserver', 'unixware', 'os400', 'os390', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin', 'qnx', 'interix', 'mingw-msys') [required; no default]" echo " -c <C compiler name> (e.g. gcc, cc, xlc_r, qcc, icc, icpc or ecc) [default is make default; cc for gnu make]" echo " -x <C++ compiler name> (e.g. g++, CC, aCC, xlC_r, xlC_rv5compat, QCC, icc, icpc or ecc) [default is make default; g++ for gnu make]" echo " -d (specifies that you want to build debug version) [default: no debug]" echo " -m <message loader> can be 'inmem', 'icu', 'MsgFile' or 'iconv' [default: inmem]" echo " -n <net accessor> can be 'fileonly', 'libwww', 'socket', 'winsock' or 'native' [default: socket]" echo " -t <transcoder> can be 'icu', 'Iconv400', 'Uniconv390', 'Win32', 'IconvFBSD', 'IconvGNU' or 'native' [default: native]" echo " -r <thread option> can be 'pthread' or 'dce' (AIX, HP-11, and Solaris) or 'sproc' (IRIX) or 'none' [default: pthread]" echo " -s (specifies that you want to build static libraries) [default: shared]" echo " -b <bitsToBuild> (accepts '64', '32') [default: 32]" echo " -l <extra linker options>" echo " -z <extra compiler options>" echo " -P <install-prefix>" echo " -C <any one extra configure options>" echo " -h (get help on the above commands)" }

ERROR_EXIT_CODE=1

if test ${1}o = "o"; then usage exit ${ERROR_EXIT_CODE} fi

if test ${XERCESCROOT}o = "o"; then echo ERROR : You have not set your XERCESCROOT environment variable echo Though this environment variable has nothing to do with creating echo makefiles, this is just a general warning to prevent you from echo pitfalls in future. To use this script other than for -h output please echo set an environment variable called XERCESCROOT to indicate where you echo installed the XERCES-C files, and run this command again to proceed. echo See the documentation for an example if you are still confused. if test $1 != "-h"; then exit ${ERROR_EXIT_CODE} fi echo fi

if test $1 = "-h"; then usage exit ${ERROR_EXIT_CODE} fi

# Set up the default values for each parameter debug=off # by default debug is off transcoder=native # by default use native transcoder msgloader=inmem # by default use inmem message loader netaccessor= # the default is platform-dependant thread=pthread # by default use POSIX threads configureoptions="" bitsToBuild=32 # by default 32 bit build assumed libtype=shared # by default build shared libraries

# Check the command line parameters if test -x /usr/bin/getopt -o -x bin/getopt; then # # os400 Users will need to comment out the next line. getoptErr=`getopt p:c:x:dm:n:t:r:sb:l:z:P:C:h $*` if [ $? != 0 ] then usage exit ${ERROR_EXIT_CODE} fi # Now get the command line parameters set -- `getopt p:c:x:dm:n:t:r:sb:l:z:P:C:h $*` while [ $# -gt 0 ] do case $1 in -p) platform=$2; shift 2;;

-c) ccompiler=$2; shift 2;;

-x) cppcompiler=$2; shift 2;;

-d) debug=on; shift;;

-m) msgloader=$2; shift 2;;

-n) netaccessor=$2; shift 2;;

-t) transcoder=$2; shift 2;;

-r) thread=$2; shift 2;;

-s) libtype=static; shift;;

-b) bitsToBuild=$2; shift 2;;

-z) compileroptions="$compileroptions $2"; shift 2;;

-l) linkeroptions="$linkeroptions $2"; shift 2;;

-P) configureoptions="$configureoptions --prefix=$2"; shift 2;;

-C) configureoptions="$configureoptions $2"; shift 2;;

-h) usage exit ${ERROR_EXIT_CODE};;

--) shift; break;;

*) echo "unknown option $1" usage exit ${ERROR_EXIT_CODE};; esac done

else

>>>

GhostPPP
()

Nokia 6290 USB connect

Форум — Desktop

Здраствуйте!

Я новичок в линуксе, но пожалуйста не пинайте!

Имею Linux Mandriva 2008 - kernel 2.6.xxx Подключаю телефон Nokia 6290 через USB к компьютеру. В диспетчере устройств Linux Mandriva появляется устройство Nokia 6290, которое относиться к группе "неизвестных".

Планирую использовать телефон как GPRS модем.

В Windows модем работает.

На форуме видел множество скриптов, которые создают PPP соединение для GPRS, но как я понял эти скрипты используются когда уже устройство Nokia USB настоенно?

В какую сторону копать?

>>>

GhostPPP
()

RSS подписка на новые темы