Siman 83
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א אָסוּר לִקְרוֹת כְּנֶגֶד בֵּית הַכִּסֵא יָשָׁן, אֲפִלּוּ פִּנּוּ מִמֶּנּוּ הַצּוֹאָה. וְיֵרָאֶה לִי דְּהַיְנוּ כְּשֶׁאֵין לוֹ מְחִצּוֹת, אֲבָל אִם יֵשׁ לוֹ מְחִצּוֹת, אַף עַל פִּי שֶׁיֵּשׁ בּוֹ צוֹאָה קוֹרֵא כְּנֶגְדּוֹ בְּסָמוּךְ, וְאֵינוֹ חוֹשֵׁשׁ, אִם אֵין מַגִּיעַ לוֹ רֵיחַ רַע.
1 Laws of the Bathroom with [regard to] the Recitation of the Sh'ma, containing 5 S'ifim It is forbidden to recite [the Recitation of the Sh'ma] facing an old bathroom, even if excrement has been emptied from it. And it seems to me that this is when there are no partitions, but if there are partitions, even though there is excrement, one may recite facing it, adjacent to it, and they need not be concerned as long as no bad smell reaches them.
ב הִזְמִינוֹ לְבֵית הַכִּסֵא, וַעֲדַיִן לֹא נִשְׁתַּמֵּשׁ בּוֹ, מֻתָּר לִקְרוֹת כְּנֶגְדּוֹ, אֲבָל לֹא בְּתוֹכוֹ.
2 If they designated [an area to be used as] a bathroom and it still hadn't been used, it is permitted to recite facing it, but not within it.
ג אָמַר בַּיִת זֶה יְהֵא לְבֵית הַכִּסֵא, וְאָמַר עַל בַּיִת אַחֵר וְגַם זֶה, דִּינָם שָׁוֶה. וְאִם אָמַר עַל הַשֵּׁנִי וּבַיִת זֶה, וְלֹא אָמַר וְגַם זֶה, הֲרֵי הַשֵּׁנִי סָפֵק אִם הִזְמִינוֹ לְכָךְ, אִם לָאו, לְפִיכָךְ אֵין קוֹרִין בּוֹ לְכַתְּחִלָּה, וְאִם קָרָא בּוֹ, יָצָא.
3 If one said "this room will be a bathroom", and said regarding another room, "and also this", their status is the same. And if one said regarding the second, "and this room" and didn't say "and also this", behold the second is uncertain whether it was designated for such or not. Therefore, we do not recite in it from the outset, but if one recited in it, they fulfilled their obligation.
ד בֵּית הַכִּסֵא שֶׁהוּא בַּחֲפִירָה, וּפִיו בְּרִחוּק ד' אַמּוֹת מִן הַגּוּמָא, וְהוּא עָשׂוּי בְּמִדְרוֹן בְּעִנְיָן שֶׁהָרְעִי מִתְגַּלְגֵּל וְנוֹפֵל מִיָּד לְמֵרָחוֹק, וְכֵן הַמֵּי רַגְלַיִם יוֹרְדִין מִיָּד לְגוּמָא, כְּסָתוּם דָּמִי, וּמֻתָּר לִקְרוֹת בּוֹ, אִם אֵין בּוֹ רֵיחַ רַע, וְגַם אֵין מַשְׁתִּינִין בּוֹ חוּץ לַגּוּמָא: הַגָּה: אֲבָל אִם מַשְׁתִּינִין בָּהֶם לִפְעָמִים, אָסוּר לְהַרְהֵר בָּהֶם בְּדִבְרֵי תּוֹרָה, כָּל שֶׁכֵּן לִקְרוֹת קְרִיאַת שְׁמַע (הַגָּהוֹת מַיְמוֹנִי).
4 A bathroom that is [a dug out] pit and its mouth is 4 cubits distant from its depression, and it is designed on a slant so that the excrement rolls and falls a distance immediately, and similarly urine falls immediately into the depression - it is regarded as a closed bathroom and it is permitted to recite next to it as long as there is no bad smell from it and also people do not urinate [on the ground] outside of the depression. Rema: But if people do urinate on the ground around it occasionally, it is forbidden to think about matters of Torah there, and all the more so to recite the Sh'ma (Hagahot Maimoni)
ה בְּנֵי אָדָם שֶׁיֵּשׁ לָהֶם סַפְסָל נָקוּב וְנִפְנִין עָלָיו, מֻתָּר לִקְרוֹת קְרִיאַת שְׁמַע כְּנֶגְדּוֹ, כֵּיוָן שֶׁאֵין הַצּוֹאָה עַל הַנֶּקֶב, וְגַם אֵין הַגְּרָף תַּחַת הַנֶּקֶב, וְעוֹד שֶׁהַנֶּקֶב מְכֻסֶה תָּמִיד בְּדַף: וְכָל מִי שֶׁקּוֹרֵא בְּמָקוֹם שֶׁאֵין קוֹרְאִין, חוֹזֵר וְקוֹרֵא. (מַיְמוֹנִי פֶּרֶק ג'):
5 People that have a bench with a hole in it and [into which they] defecate into, it is permitted to recite the Sh'ma in front of it since there is no excrement on the hole, and also the container [which holds the waste] is not under the hole (ie. it's currently not there), and additionally the hole is always covered with a board. [And all who recite in a place that we may not recite goes back and recites [again] (Maimoni Ch. 3)]