Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
c6275ab2
提交
c6275ab2
authored
4月 04, 2012
作者:
Travis Cross
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor bootstrap.sh with more function points
上级
277c1141
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
328 行增加
和
298 行删除
+328
-298
bootstrap.sh
bootstrap.sh
+328
-298
没有找到文件。
bootstrap.sh
浏览文件 @
c6275ab2
#!/bin/sh
#!/bin/sh
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
##### bootstrap FreeSWITCH and FreeSWITCH libraries
echo
"bootstrap: checking installation..."
echo
"bootstrap: checking installation..."
BGJOB
=
false
BGJOB
=
false
...
@@ -20,206 +23,218 @@ while getopts 'jhd:' o; do
...
@@ -20,206 +23,218 @@ while getopts 'jhd:' o; do
esac
esac
done
done
if
[
!
-f
modules.conf
]
;
then
setup_modules
()
{
if
[
!
-f
modules.conf
]
;
then
cp
build/modules.conf.in modules.conf
cp
build/modules.conf.in modules.conf
fi
fi
}
# keep automake from making us magically GPL, and to stop complaining about missing files.
cp
-f
docs/COPYING
.
setup_gnu
()
{
cp
-f
docs/AUTHORS
.
# keep automake from making us magically GPL, and to stop
cp
-f
docs/ChangeLog
.
# complaining about missing files.
touch
NEWS
cp
-f
docs/COPYING
.
touch
README
cp
-f
docs/AUTHORS
.
cp
-f
docs/ChangeLog
.
# autoconf 2.59 or newer
touch
NEWS
ac_version
=
`
${
AUTOCONF
:-
autoconf
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
touch
README
if
test
-z
"
$ac_version
"
;
then
}
echo
"bootstrap: autoconf not found."
echo
" You need autoconf version 2.59 or newer installed"
check_ac_ver
()
{
echo
" to build FreeSWITCH from source."
# autoconf 2.59 or newer
exit
1
ac_version
=
`
${
AUTOCONF
:-
autoconf
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
fi
if
test
-z
"
$ac_version
"
;
then
echo
"bootstrap: autoconf not found."
if
test
`
uname
-s
`
=
"OpenBSD"
&&
test
"
$ac_version
"
=
"2.62"
;
then
echo
" You need autoconf version 2.59 or newer installed"
echo
"Autoconf 2.62 is broken on OpenBSD, please try another version"
echo
" to build FreeSWITCH from source."
exit
1
exit
1
fi
fi
if
test
`
uname
-s
`
=
"OpenBSD"
&&
test
"
$ac_version
"
=
"2.62"
;
then
IFS
=
_
;
set
$ac_version
;
IFS
=
' '
echo
"Autoconf 2.62 is broken on OpenBSD, please try another version"
ac_version
=
$1
exit
1
IFS
=
.
;
set
$ac_version
;
IFS
=
' '
fi
if
test
"
$1
"
=
"2"
-a
"
$2
"
-lt
"59"
||
test
"
$1
"
-lt
"2"
;
then
IFS
=
_
;
set
$ac_version
;
IFS
=
' '
echo
"bootstrap: autoconf version
$ac_version
found."
ac_version
=
$1
echo
" You need autoconf version 2.59 or newer installed"
IFS
=
.
;
set
$ac_version
;
IFS
=
' '
echo
" to build FreeSWITCH from source."
if
test
"
$1
"
=
"2"
-a
"
$2
"
-lt
"59"
||
test
"
$1
"
-lt
"2"
;
then
exit
1
echo
"bootstrap: autoconf version
$ac_version
found."
else
echo
" You need autoconf version 2.59 or newer installed"
echo
"bootstrap: autoconf version
$ac_version
(ok)"
echo
" to build FreeSWITCH from source."
fi
exit
1
else
echo
"bootstrap: autoconf version
$ac_version
(ok)"
# automake 1.7 or newer
fi
}
am_version
=
`
${
AUTOMAKE
:-
automake
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
if
test
-z
"
$am_version
"
;
then
check_am_ver
()
{
echo
"bootstrap: automake not found."
# automake 1.7 or newer
echo
" You need automake version 1.7 or newer installed"
am_version
=
`
${
AUTOMAKE
:-
automake
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
echo
" to build FreeSWITCH from source."
if
test
-z
"
$am_version
"
;
then
exit
1
echo
"bootstrap: automake not found."
fi
echo
" You need automake version 1.7 or newer installed"
IFS
=
_
;
set
$am_version
;
IFS
=
' '
echo
" to build FreeSWITCH from source."
am_version
=
$1
exit
1
IFS
=
.
;
set
$am_version
;
IFS
=
' '
fi
if
test
"
$1
"
=
"1"
-a
"
$2
"
-lt
"7"
;
then
IFS
=
_
;
set
$am_version
;
IFS
=
' '
echo
"bootstrap: automake version
$am_version
found."
am_version
=
$1
echo
" You need automake version 1.7 or newer installed"
IFS
=
.
;
set
$am_version
;
IFS
=
' '
echo
" to build FreeSWITCH from source."
if
test
"
$1
"
=
"1"
-a
"
$2
"
-lt
"7"
;
then
exit
1
echo
"bootstrap: automake version
$am_version
found."
else
echo
" You need automake version 1.7 or newer installed"
echo
"bootstrap: automake version
$am_version
(ok)"
echo
" to build FreeSWITCH from source."
fi
exit
1
else
# aclocal 1.7 or newer
echo
"bootstrap: automake version
$am_version
(ok)"
fi
acl_version
=
`
${
ACLOCAL
:-
aclocal
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
}
if
test
-z
"
$acl_version
"
;
then
echo
"bootstrap: aclocal not found."
check_acl_ver
()
{
echo
" You need aclocal version 1.7 or newer installed"
# aclocal 1.7 or newer
echo
" to build FreeSWITCH from source."
acl_version
=
`
${
ACLOCAL
:-
aclocal
}
--version
2>/dev/null|sed
-e
's/^[^0-9]*//;s/[a-z]* *$//;s/[- ].*//g;q'
`
exit
1
if
test
-z
"
$acl_version
"
;
then
fi
echo
"bootstrap: aclocal not found."
IFS
=
_
;
set
$acl_version
;
IFS
=
' '
echo
" You need aclocal version 1.7 or newer installed"
acl_version
=
$1
echo
" to build FreeSWITCH from source."
IFS
=
.
;
set
$acl_version
;
IFS
=
' '
exit
1
if
test
"
$1
"
=
"1"
-a
"
$2
"
-lt
"7"
;
then
fi
echo
"bootstrap: aclocal version
$acl_version
found."
IFS
=
_
;
set
$acl_version
;
IFS
=
' '
echo
" You need aclocal version 1.7 or newer installed"
acl_version
=
$1
echo
" to build FreeSWITCH from source."
IFS
=
.
;
set
$acl_version
;
IFS
=
' '
exit
1
if
test
"
$1
"
=
"1"
-a
"
$2
"
-lt
"7"
;
then
else
echo
"bootstrap: aclocal version
$acl_version
found."
echo
"bootstrap: aclocal version
$acl_version
(ok)"
echo
" You need aclocal version 1.7 or newer installed"
fi
echo
" to build FreeSWITCH from source."
exit
1
# Sample libtool --version outputs:
else
# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
echo
"bootstrap: aclocal version
$acl_version
(ok)"
# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
fi
# output is multiline from 1.5 onwards
}
# Require libtool 1.4 or newer
check_lt_ver
()
{
libtool
=
${
LIBTOOL
:-
`
${
LIBDIR
}
/apr/build/PrintPath glibtool libtool libtool22 libtool15 libtool14
`
}
# Sample libtool --version outputs:
lt_pversion
=
`
$libtool
--version
2>/dev/null|sed
-e
's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'
`
# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
if
test
-z
"
$lt_pversion
"
;
then
# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
# output is multiline from 1.5 onwards
# Require libtool 1.4 or newer
libtool
=
${
LIBTOOL
:-
`
${
LIBDIR
}
/apr/build/PrintPath glibtool libtool libtool22 libtool15 libtool14
`
}
lt_pversion
=
`
$libtool
--version
2>/dev/null|sed
-e
's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'
`
if
test
-z
"
$lt_pversion
"
;
then
echo
"bootstrap: libtool not found."
echo
"bootstrap: libtool not found."
echo
" You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
echo
" You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
exit
1
exit
1
fi
fi
lt_version
=
`
echo
$lt_pversion
|sed
-e
's/\([a-z]*\)$/.\1/'
`
lt_version
=
`
echo
$lt_pversion
|sed
-e
's/\([a-z]*\)$/.\1/'
`
IFS
=
.
;
set
$lt_version
;
IFS
=
' '
IFS
=
.
;
set
$lt_version
;
IFS
=
' '
lt_status
=
"good"
lt_status
=
"good"
if
test
-z
"
$1
"
;
then
a
=
0
;
else
a
=
$1
;
fi
if
test
-z
"
$1
"
;
then
a
=
0
;
else
a
=
$1
;
fi
if
test
-z
"
$2
"
;
then
b
=
0
;
else
b
=
$2
;
fi
if
test
-z
"
$2
"
;
then
b
=
0
;
else
b
=
$2
;
fi
if
test
-z
"
$3
"
;
then
c
=
0
;
else
c
=
$3
;
fi
if
test
-z
"
$3
"
;
then
c
=
0
;
else
c
=
$3
;
fi
lt_major
=
$a
lt_major
=
$a
if
test
"
$a
"
-eq
"2"
;
then
if
test
"
$a
"
-eq
"2"
;
then
lt_status
=
"good"
lt_status
=
"good"
elif
test
"
$a
"
-lt
"2"
;
then
elif
test
"
$a
"
-lt
"2"
;
then
if
test
"
$b
"
-lt
"5"
-o
"
$b
"
=
"5"
-a
"
$c
"
-lt
"14"
;
then
if
test
"
$b
"
-lt
"5"
-o
"
$b
"
=
"5"
-a
"
$c
"
-lt
"14"
;
then
lt_status
=
"bad"
lt_status
=
"bad"
fi
fi
else
else
lt_status
=
"bad"
lt_status
=
"bad"
fi
fi
if
test
$lt_status
=
"good"
;
then
if
test
$lt_status
=
"good"
;
then
echo
"bootstrap: libtool version
$lt_pversion
(ok)"
echo
"bootstrap: libtool version
$lt_pversion
(ok)"
else
else
echo
"bootstrap: libtool version
$lt_pversion
found."
echo
"bootstrap: libtool version
$lt_pversion
found."
echo
" You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
echo
" You need libtool version 1.5.14 or newer to build FreeSWITCH from source."
exit
1
exit
1
fi
fi
}
# check libtoolize availability
check_libtoolize
()
{
if
[
-n
"
${
LIBTOOL
}
"
]
;
then
# check libtoolize availability
if
[
-n
"
${
LIBTOOL
}
"
]
;
then
libtoolize
=
${
LIBTOOLIZE
:-
`
dirname
"
${
libtool
}
"
`
/libtoolize
}
libtoolize
=
${
LIBTOOLIZE
:-
`
dirname
"
${
libtool
}
"
`
/libtoolize
}
else
else
libtoolize
=
${
LIBTOOLIZE
:-
`
${
LIBDIR
}
/apr/build/PrintPath glibtoolize libtoolize libtoolize22 libtoolize15 libtoolize14
`
}
libtoolize
=
${
LIBTOOLIZE
:-
`
${
LIBDIR
}
/apr/build/PrintPath glibtoolize libtoolize libtoolize22 libtoolize15 libtoolize14
`
}
fi
fi
if
[
"x
$libtoolize
"
=
"x"
]
;
then
if
[
"x
$libtoolize
"
=
"x"
]
;
then
echo
"libtoolize not found in path"
echo
"libtoolize not found in path"
exit
1
exit
1
fi
fi
if
[
!
-x
"
$libtoolize
"
]
;
then
if
[
!
-x
"
$libtoolize
"
]
;
then
echo
"
$libtoolize
does not exist or is not executable"
echo
"
$libtoolize
does not exist or is not executable"
exit
1
exit
1
fi
fi
# compare libtool and libtoolize version
# compare libtool and libtoolize version
ltl_pversion
=
`
$libtoolize
--version
2>/dev/null|sed
-e
's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'
`
ltl_pversion
=
`
$libtoolize
--version
2>/dev/null|sed
-e
's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'
`
ltl_version
=
`
echo
$ltl_pversion
|sed
-e
's/\([a-z]*\)$/.\1/'
`
ltl_version
=
`
echo
$ltl_pversion
|sed
-e
's/\([a-z]*\)$/.\1/'
`
IFS
=
.
;
set
$ltl_version
;
IFS
=
' '
IFS
=
.
;
set
$ltl_version
;
IFS
=
' '
if
[
"x
${
lt_version
}
"
!=
"x
${
ltl_version
}
"
]
;
then
if
[
"x
${
lt_version
}
"
!=
"x
${
ltl_version
}
"
]
;
then
echo
"
$libtool
and
$libtoolize
have different versions"
echo
"
$libtool
and
$libtoolize
have different versions"
exit
1
exit
1
fi
fi
}
#
print_autotools_vers
()
{
# Info output
#
#
# Info output
echo
"Bootstrapping using:"
#
echo
" autoconf :
${
AUTOCONF
:-
`
which autoconf
`
}
"
echo
"Bootstrapping using:"
echo
" automake :
${
AUTOMAKE
:-
`
which automake
`
}
"
echo
" autoconf :
${
AUTOCONF
:-
`
which autoconf
`
}
"
echo
" aclocal :
${
ACLOCAL
:-
`
which aclocal
`
}
"
echo
" automake :
${
AUTOMAKE
:-
`
which automake
`
}
"
echo
" libtool :
${
libtool
}
(
${
lt_version
}
)"
echo
" aclocal :
${
ACLOCAL
:-
`
which aclocal
`
}
"
echo
" libtoolize:
${
libtoolize
}
"
echo
" libtool :
${
libtool
}
(
${
lt_version
}
)"
echo
echo
" libtoolize:
${
libtoolize
}
"
echo
echo
"Entering directory
${
LIBDIR
}
/apr"
}
cd
${
LIBDIR
}
/apr
bootstrap_apr
()
{
# Licensed to the Apache Software Foundation (ASF) under one or more
echo
"Entering directory
${
LIBDIR
}
/apr"
# contributor license agreements. See the NOTICE file distributed with
cd
${
LIBDIR
}
/apr
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# Licensed to the Apache Software Foundation (ASF) under one or more
# (the "License"); you may not use this file except in compliance with
# contributor license agreements. See the NOTICE file distributed with
# the License. You may obtain a copy of the License at
# this work for additional information regarding copyright ownership.
#
# The ASF licenses this file to You under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-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
# Unless required by applicable law or agreed to in writing, software
#
# distributed under the License is distributed on an "AS IS" BASIS,
# http://www.apache.org/licenses/LICENSE-2.0
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# Unless required by applicable law or agreed to in writing, software
# limitations under the License.
# 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.
# bootstrap: Build the support scripts needed to compile from a
#
# checked-out version of the source code.
#
# Create the libtool helper files
# bootstrap: Build the support scripts needed to compile from a
#
# checked-out version of the source code.
# Note: we copy (rather than link) them to simplify distribution.
# Note: APR supplies its own config.guess and config.sub -- we do not
# Create the libtool helper files
# rely on libtool's versions
#
#
# Note: we copy (rather than link) them to simplify distribution.
echo
"Copying libtool helper files ..."
# Note: APR supplies its own config.guess and config.sub -- we do not
# rely on libtool's versions
# Remove any libtool files so one can switch between libtool 1.3
#
# and libtool 1.4 by simply rerunning the bootstrap script.
echo
"Copying libtool helper files ..."
(
cd
build
;
rm
-f
ltconfig ltmain.sh libtool.m4
)
# Remove any libtool files so one can switch between libtool 1.3
if
${
libtoolize
}
-n
--install
>
/dev/null 2>&1
;
then
# and libtool 1.4 by simply rerunning the bootstrap script.
(
cd
build
;
rm
-f
ltconfig ltmain.sh libtool.m4
)
if
${
libtoolize
}
-n
--install
>
/dev/null 2>&1
;
then
$libtoolize
--force
--copy
--install
$libtoolize
--force
--copy
--install
else
else
$libtoolize
--force
--copy
$libtoolize
--force
--copy
fi
fi
if
[
-f
libtool.m4
]
;
then
if
[
-f
libtool.m4
]
;
then
ltfile
=
`
pwd
`
/libtool.m4
ltfile
=
`
pwd
`
/libtool.m4
else
else
if
[
$lt_major
-eq
2
]
;
then
if
[
$lt_major
-eq
2
]
;
then
ltfindcmd
=
"
`
sed
-n
\"
/aclocaldir
=
/
{
s/.
*
=
/echo /p
;
q
;
}
\"
<
$libtoolize
`
"
ltfindcmd
=
"
`
sed
-n
\"
/aclocaldir
=
/
{
s/.
*
=
/echo /p
;
q
;
}
\"
<
$libtoolize
`
"
ltfile
=
${
LIBTOOL_M4
-
`
eval
"
$ltfindcmd
"
`
/libtool.m4
}
ltfile
=
${
LIBTOOL_M4
-
`
eval
"
$ltfindcmd
"
`
/libtool.m4
}
...
@@ -233,70 +248,80 @@ else
...
@@ -233,70 +248,80 @@ else
ltpath
=
`
dirname
$libtoolize
`
ltpath
=
`
dirname
$libtoolize
`
ltfile
=
`
cd
$ltpath
/../share/aclocal
;
pwd
`
/libtool.m4
ltfile
=
`
cd
$ltpath
/../share/aclocal
;
pwd
`
/libtool.m4
fi
fi
fi
fi
if
[
!
-f
$ltfile
]
;
then
if
[
!
-f
$ltfile
]
;
then
echo
"
$ltfile
not found"
echo
"
$ltfile
not found"
exit
1
exit
1
fi
fi
echo
"bootstrap: Using libtool.m4 at
${
ltfile
}
."
echo
"bootstrap: Using libtool.m4 at
${
ltfile
}
."
cat
$ltfile
|
sed
-e
's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/'
>
build/libtool.m4
cat
$ltfile
|
sed
-e
's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/'
>
build/libtool.m4
# libtool.m4 from 1.6 requires ltsugar.m4
# libtool.m4 from 1.6 requires ltsugar.m4
if
[
-f
ltsugar.m4
]
;
then
if
[
-f
ltsugar.m4
]
;
then
rm
-f
build/ltsugar.m4
rm
-f
build/ltsugar.m4
mv
ltsugar.m4 build/ltsugar.m4
mv
ltsugar.m4 build/ltsugar.m4
fi
fi
# Clean up any leftovers
# Clean up any leftovers
rm
-f
aclocal.m4 libtool.m4
rm
-f
aclocal.m4 libtool.m4
# fix for FreeBSD (at least):
# fix for FreeBSD (at least):
# libtool.m4 is in share/aclocal, while e.g. aclocal19 only looks in share/aclocal19
# libtool.m4 is in share/aclocal, while e.g. aclocal19 only looks in share/aclocal19
# get aclocal's default directory and include the libtool.m4 directory via -I if
# get aclocal's default directory and include the libtool.m4 directory via -I if
# it's in a different location
# it's in a different location
aclocal_dir
=
"
`
${
ACLOCAL
:-
aclocal
}
--print-ac-dir
`
"
aclocal_dir
=
"
`
${
ACLOCAL
:-
aclocal
}
--print-ac-dir
`
"
if
[
-n
"
${
aclocal_dir
}
"
-a
-n
"
${
ltfile
}
"
-a
"
`
dirname
${
ltfile
}
`
"
!=
"
${
aclocal_dir
}
"
]
;
then
if
[
-n
"
${
aclocal_dir
}
"
-a
-n
"
${
ltfile
}
"
-a
"
`
dirname
${
ltfile
}
`
"
!=
"
${
aclocal_dir
}
"
]
;
then
ACLOCAL_OPTS
=
"-I
`
dirname
${
ltfile
}
`
"
ACLOCAL_OPTS
=
"-I
`
dirname
${
ltfile
}
`
"
fi
fi
### run aclocal
### run aclocal
echo
"Re-creating aclocal.m4 ..."
echo
"Re-creating aclocal.m4 ..."
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
### do some work to toss config.cache?
### do some work to toss config.cache?
echo
"Creating configure ..."
echo
"Creating configure ..."
${
AUTOCONF
:-
autoconf
}
${
AUTOCONF
:-
autoconf
}
#
# Generate the autoconf header
#
echo
"Creating include/arch/unix/apr_private.h.in ..."
${
AUTOHEADER
:-
autoheader
}
#
# Remove autoconf 2.5x's cache directory
# Generate the autoconf header
rm
-rf
autom4te
*
.cache
#
echo
"Creating include/arch/unix/apr_private.h.in ..."
echo
"Entering directory
${
LIBDIR
}
/apr-util"
${
AUTOHEADER
:-
autoheader
}
cd
${
LIBDIR
}
/apr-util
if
[
"
${
BGJOB
}
"
=
"false"
]
;
then
./buildconf
else
./buildconf &
fi
}
# Libs automake automation function
# Libs automake automation function
libbootstrap
()
libbootstrap
()
{
{
i
=
$1
i
=
$1
if
[
-d
${
LIBDIR
}
/
${
i
}
]
;
then
if
[
-d
${
LIBDIR
}
/
${
i
}
]
;
then
echo
"Entering directory
${
LIBDIR
}
/
${
i
}
"
echo
"Entering directory
${
LIBDIR
}
/
${
i
}
"
cd
${
LIBDIR
}
/
${
i
}
cd
${
LIBDIR
}
/
${
i
}
rm
-f
aclocal.m4
rm
-f
aclocal.m4
CFFILE
=
CFFILE
=
if
[
-f
${
LIBDIR
}
/
${
i
}
/configure.in
]
;
then
if
[
-f
${
LIBDIR
}
/
${
i
}
/configure.in
]
;
then
CFFILE
=
"
${
LIBDIR
}
/
${
i
}
/configure.in"
CFFILE
=
"
${
LIBDIR
}
/
${
i
}
/configure.in"
else
else
if
[
-f
${
LIBDIR
}
/
${
i
}
/configure.ac
]
;
then
if
[
-f
${
LIBDIR
}
/
${
i
}
/configure.ac
]
;
then
CFFILE
=
"
${
LIBDIR
}
/
${
i
}
/configure.ac"
CFFILE
=
"
${
LIBDIR
}
/
${
i
}
/configure.ac"
fi
fi
fi
fi
if
[
!
-z
${
CFFILE
}
]
;
then
if
[
!
-z
${
CFFILE
}
]
;
then
LTTEST
=
`
grep
"AC_PROG_LIBTOOL"
${
CFFILE
}
`
LTTEST
=
`
grep
"AC_PROG_LIBTOOL"
${
CFFILE
}
`
LTTEST2
=
`
grep
"AM_PROG_LIBTOOL"
${
CFFILE
}
`
LTTEST2
=
`
grep
"AM_PROG_LIBTOOL"
${
CFFILE
}
`
AMTEST
=
`
grep
"AM_INIT_AUTOMAKE"
${
CFFILE
}
`
AMTEST
=
`
grep
"AM_INIT_AUTOMAKE"
${
CFFILE
}
`
...
@@ -307,10 +332,10 @@ libbootstrap()
...
@@ -307,10 +332,10 @@ libbootstrap()
echo
"Creating aclocal.m4"
echo
"Creating aclocal.m4"
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
${
ACLOCAL_FLAGS
}
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
${
ACLOCAL_FLAGS
}
#
only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
#
only run if AC_PROG_LIBTOOL is in configure.in/configure.ac
if
[
!
-z
"
${
LTTEST
}
"
-o
"
${
LTTEST2
}
"
-o
"
${
AXTEST
}
"
]
;
then
if
[
!
-z
"
${
LTTEST
}
"
-o
"
${
LTTEST2
}
"
-o
"
${
AXTEST
}
"
]
;
then
echo
"Running libtoolize..."
echo
"Running libtoolize..."
if
${
libtoolize
}
-n
--install
>
/dev/null 2>&1
;
then
if
${
libtoolize
}
-n
--install
>
/dev/null 2>&1
;
then
$libtoolize
--force
--copy
--install
$libtoolize
--force
--copy
--install
else
else
$libtoolize
--force
--copy
$libtoolize
--force
--copy
...
@@ -320,16 +345,16 @@ libbootstrap()
...
@@ -320,16 +345,16 @@ libbootstrap()
echo
"Creating configure"
echo
"Creating configure"
${
AUTOCONF
:-
autoconf
}
${
AUTOCONF
:-
autoconf
}
#
only run if AC_CONFIG_HEADERS is found in configure.in/configure.ac
#
only run if AC_CONFIG_HEADERS is found in configure.in/configure.ac
if
[
!
-z
"
${
AHTEST
}
"
]
;
then
if
[
!
-z
"
${
AHTEST
}
"
]
;
then
echo
"Running autoheader..."
echo
"Running autoheader..."
${
AUTOHEADER
:-
autoheader
}
;
${
AUTOHEADER
:-
autoheader
}
;
fi
fi
#
run if AM_INIT_AUTOMAKE / AC_PROG_INSTALL is in configure.in/configure.ac
#
run if AM_INIT_AUTOMAKE / AC_PROG_INSTALL is in configure.in/configure.ac
if
[
!
-z
"
${
AMTEST
}
"
-o
"
${
AMTEST2
}
"
]
;
then
if
[
!
-z
"
${
AMTEST
}
"
-o
"
${
AMTEST2
}
"
]
;
then
echo
"Creating Makefile.in"
echo
"Creating Makefile.in"
${
AUTOMAKE
:-
automake
}
--no-force
--add-missing
--copy
;
${
AUTOMAKE
:-
automake
}
--no-force
--add-missing
--copy
;
fi
fi
rm
-rf
autom4te
*
.cache
rm
-rf
autom4te
*
.cache
fi
fi
...
@@ -338,38 +363,43 @@ libbootstrap()
...
@@ -338,38 +363,43 @@ libbootstrap()
fi
fi
}
}
bootstrap_fs
()
{
cd
${
BASEDIR
}
rm
-f
aclocal.m4
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
$libtoolize
--copy
--automake
${
AUTOCONF
:-
autoconf
}
${
AUTOHEADER
:-
autoheader
}
${
AUTOMAKE
:-
automake
}
--no-force
--add-missing
--copy
rm
-rf
autom4te
*
.cache
}
# Remove autoconf 2.5x's cache directory
bootstrap_libs
()
{
rm
-rf
autom4te
*
.cache
for
i
in
${
SUBDIRS
}
;
do
if
[
"
${
BGJOB
}
"
=
"false"
]
;
then
echo
"Entering directory
${
LIBDIR
}
/apr-util"
cd
${
LIBDIR
}
/apr-util
if
[
"
${
BGJOB
}
"
=
"false"
]
;
then
./buildconf
else
./buildconf &
fi
for
i
in
${
SUBDIRS
}
do
if
[
"
${
BGJOB
}
"
=
"false"
]
;
then
libbootstrap
${
i
}
libbootstrap
${
i
}
else
else
libbootstrap
${
i
}
&
libbootstrap
${
i
}
&
fi
fi
done
done
}
if
[
"
${
BGJOB
}
"
=
"true"
]
;
then
run
()
{
setup_modules
setup_gnu
check_ac_ver
check_am_ver
check_acl_ver
check_lt_ver
check_libtoolize
print_autotools_vers
bootstrap_apr
bootstrap_libs
bootstrap_fs
if
[
"
${
BGJOB
}
"
=
"true"
]
;
then
wait
wait
fi
fi
cd
${
BASEDIR
}
}
rm
-f
aclocal.m4
run
${
ACLOCAL
:-
aclocal
}
${
ACLOCAL_OPTS
}
$libtoolize
--copy
--automake
${
AUTOCONF
:-
autoconf
}
${
AUTOHEADER
:-
autoheader
}
${
AUTOMAKE
:-
automake
}
--no-force
--add-missing
--copy
rm
-rf
autom4te
*
.cache
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论