autotools:为什么AX _...而不是configure.ac中的AC _...?

时间:2016-12-03 15:38:20

标签: macros autotools

我今天遇到了一系列autoconf宏:https://www.gnu.org/software/autoconf-archive/The-Macros.html#The-Macros。所有都以ax_为前缀,例如ax_ac_append_to_file.m4configure.ac已在AX_ABSOLUTE_HEADER()中激活,其中包含行AC_

过去,我只看到以AX_开头的宏。

切换到if currentArea != "Somewhere" { if gettingContent == false && objectsArray.count == 0 { if firstOfLocalLeaderboard != nil { if indexPath.row == 0 { let vc = self.storyboard!.instantiateViewController(withIdentifier: "TopTenAreaController") as! TopTenAreaController vc.area = currentArea let navVC = UINavigationController() navVC.viewControllers = [vc] self.present(navVC, animated: true, completion: nil) } else if indexPath.row == 1 { if localLeaderboard.count > 0 { let vc = self.storyboard?.instantiateViewController(withIdentifier: "PhotoViewController") as! PhotoViewController vc.objectsArray = localLeaderboard vc.currentArea = currentArea let navVC = UINavigationController() navVC.viewControllers = [vc] self.present(navVC, animated: true, completion: nil) } else { let vc = self.storyboard!.instantiateViewController(withIdentifier: "CameraViewController") as! CameraViewController vc.appearedFromHome = true let navVC = UINavigationController() navVC.viewControllers = [vc] self.present(navVC, animated: true, completion: nil) } } } else { if indexPath.row == 0 { if localLeaderboard.count > 0 { let vc = self.storyboard?.instantiateViewController(withIdentifier: "PhotoViewController") as! PhotoViewController vc.objectsArray = localLeaderboard vc.currentArea = currentArea let navVC = UINavigationController() navVC.viewControllers = [vc] self.present(navVC, animated: true, completion: nil) } else { let vc = self.storyboard!.instantiateViewController(withIdentifier: "CameraViewController") as! CameraViewController vc.appearedFromHome = true let navVC = UINavigationController() navVC.viewControllers = [vc] self.present(navVC, animated: true, completion: nil) } } } } 是一个相对较新的约定,一种避免命名空间冲突的方法,还是别的什么?

1 个答案:

答案 0 :(得分:2)

宏是命名空间。 AC_是指来自Autoconf的宏,AM_是Automake,LT_是Libtool等。

过去,提供宏的其他程序在Autoconf的命名空间中占据一席之地是很常见的,这就是为什么你可能已经看到了AX_宏的一些AC_宏的变体。{{ 1}}前缀。