bash - 我试图使用MSYS运行./configure文件,但是在意外 token 附近收到语法错误?

标签 bash compiler-errors config msys2

当我尝试使用mingw64编译器从命令行使用MSYS .sh运行./configure.ac文件时,我从./configure文件得到以下错误。

错误:

./configure.ac: line 11: syntax error near unexpected token `[svnversion],'
./configure.ac: line 11: `define([svnversion], esyscmd([sh -c "C:\trunk\bin\run_svnversion_if_it_exists.bash|tr -d '\n'"]))dnl'
sh-4.3$

从此代码:
define([svnversion], esyscmd([sh -c "C:\trunk\bin\run_svnversion_if_it_exists.bash|tr -d '\n'"]))dnl
AC_INIT([oomph-lib],[1.0.svnversion],[***@contact])

还有另一种方法来定义SVN版本或从bash文件中调用它吗?

最佳答案

不,configure.ac不是Bash脚本。请注意,configure.acconfigure不同,因为它以.ac结尾。如果您要编译的任何项目都有configure脚本,则该脚本应该是可以运行的Bash脚本。如果仅包含configure.ac,则必须运行一些奥秘的GNU autotools命令序列,以从中生成配置脚本(例如autoconfautoreconf)。查看该项目的文档,以了解要运行的命令。

关于bash - 我试图使用MSYS运行./configure文件,但是在意外 token 附近收到语法错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45250019/

相关文章:

bash - 使用 heredoc 重定向命令输出

python - 使用 python 脚本创建一个 unix 别名

java - 使用 bouncycaSTLe 计算 SHA3 哈希值 - `error: cannot find symbol`

SSH:仅接受来自本地主机的密码连接

config - QuickFix 问题 - 重复组

git - 我应该避免在私有(private) git 存储库中使用 key 吗?

bash - 如何从文件名中获取字符串并将其用作参数

linux - Bash标准输出同时显示和重定向

C 错误 - 数字代表什么?

java - 在 token ","上出现语法错误,{预期在此 token 之后