summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba_autoconf.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 0ce08ee1b9..cb8ee180bd 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -1,6 +1,6 @@
# a waf tool to add autoconf-like macros to the configure section
-import Build, os
+import Build, os, Options
import string
from Configure import conf
from samba_utils import *
@@ -317,7 +317,9 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False):
# write out config.h in the right directory
@conf
def SAMBA_CONFIG_H(conf, path=None):
- if os.path.normpath(conf.curdir) != os.path.normpath(os.environ.get('PWD')):
+ # we don't want to produce a config.h in places like lib/replace
+ # when we are building projects that depend on lib/replace
+ if os.path.realpath(conf.curdir) != os.path.realpath(Options.launch_dir):
return
if path is None:
conf.write_config_header('config.h', top=True)